aboutsummaryrefslogtreecommitdiff
path: root/sbin/mount/mount_ufs.c
diff options
context:
space:
mode:
authorPhilippe Charnier <charnier@FreeBSD.org>1998-07-06 07:12:38 +0000
committerPhilippe Charnier <charnier@FreeBSD.org>1998-07-06 07:12:38 +0000
commitbcb1d8469db6e7e2f171898c3bd97c025101c345 (patch)
tree59f7aabb1c0c941479b8bf0e452f059a988a6db2 /sbin/mount/mount_ufs.c
parent6b5bcce5dcbf0ffdb28437a48920127184c20074 (diff)
downloadsrc-bcb1d8469db6e7e2f171898c3bd97c025101c345.tar.gz
src-bcb1d8469db6e7e2f171898c3bd97c025101c345.zip
Remove unused #includes. Spelling. Add rcsid. Do not dot terminate err()
strings.
Notes
Notes: svn path=/head/; revision=37425
Diffstat (limited to 'sbin/mount/mount_ufs.c')
-rw-r--r--sbin/mount/mount_ufs.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/sbin/mount/mount_ufs.c b/sbin/mount/mount_ufs.c
index 1ec97c4ce209..00c2e72f0230 100644
--- a/sbin/mount/mount_ufs.c
+++ b/sbin/mount/mount_ufs.c
@@ -40,10 +40,9 @@ static const char copyright[] =
#ifndef lint
#if 0
static char sccsid[] = "@(#)mount_ufs.c 8.4 (Berkeley) 4/26/95";
-#else
-static const char rcsid[] =
- "$Id: mount_ufs.c,v 1.12 1998/03/08 19:03:05 steve Exp $";
#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include <sys/param.h>
@@ -52,8 +51,6 @@ static const char rcsid[] =
#include <err.h>
#include <errno.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <unistd.h>
#include <ufs/ufs/ufsmount.h>
@@ -132,7 +129,7 @@ mount_ufs(argc, argv)
result = -1;
/*
* If we are mounting root, and we have a mount of something that
- * might be the compatability slice, try mounting other slices
+ * might be the compatibility slice, try mounting other slices
* first. If the kernel has done the right thing and mounted
* the slice because the disk is really sliced, this will find
* the real root filesystem. If not, we'll try what was supplied.
@@ -158,21 +155,22 @@ mount_ufs(argc, argv)
#else
if (mount(vfc.vfc_name, fs_name, mntflags, &args) < 0) {
#endif
- (void)fprintf(stderr, "%s on %s: ", args.fspec, fs_name);
switch (errno) {
case EMFILE:
- (void)fprintf(stderr, "mount table full.\n");
+ warnx("%s on %s: mount table full",
+ args.fspec, fs_name);
break;
case EINVAL:
if (mntflags & MNT_UPDATE)
- (void)fprintf(stderr,
- "Specified device does not match mounted device.\n");
+ warnx(
+ "%s on %s: specified device does not match mounted device",
+ args.fspec, fs_name);
else
- (void)fprintf(stderr,
- "Incorrect super block.\n");
+ warnx("%s on %s: incorrect super block",
+ args.fspec, fs_name);
break;
default:
- (void)fprintf(stderr, "%s\n", strerror(errno));
+ warn(NULL);
break;
}
return (1);