The attached patch eliminates a bit of unnecessary cleverness from 'mount.' If someone would do me the favor of committing this, I would greatly appreciate it.
Namely, some mount_XXX helpers support multiple filesystem types and therefore must consider argv[0]. For no apparent reason, mount puts the filesystem type (e.g., 'nfs') into argv[0] rather than the executable name (e.g., 'mount_nfs'). This is unnecessary, counter-intuitive, and also makes it rather ugly to put 'mount' into a crunchgen binary. ;-) Tim Kientzle
Index: mount.c =================================================================== RCS file: /mnt/cvs/src/sbin/mount/mount.c,v retrieving revision 1.50 diff -c -r1.50 mount.c *** mount.c 14 Oct 2002 19:40:00 -0000 1.50 --- mount.c 24 Jan 2003 21:47:00 -0000 *************** *** 400,405 **** --- 400,406 ---- pid_t pid; int argc, i, status; char *optbuf, execname[MAXPATHLEN + 1], mntpath[MAXPATHLEN]; + char progname[MAXPATHLEN+1]; #if __GNUC__ (void)&optbuf; *************** *** 441,448 **** if (strcmp(vfstype, "msdos") == 0) vfstype = "msdosfs"; argc = 0; ! argv[argc++] = vfstype; mangle(optbuf, &argc, argv); argv[argc++] = spec; argv[argc++] = name; --- 442,451 ---- if (strcmp(vfstype, "msdos") == 0) vfstype = "msdosfs"; + snprintf(progname,sizeof(progname),"mount_%s",vfstype); + argc = 0; ! argv[argc++] = progname; mangle(optbuf, &argc, argv); argv[argc++] = spec; argv[argc++] = name;