Date: Mon, 27 Jan 2003 21:42:18 -0500 From: John De Boskey <jwd@freebsd.org> To: Current List <freebsd-current@freebsd.org> Cc: Tim Kientzle <kientzle@acm.org> Subject: src/sbin/mount/mount.c argv[0] cleanup Message-ID: <20030128024218.GA12090@BSDWins.Com>
next in thread | raw e-mail | index | archive | help
Hi, I've built and installed a complete system with the patch below. Amoung other things, this allows the individual mount_$vfstype executables to not have to differentiate how they were invoked. They can then have their XXX sections removed along with a small amount of code (and this will help our poor boot floppies :-) Does anyone know any reason why this should not be done? Thanks! John 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 26 Jan 2003 20:06:36 -0000 *************** *** 469,474 **** --- 469,475 ---- for (edir = edirs; *edir; edir++) { (void)snprintf(execname, sizeof(execname), "%s/mount_%s", *edir, vfstype); + argv[0] = execname; execv(execname, (char * const *)argv); } if (errno == ENOENT) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030128024218.GA12090>