summaryrefslogtreecommitdiffstats
path: root/sbin/mount_ifs/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/mount_ifs/mount.c')
-rw-r--r--sbin/mount_ifs/mount.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/sbin/mount_ifs/mount.c b/sbin/mount_ifs/mount.c
index d27898e..4939444 100644
--- a/sbin/mount_ifs/mount.c
+++ b/sbin/mount_ifs/mount.c
@@ -40,10 +40,9 @@ static const char copyright[] =
#ifndef lint
#if 0
static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95";
-#else
-static const char rcsid[] =
- "$Id: mount.c,v 1.26 1998/05/17 21:57:17 dt Exp $";
#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include <sys/param.h>
@@ -79,7 +78,7 @@ void prmount __P((struct statfs *));
void putfsent __P((const struct statfs *));
void usage __P((void));
-/* Map from mount otions to printable formats. */
+/* Map from mount options to printable formats. */
static struct opt {
int o_opt;
const char *o_name;
@@ -155,7 +154,7 @@ main(argc, argv)
break;
case 't':
if (vfslist != NULL)
- errx(1, "only one -t option may be specified.");
+ errx(1, "only one -t option may be specified");
vfslist = makevfslist(optarg);
vfstype = optarg;
break;
@@ -222,7 +221,7 @@ main(argc, argv)
if (init_flags & MNT_UPDATE) {
if ((mntbuf = getmntpt(*argv)) == NULL)
errx(1,
- "unknown special file or file system %s.",
+ "unknown special file or file system %s",
*argv);
if ((fs = getfsfile(mntbuf->f_mntonname)) != NULL)
mntfromname = fs->fs_spec;
@@ -234,10 +233,10 @@ main(argc, argv)
}
if ((fs = getfsfile(*argv)) == NULL &&
(fs = getfsspec(*argv)) == NULL)
- errx(1, "%s: unknown special file or file system.",
+ errx(1, "%s: unknown special file or file system",
*argv);
if (BADTYPE(fs->fs_type))
- errx(1, "%s has unknown file system type.",
+ errx(1, "%s has unknown file system type",
*argv);
rval = mountfs(fs->fs_vfstype, fs->fs_spec, fs->fs_file,
init_flags, options, fs->fs_mntops);
@@ -355,7 +354,7 @@ mountfs(vfstype, spec, name, flags, options, mntopts)
if (realpath(name, mntpath) != NULL && stat(mntpath, &sb) == 0) {
if (!S_ISDIR(sb.st_mode)) {
- warnx("%s: Not a directory", mntpath);
+ warnx("%s: not a directory", mntpath);
return (1);
}
} else {
@@ -386,7 +385,7 @@ mountfs(vfstype, spec, name, flags, options, mntopts)
/*
* XXX
* The mount_mfs (newfs) command uses -o to select the
- * optimisation mode. We don't pass the default "-o rw"
+ * optimization mode. We don't pass the default "-o rw"
* for that reason.
*/
if (flags & MNT_UPDATE)
@@ -427,10 +426,8 @@ mountfs(vfstype, spec, name, flags, options, mntopts)
char *cp;
for (edir = edirs; *edir; edir++)
len += strlen(*edir) + 2; /* ", " */
- if ((cp = malloc(len)) == NULL) {
- warn(NULL);
- exit(1);
- }
+ if ((cp = malloc(len)) == NULL)
+ errx(1, "malloc failed");
cp[0] = '\0';
for (edir = edirs; *edir; edir++) {
strcat(cp, *edir);
@@ -529,7 +526,7 @@ catopt(s0, s1)
if (s0 && *s0) {
i = strlen(s0) + strlen(s1) + 1 + 1;
if ((cp = malloc(i)) == NULL)
- err(1, NULL);
+ errx(1, "malloc failed");
(void)snprintf(cp, i, "%s,%s", s0, s1);
} else
cp = strdup(s1);
@@ -570,12 +567,10 @@ void
usage()
{
- (void)fprintf(stderr,
- "usage: mount %s %s\n mount %s\n mount %s\n",
- "[-dfpruvw] [-o options] [-t ufs | external_type]",
- "special node",
- "[-adfpruvw] [-t ufs | external_type]",
- "[-dfpruvw] special | node");
+ (void)fprintf(stderr, "%s\n%s\n%s\n",
+"usage: mount [-dfpruvw] [-o options] [-t ufs | external_type] special node",
+" mount [-adfpruvw] [-t ufs | external_type]",
+" mount [-dfpruvw] special | node");
exit(1);
}
OpenPOWER on IntegriCloud