From: Andrew Deason Date: Thu, 22 Dec 2011 04:19:01 +0000 (-0500) Subject: afsd.fuse: Solaris 11 support X-Git-Tag: openafs-stable-1_8_0pre1~2904 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=98a6db0b047efcfbeb0fb3c8b1e4e136b206f10d afsd.fuse: Solaris 11 support The FUSE in Solaris 11 has a couple of quirks; work around them. Change-Id: I29b8a8858467d1c6ebacb4926a15165feae64f2c Reviewed-on: http://gerrit.openafs.org/6421 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/afsd/afsd_fuse.c b/src/afsd/afsd_fuse.c index de80b52..6ce22d4 100644 --- a/src/afsd/afsd_fuse.c +++ b/src/afsd/afsd_fuse.c @@ -539,7 +539,14 @@ main(int argc, char **argv) int code; struct fuse_args args = FUSE_ARGS_INIT(argc-1, &argv[1]); fuse_opt_add_arg(&afsd_args, argv[0]); + +#ifdef AFS_SUN511_ENV + /* for some reason, Solaris 11 FUSE takes the filesystem name from + * argv[0], and ignores the -ofsname option */ + fuse_opt_add_arg(&fuse_args, "AFS"); +#else fuse_opt_add_arg(&fuse_args, argv[0]); +#endif /* let us determine file inode numbers, not FUSE. also make "AFS" appear * in df/mount/mnttab/etc output. */ @@ -565,7 +572,12 @@ main(int argc, char **argv) /* pass "-- /mount/dir" to fuse to specify dir to mount; "--" is * just to make sure fuse doesn't interpret the mount dir as a flag */ +#ifndef AFS_SUN511_ENV + /* This seems to screw up option parsing on Solaris 11 FUSE, so just + * don't do it. This makes it slightly more annoying to mount on a dir + * called -foo or something, but oh well. */ fuse_opt_add_arg(&fuse_args, "--"); +#endif fuse_opt_add_arg(&fuse_args, uafs_MountDir()); return fuse_main(fuse_args.argc, fuse_args.argv, &fuafsd_oper, NULL);