From owner-cvs-sbin Thu Mar 14 16:14:35 1996 Return-Path: owner-cvs-sbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id QAA12930 for cvs-sbin-outgoing; Thu, 14 Mar 1996 16:14:35 -0800 (PST) Received: (from asami@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id QAA12870 Thu, 14 Mar 1996 16:14:12 -0800 (PST) Date: Thu, 14 Mar 1996 16:14:12 -0800 (PST) From: Satoshi Asami Message-Id: <199603150014.QAA12870@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-sbin Subject: cvs commit: src/sbin/mount mount.c Sender: owner-cvs-sbin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk asami 96/03/14 16:14:11 Modified: sbin/mount mount.c Log: Change the messages slightly when there is no "mount_type" executable found when the user specifies "mount -t type". Instead of printing out one message for each path element (/sbin, /usr/sbin), it prints out: mount: exec mount_type not found in /sbin, /usr/sbin: No such file or directory The code is quite long for such a stupid little piece of aesthesism but it is very straghtforward so I guess it's ok. Besides, I don't want to do a "char foo[100];" and have malloc break down when someone decides to add a few more paths to a variable that's far apart from this code. :) By the way, there is no malloc() off-by-one error for the '\0' at the end of the string although I don't explicitly add 1 to the length. The code allocates strlen(path element)+2 bytes for each path element, and doesn't use the last two bytes (for the delimiting ", "). Reviewed by: the list (I hope) Revision Changes Path 1.13 +19 -4 src/sbin/mount/mount.c