From owner-freebsd-current Mon Jan 27 18:42:28 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A834B37B405 for ; Mon, 27 Jan 2003 18:42:26 -0800 (PST) Received: from bsdone.bsdwins.com (www.bsdwins.com [192.58.184.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id C108043F75 for ; Mon, 27 Jan 2003 18:42:25 -0800 (PST) (envelope-from jwd@bsdwins.com) Received: from bsdone.bsdwins.com (localhost [127.0.0.1]) by bsdone.bsdwins.com (8.12.5/8.12.5) with ESMTP id h0S2gJW2012160; Mon, 27 Jan 2003 21:42:19 -0500 (EST) (envelope-from jwd@www.bsdwins.com) Received: (from jwd@localhost) by bsdone.bsdwins.com (8.12.5/8.12.5/Submit) id h0S2gIQC012159; Mon, 27 Jan 2003 21:42:18 -0500 (EST) Date: Mon, 27 Jan 2003 21:42:18 -0500 From: John De Boskey To: Current List Cc: Tim Kientzle Subject: src/sbin/mount/mount.c argv[0] cleanup Message-ID: <20030128024218.GA12090@BSDWins.Com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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