Allowed commas within option fsname on OpenIndiana

On OpenIndiana, the device names have commas in them. Do not interpret
commas as option separators within the option fsname. As a consequence
this option has to be the last one.
This commit is contained in:
Jean-Pierre André 2012-08-22 11:08:20 +02:00
parent 97342d05bc
commit 9403b9e44f

View File

@ -264,9 +264,23 @@ static int process_real_option_group(struct fuse_opt_context *ctx, char *opts)
do { do {
int res; int res;
sep = strchr(opts, ','); #ifdef __SOLARIS__
if (sep) /*
*sep = '\0'; * On Solaris, the device name contains commas, so the
* option "fsname" has to be the last one and its commas
* should not be interpreted as option separators.
* This had to be hardcoded because the option "fsname"
* may be found though not present in option list.
*/
if (!strncmp(opts,"fsname=",7))
sep = (char*)NULL;
else
#endif /* __SOLARIS__ */
{
sep = strchr(opts, ',');
if (sep)
*sep = '\0';
}
res = process_gopt(ctx, opts, 1); res = process_gopt(ctx, opts, 1);
if (res == -1) if (res == -1)
return -1; return -1;