SCCS-vsn: sbin/mount/mount.c 8.11
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)mount.c 8.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)mount.c 8.11 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
if (argc == 0) {
if (verbose || debug || type)
usage();
if (argc == 0) {
if (verbose || debug || type)
usage();
- if ((mntsize = getmntinfo(&mntbuf, MNT_NOWAIT)) == 0) {
- errx(1, "cannot get mount information");
- }
+ if ((mntsize = getmntinfo(&mntbuf, MNT_NOWAIT)) == 0)
+ err(1, "getmntinfo");
for (i = 0; i < mntsize; i++) {
if (badvfstype(mntbuf[i].f_type, vfslist))
continue;
for (i = 0; i < mntsize; i++) {
if (badvfstype(mntbuf[i].f_type, vfslist))
continue;
*/
i = strlen(fs->fs_mntops) + strlen(options) + 2;
if ((cp = malloc((size_t)i)) == NULL)
*/
i = strlen(fs->fs_mntops) + strlen(options) + 2;
if ((cp = malloc((size_t)i)) == NULL)
- errx(1, "-u malloc failed");
(void)snprintf(cp, i, "%s,%s", fs->fs_mntops, options);
options = cp;
}
(void)snprintf(cp, i, "%s,%s", fs->fs_mntops, options);
options = cp;
}
if ((fs = getfsfile(*argv)) == NULL &&
(fs = getfsspec(*argv)) == NULL)
errx(1,
if ((fs = getfsfile(*argv)) == NULL &&
(fs = getfsspec(*argv)) == NULL)
errx(1,
- "unknown special file or file system %s.\n", *argv);
+ "unknown special file or file system %s.", *argv);
if (BADTYPE(fs->fs_type))
if (BADTYPE(fs->fs_type))
- errx(1, "%s has unknown file system type.\n", *argv);
+ errx(1, "%s has unknown file system type.", *argv);
mnttype = getmnttype(fs->fs_vfstype);
ret = mountfs(fs->fs_spec,
fs->fs_file, updateflg, type, options, fs->fs_mntops);
mnttype = getmnttype(fs->fs_vfstype);
ret = mountfs(fs->fs_spec,
fs->fs_file, updateflg, type, options, fs->fs_mntops);
(void)fprintf(stderr, "%s on %s: ", spec, name);
switch (errno) {
case EMFILE:
(void)fprintf(stderr, "%s on %s: ", spec, name);
switch (errno) {
case EMFILE:
- (void)fprintf(stderr, "Mount table full\n");
+ (void)fprintf(stderr, "Mount table full.\n");
break;
case EINVAL:
if (flags & MNT_UPDATE)
break;
case EINVAL:
if (flags & MNT_UPDATE)