mirror of
https://github.com/openharmony/third_party_libfuse.git
synced 2026-07-21 00:45:56 -04:00
fix
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2006-06-05 Remy Blank <remy.blank@pobox.com>
|
||||
|
||||
* lib: canonicalize mount point in fuse_helper_opt_proc() so that
|
||||
unmounting succeeds even if mount point was relative.
|
||||
|
||||
2006-06-04 Csaba Henk <csaba.henk@creo.hu>
|
||||
|
||||
* lib: fix emergency umount in helper.c when malloc fails.
|
||||
@@ -9,11 +14,6 @@
|
||||
Switch to "-pthread" from "-lpthread" as that's the preferred
|
||||
one on several platforms. Consulted with Terrence Cole and
|
||||
Miklos Szeredi
|
||||
|
||||
|
||||
2006-05-16 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Test commit
|
||||
|
||||
2006-05-08 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
|
||||
+9
-3
@@ -18,6 +18,7 @@
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
|
||||
enum {
|
||||
KEY_HELP,
|
||||
@@ -99,9 +100,14 @@ static int fuse_helper_opt_proc(void *data, const char *arg, int key,
|
||||
return 1;
|
||||
|
||||
case FUSE_OPT_KEY_NONOPT:
|
||||
if (!hopts->mountpoint)
|
||||
return fuse_opt_add_opt(&hopts->mountpoint, arg);
|
||||
else {
|
||||
if (!hopts->mountpoint) {
|
||||
char mountpoint[PATH_MAX];
|
||||
if (realpath(arg, mountpoint) == NULL) {
|
||||
fprintf(stderr, "fuse: bad mount point `%s': %s\n", arg, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
return fuse_opt_add_opt(&hopts->mountpoint, mountpoint);
|
||||
} else {
|
||||
fprintf(stderr, "fuse: invalid argument `%s'\n", arg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user