mount utility
By covering the mount() library function and the operation in the resource manager, we've pretty well covered the mount utility.
However, if you're writing a mount handler, there may be occasions when you want to do custom parsing of arguments and provide your own data structure to your server. This is why the mount command will always first try to call out to a separate program named mount_XXX, where XXX is the type that you specified with the -t option of mount. To see just what would be called (in terms of options, etc.), you can use the -v option, which should provide you with the command line that would be exec()'ed.
char *mount_parse_generic_args(char *options, int *flags);
while ((c = getopt(argv, argc, "o:"))) {
switch (c) {
case 'o':
if ((mysteryop = mount_parse_generic_args(optarg, &flags))) {
/* You can do your own getsubopt-type processing here.
The common options are removed from mysteryop. */
}
break;
}
}
For more information about the stripped options and the corresponding flags, see the entry for mount_parse_generic_args(), in the QNX OS C Library Reference.