121156Sdist /* 261503Sbostic * Copyright (c) 1980, 1989, 1993 361503Sbostic * The Regents of the University of California. All rights reserved. 439322Smckusick * 542702Sbostic * %sccs.include.redist.c% 621156Sdist */ 721156Sdist 810811Ssam #ifndef lint 961503Sbostic static char copyright[] = 1061503Sbostic "@(#) Copyright (c) 1980, 1989, 1993\n\ 1161503Sbostic The Regents of the University of California. All rights reserved.\n"; 1239322Smckusick #endif /* not lint */ 131057Sbill 1421156Sdist #ifndef lint 15*66171Spendry static char sccsid[] = "@(#)mount.c 8.12 (Berkeley) 02/20/94"; 1639322Smckusick #endif /* not lint */ 1721156Sdist 1866138Sbostic #include <sys/param.h> 1966138Sbostic #include <sys/wait.h> 2066138Sbostic #include <sys/mount.h> 2166131Spendry 2266138Sbostic #include <err.h> 2366138Sbostic #include <errno.h> 2466138Sbostic #include <fstab.h> 2566138Sbostic #include <signal.h> 2666131Spendry #include <stdio.h> 2766131Spendry #include <stdlib.h> 2866138Sbostic #include <string.h> 2966131Spendry #include <unistd.h> 3066138Sbostic 3145524Sbostic #include "pathnames.h" 321057Sbill 3340369Smckusick 3466138Sbostic int debug, force, verbose, mnttype, skipvfs; 3566130Spendry char *mntname; 3639131Smckusick 3766138Sbostic int badvfsname __P((char *, char **)); 3866138Sbostic int badvfstype __P((int, char **)); 3966138Sbostic int getexecopts __P((char *, char **)); 4066138Sbostic struct statfs 4166138Sbostic *getmntpt __P((char *)); 4266138Sbostic int getmnttype __P((char *)); 4366138Sbostic void getstdopts __P((char *, int *)); 4466138Sbostic void getufsopts __P((char *, int *)); 4566138Sbostic char **makevfslist __P((char *)); 4666138Sbostic int mountfs __P((char *, char *, int, char *, char *, char *)); 4766138Sbostic void prmount __P((char *, char *, int)); 4866138Sbostic void usage __P((void)); 4966138Sbostic 5066130Spendry int 5166130Spendry main(argc, argv) 525073Sroot int argc; 5366138Sbostic char *argv[]; 541057Sbill { 5566130Spendry struct fstab *fs; 5666130Spendry struct statfs *mntbuf; 5740496Smckusick FILE *pidfile; 5866138Sbostic long mntsize; 5966138Sbostic int all, ch, i, pid, ret, rval, updateflg; 6066138Sbostic char *cp, *type, *options, **vfslist; 611057Sbill 6266138Sbostic mntname = "ufs"; 6338445Smckusick mnttype = MOUNT_UFS; 6466138Sbostic 6566138Sbostic all = updateflg = 0; 6666138Sbostic options = type = NULL; 6766138Sbostic vfslist = NULL; 6866138Sbostic while ((ch = getopt(argc, argv, "adfo:rwt:uv")) != EOF) 6966138Sbostic switch(ch) { 7035339Sbostic case 'a': 7135339Sbostic all = 1; 7235339Sbostic break; 7356841Smckusick case 'd': 7456841Smckusick debug = 1; 7556841Smckusick break; 7635339Sbostic case 'f': 7756841Smckusick force = 1; 7835339Sbostic break; 7966138Sbostic case 'o': 8066138Sbostic options = optarg; 8166138Sbostic break; 8235339Sbostic case 'r': 8312808Ssam type = FSTAB_RO; 8435339Sbostic break; 8566138Sbostic case 't': 8666138Sbostic vfslist = makevfslist(optarg); 8766138Sbostic mnttype = getmnttype(optarg); 8866138Sbostic break; 8939333Smckusick case 'u': 9041403Smckusick updateflg = MNT_UPDATE; 9139333Smckusick break; 9235339Sbostic case 'v': 9335339Sbostic verbose = 1; 9435339Sbostic break; 9535339Sbostic case 'w': 9635339Sbostic type = FSTAB_RW; 9735339Sbostic break; 9835339Sbostic case '?': 9935339Sbostic default: 10035339Sbostic usage(); 10139131Smckusick /* NOTREACHED */ 1025073Sroot } 10335339Sbostic argc -= optind; 10435339Sbostic argv += optind; 10535339Sbostic 10666138Sbostic #define BADTYPE(type) \ 10766138Sbostic (strcmp(type, FSTAB_RO) && \ 10866138Sbostic strcmp(type, FSTAB_RW) && strcmp(type, FSTAB_RQ)) 10935339Sbostic 1104460Sroot if (all) { 11135369Sbostic rval = 0; 11266138Sbostic while ((fs = getfsent()) != NULL) { 11335372Sbostic if (BADTYPE(fs->fs_type)) 11435372Sbostic continue; 11540844Smckusick if (badvfsname(fs->fs_vfstype, vfslist)) 11640051Smckusick continue; 11766138Sbostic /* `/' is special, it's always mounted. */ 11839333Smckusick mnttype = getmnttype(fs->fs_vfstype); 11966131Spendry rval |= mountfs(fs->fs_spec, fs->fs_file, updateflg, 12039333Smckusick type, options, fs->fs_mntops); 12135372Sbostic } 12235341Sbostic exit(rval); 12335339Sbostic } 1245073Sroot 12535339Sbostic if (argc == 0) { 12656841Smckusick if (verbose || debug || type) 12735339Sbostic usage(); 12866139Sbostic if ((mntsize = getmntinfo(&mntbuf, MNT_NOWAIT)) == 0) 12966139Sbostic err(1, "getmntinfo"); 13040844Smckusick for (i = 0; i < mntsize; i++) { 13140844Smckusick if (badvfstype(mntbuf[i].f_type, vfslist)) 13240844Smckusick continue; 13366138Sbostic prmount(mntbuf[i].f_mntfromname, 13466138Sbostic mntbuf[i].f_mntonname, mntbuf[i].f_flags); 13540844Smckusick } 1364460Sroot exit(0); 1371057Sbill } 13812808Ssam 13966138Sbostic if (argc == 1 && vfslist != NULL) 14066131Spendry usage(); 14166131Spendry 14239465Smckusick if (argc == 1 && updateflg) { 14366138Sbostic if ((mntbuf = getmntpt(*argv)) == NULL) 14466138Sbostic errx(1, 14566138Sbostic "unknown special file or file system %s.", *argv); 14639465Smckusick mnttype = mntbuf->f_type; 14766138Sbostic if ((fs = getfsfile(mntbuf->f_mntonname)) == NULL) 14866131Spendry errx(1, "can't find fstab entry for %s.", *argv); 14953711Smckusick mntname = fs->fs_vfstype; 15053711Smckusick 15153711Smckusick /* 15253711Smckusick * Default type to fstab version if none specified on the 15353711Smckusick * command line. 15453711Smckusick */ 15553711Smckusick if (type == NULL) 15653711Smckusick type = fs->fs_type; 15753711Smckusick 15853711Smckusick /* 15953711Smckusick * Default options to fstab version if none specified on the 16053711Smckusick * command line. 16153711Smckusick */ 16253711Smckusick if (options == NULL) 16353711Smckusick options = fs->fs_mntops; 16453711Smckusick else { 16553711Smckusick /* 16653711Smckusick * Concat the two strings with the command line 16753711Smckusick * options last so that they will override the 16853711Smckusick * fstab options. 16953711Smckusick */ 17053711Smckusick i = strlen(fs->fs_mntops) + strlen(options) + 2; 17166138Sbostic if ((cp = malloc((size_t)i)) == NULL) 17266139Sbostic err(1, NULL); 17366138Sbostic (void)snprintf(cp, i, "%s,%s", fs->fs_mntops, options); 17453711Smckusick options = cp; 17553711Smckusick } 17666138Sbostic ret = mountfs(fs->fs_spec, 17766138Sbostic mntbuf->f_mntonname, updateflg, type, options, NULL); 17840496Smckusick } else if (argc == 1) { 17966138Sbostic if ((fs = getfsfile(*argv)) == NULL && 18066138Sbostic (fs = getfsspec(*argv)) == NULL) 18166138Sbostic errx(1, 18266139Sbostic "unknown special file or file system %s.", *argv); 18366138Sbostic if (BADTYPE(fs->fs_type)) 18466139Sbostic errx(1, "%s has unknown file system type.", *argv); 18539333Smckusick mnttype = getmnttype(fs->fs_vfstype); 18666138Sbostic ret = mountfs(fs->fs_spec, 18766138Sbostic fs->fs_file, updateflg, type, options, fs->fs_mntops); 18840496Smckusick } else if (argc != 2) { 18940496Smckusick usage(); 19040496Smckusick ret = 1; 19140496Smckusick } else { 19242857Smckusick /* 19366138Sbostic * If -t flag has not been specified, and spec contains either 19466138Sbostic * a ':' or a '@' then assume that an NFS filesystem is being 19566138Sbostic * specified ala Sun. 19642857Smckusick */ 19766138Sbostic if (vfslist == NULL && 19866131Spendry (strchr(argv[0], ':') || strchr(argv[0], '@'))) { 19942857Smckusick mnttype = MOUNT_NFS; 20052182Smckusick mntname = "nfs"; 20152182Smckusick } 20266138Sbostic ret = mountfs(argv[0], argv[1], updateflg, type, options, NULL); 20312808Ssam } 20440496Smckusick if ((pidfile = fopen(_PATH_MOUNTDPID, "r")) != NULL) { 20540496Smckusick pid = 0; 20666138Sbostic (void)fscanf(pidfile, "%ld", &pid); 20766138Sbostic (void)fclose(pidfile); 20866138Sbostic if (pid > 0 && kill(pid, SIGHUP)) 20966138Sbostic err(1, "signal mountd"); 21040496Smckusick } 21166138Sbostic 21266131Spendry exit(ret); 21312808Ssam } 21412808Ssam 21566138Sbostic int 21639333Smckusick mountfs(spec, name, flags, type, options, mntopts) 21739131Smckusick char *spec, *name, *type, *options, *mntopts; 21839333Smckusick int flags; 21912808Ssam { 22066138Sbostic struct ufs_args args; 22142253Sbostic pid_t pid; 22266138Sbostic int argc, i, status; 22339131Smckusick char *argp, *argv[50]; 22466138Sbostic char execname[MAXPATHLEN + 1], flagval[12], mntpath[MAXPATHLEN]; 2251057Sbill 22639333Smckusick if (mntopts) 22739333Smckusick getstdopts(mntopts, &flags); 22839316Smckusick if (options) 22939316Smckusick getstdopts(options, &flags); 23039333Smckusick if (type) 23139333Smckusick getstdopts(type, &flags); 23256841Smckusick if (force) 23356841Smckusick flags |= MNT_FORCE; 23466133Spendry 23566133Spendry if (realpath(name, mntpath) == 0) { 23666133Spendry warn("%s", mntpath); 23766133Spendry return (1); 23866133Spendry } 23966133Spendry 24066133Spendry name = mntpath; 24166133Spendry 24266131Spendry if (strcmp(name, "/") == 0) 24366131Spendry flags |= MNT_UPDATE; 24466131Spendry 24539316Smckusick switch (mnttype) { 24639316Smckusick case MOUNT_UFS: 24739333Smckusick if (mntopts) 24839333Smckusick getufsopts(mntopts, &flags); 24939316Smckusick if (options) 25039316Smckusick getufsopts(options, &flags); 25139316Smckusick args.fspec = spec; 25266138Sbostic #define DEFAULT_ROOTUID -2 25365714Shibler args.export.ex_root = DEFAULT_ROOTUID; 25441403Smckusick if (flags & MNT_RDONLY) 25565714Shibler args.export.ex_flags = MNT_EXRDONLY; 25640496Smckusick else 25765714Shibler args.export.ex_flags = 0; 25839316Smckusick argp = (caddr_t)&args; 25939316Smckusick break; 26052110Smckusick case MOUNT_MFS: 26139316Smckusick case MOUNT_NFS: 26239322Smckusick default: 26339322Smckusick argv[0] = mntname; 26439329Smckusick argc = 1; 26539322Smckusick if (flags) { 26639322Smckusick argv[argc++] = "-F"; 26766138Sbostic (void)snprintf(flagval, sizeof(flagval), "%d", flags); 26839322Smckusick argv[argc++] = flagval; 26939322Smckusick } 27039333Smckusick if (mntopts) 27139333Smckusick argc += getexecopts(mntopts, &argv[argc]); 27239329Smckusick if (options) 27339329Smckusick argc += getexecopts(options, &argv[argc]); 27439316Smckusick argv[argc++] = spec; 27539316Smckusick argv[argc++] = name; 27639521Smckusick argv[argc++] = NULL; 27766138Sbostic snprintf(execname, sizeof(execname), 27866138Sbostic "%s/mount_%s", _PATH_EXECDIR, mntname); 27939316Smckusick if (verbose) { 28042253Sbostic (void)printf("exec: %s", execname); 28142253Sbostic for (i = 1; i < argc - 1; i++) 28242253Sbostic (void)printf(" %s", argv[i]); 28342253Sbostic (void)printf("\n"); 28439316Smckusick } 28556841Smckusick if (debug) 28639316Smckusick break; 28742253Sbostic if (pid = vfork()) { 28842253Sbostic if (pid == -1) { 28966131Spendry warn("vfork starting file system"); 29039316Smckusick return (1); 29139131Smckusick } 29266130Spendry if (waitpid(pid, &status, 0) != -1 && 29339316Smckusick WIFEXITED(status) && 29439316Smckusick WEXITSTATUS(status) != 0) 29539316Smckusick return (WEXITSTATUS(status)); 29639322Smckusick spec = mntname; 29739316Smckusick goto out; 29839316Smckusick } 29966130Spendry execv(execname, argv); 30066131Spendry err(1, "cannot exec %s for %s", execname, name); 30139316Smckusick /* NOTREACHED */ 30238632Smckusick 30339316Smckusick } 30456841Smckusick if (!debug && mount(mnttype, name, flags, argp)) { 30566138Sbostic (void)fprintf(stderr, "%s on %s: ", spec, name); 30639316Smckusick switch (errno) { 30739316Smckusick case EMFILE: 30866139Sbostic (void)fprintf(stderr, "Mount table full.\n"); 30939316Smckusick break; 31039316Smckusick case EINVAL: 31141403Smckusick if (flags & MNT_UPDATE) 31266138Sbostic (void)fprintf(stderr, "Specified device %s\n", 31345689Smckusick "does not match mounted device"); 31445569Skarels else if (mnttype == MOUNT_UFS) 31566138Sbostic (void)fprintf(stderr, "Bogus super block\n"); 31639333Smckusick else 31766138Sbostic perror(NULL); 31839316Smckusick break; 31939316Smckusick default: 32066138Sbostic perror(NULL); 32139316Smckusick break; 3224460Sroot } 32366130Spendry return (1); 3244460Sroot } 32535339Sbostic 32666138Sbostic out: if (verbose) 32739316Smckusick prmount(spec, name, flags); 32866130Spendry return (0); 3291057Sbill } 33035339Sbostic 33166138Sbostic void 33239316Smckusick prmount(spec, name, flags) 33339316Smckusick char *spec, *name; 33466130Spendry int flags; 33535339Sbostic { 33666130Spendry int first; 33738632Smckusick 33842253Sbostic (void)printf("%s on %s", spec, name); 33942253Sbostic if (!(flags & MNT_VISFLAGMASK)) { 34042253Sbostic (void)printf("\n"); 34142253Sbostic return; 34242253Sbostic } 34342253Sbostic first = 0; 34442253Sbostic #define PR(msg) (void)printf("%s%s", !first++ ? " (" : ", ", msg) 34541403Smckusick if (flags & MNT_RDONLY) 34642253Sbostic PR("read-only"); 34741403Smckusick if (flags & MNT_NOEXEC) 34842253Sbostic PR("noexec"); 34941403Smckusick if (flags & MNT_NOSUID) 35042253Sbostic PR("nosuid"); 35141403Smckusick if (flags & MNT_NODEV) 35242253Sbostic PR("nodev"); 35341403Smckusick if (flags & MNT_SYNCHRONOUS) 35442253Sbostic PR("synchronous"); 35565609Smckusick if (flags & MNT_ASYNC) 35665609Smckusick PR("asynchronous"); 35741403Smckusick if (flags & MNT_QUOTA) 35842253Sbostic PR("with quotas"); 35941403Smckusick if (flags & MNT_LOCAL) 36042253Sbostic PR("local"); 361*66171Spendry if (flags & MNT_USER) 362*66171Spendry PR("user mount"); 36355394Spendry if (flags & MNT_UNION) 36455394Spendry PR("union"); 36541403Smckusick if (flags & MNT_EXPORTED) 36652110Smckusick PR("NFS exported"); 36742253Sbostic (void)printf(")\n"); 36835339Sbostic } 36935339Sbostic 37066138Sbostic int 37139133Smckusick getmnttype(fstype) 37239133Smckusick char *fstype; 37339133Smckusick { 37439133Smckusick 37539322Smckusick mntname = fstype; 37666138Sbostic return (strcmp(fstype, "ufs") == 0 ? MOUNT_UFS : 0); 37739133Smckusick } 37839133Smckusick 37966138Sbostic void 38039316Smckusick getstdopts(options, flagp) 38139316Smckusick char *options; 38242253Sbostic int *flagp; 38339316Smckusick { 38439316Smckusick int negative; 38566138Sbostic char *opt, optbuf[BUFSIZ]; 38639316Smckusick 38742253Sbostic (void)strcpy(optbuf, options); 38866138Sbostic for (opt = strtok(optbuf, ","); opt; opt = strtok(NULL, ",")) { 38965852Smckusick if (opt[0] == '-') 39065852Smckusick continue; 39139316Smckusick if (opt[0] == 'n' && opt[1] == 'o') { 39239316Smckusick negative++; 39339316Smckusick opt += 2; 39466138Sbostic } else 39539316Smckusick negative = 0; 39639333Smckusick if (!negative && !strcasecmp(opt, FSTAB_RO)) { 39741403Smckusick *flagp |= MNT_RDONLY; 39839333Smckusick continue; 39939333Smckusick } 40039333Smckusick if (!negative && !strcasecmp(opt, FSTAB_RW)) { 40141403Smckusick *flagp &= ~MNT_RDONLY; 40239333Smckusick continue; 40339333Smckusick } 40439316Smckusick if (!strcasecmp(opt, "exec")) { 40539316Smckusick if (negative) 40641403Smckusick *flagp |= MNT_NOEXEC; 40739333Smckusick else 40841403Smckusick *flagp &= ~MNT_NOEXEC; 40939316Smckusick continue; 41039316Smckusick } 41139316Smckusick if (!strcasecmp(opt, "suid")) { 41239316Smckusick if (negative) 41341403Smckusick *flagp |= MNT_NOSUID; 41439333Smckusick else 41541403Smckusick *flagp &= ~MNT_NOSUID; 41639316Smckusick continue; 41739316Smckusick } 41839316Smckusick if (!strcasecmp(opt, "dev")) { 41939316Smckusick if (negative) 42041403Smckusick *flagp |= MNT_NODEV; 42139333Smckusick else 42241403Smckusick *flagp &= ~MNT_NODEV; 42339316Smckusick continue; 42439316Smckusick } 42539316Smckusick if (!strcasecmp(opt, "synchronous")) { 42639316Smckusick if (!negative) 42741403Smckusick *flagp |= MNT_SYNCHRONOUS; 42839333Smckusick else 42941403Smckusick *flagp &= ~MNT_SYNCHRONOUS; 43039316Smckusick continue; 43139316Smckusick } 43265609Smckusick if (!strcasecmp(opt, "asynchronous")) { 43365609Smckusick if (!negative) 43465609Smckusick *flagp |= MNT_ASYNC; 43565609Smckusick else 43665609Smckusick *flagp &= ~MNT_ASYNC; 43765609Smckusick continue; 43865609Smckusick } 43955394Spendry if (!strcasecmp(opt, "union")) { 44055394Spendry if (!negative) 44155394Spendry *flagp |= MNT_UNION; 44255394Spendry else 44355394Spendry *flagp &= ~MNT_UNION; 44455394Spendry continue; 44555394Spendry } 44666138Sbostic (void)fprintf(stderr, "mount: %s: unknown option\n", opt); 44739316Smckusick } 44839316Smckusick } 44939316Smckusick 45042253Sbostic /* ARGSUSED */ 45166138Sbostic void 45239131Smckusick getufsopts(options, flagp) 45339131Smckusick char *options; 45442253Sbostic int *flagp; 45539131Smckusick { 45666130Spendry 45739131Smckusick return; 45839131Smckusick } 45939131Smckusick 46066138Sbostic int 46139329Smckusick getexecopts(options, argv) 46266138Sbostic char *options, **argv; 46339131Smckusick { 46466138Sbostic int argc; 46566130Spendry char *opt; 46639131Smckusick 46766138Sbostic argc = 0; 46866138Sbostic for (opt = strtok(options, ","); opt; opt = strtok(NULL, ",")) { 46939131Smckusick if (opt[0] != '-') 47039131Smckusick continue; 47139131Smckusick argv[argc++] = opt; 47239131Smckusick if (opt[2] == '\0' || opt[2] != '=') 47339131Smckusick continue; 47439131Smckusick opt[2] = '\0'; 47539131Smckusick argv[argc++] = &opt[3]; 47639131Smckusick } 47739131Smckusick return (argc); 47839131Smckusick } 47939131Smckusick 48066138Sbostic struct statfs * 48139465Smckusick getmntpt(name) 48239465Smckusick char *name; 48339465Smckusick { 48439465Smckusick struct statfs *mntbuf; 48566138Sbostic long i, mntsize; 48639465Smckusick 48740337Smckusick mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); 48839465Smckusick for (i = 0; i < mntsize; i++) { 48939465Smckusick if (!strcmp(mntbuf[i].f_mntfromname, name) || 49039465Smckusick !strcmp(mntbuf[i].f_mntonname, name)) 49139465Smckusick return (&mntbuf[i]); 49239465Smckusick } 49366138Sbostic return (NULL); 49439465Smckusick } 49539465Smckusick 49666138Sbostic int 49740051Smckusick badvfstype(vfstype, vfslist) 49866130Spendry int vfstype; 49940051Smckusick char **vfslist; 50040051Smckusick { 50140051Smckusick 50266138Sbostic if (vfslist == NULL) 50366130Spendry return (0); 50466138Sbostic while (*vfslist != NULL) { 50540844Smckusick if (vfstype == getmnttype(*vfslist)) 50666130Spendry return (skipvfs); 50740051Smckusick vfslist++; 50840051Smckusick } 50940051Smckusick return (!skipvfs); 51040051Smckusick } 51140051Smckusick 51266138Sbostic int 51340844Smckusick badvfsname(vfsname, vfslist) 51440844Smckusick char *vfsname; 51540844Smckusick char **vfslist; 51640844Smckusick { 51740844Smckusick 51866138Sbostic if (vfslist == NULL) 51966130Spendry return (0); 52066138Sbostic while (*vfslist != NULL) { 52140844Smckusick if (strcmp(vfsname, *vfslist) == 0) 52266130Spendry return (skipvfs); 52340844Smckusick vfslist++; 52440844Smckusick } 52540844Smckusick return (!skipvfs); 52640844Smckusick } 52740844Smckusick 52866138Sbostic char ** 52940051Smckusick makevfslist(fslist) 53040051Smckusick char *fslist; 53140051Smckusick { 53266138Sbostic int i; 53366130Spendry char **av, *nextcp; 53440051Smckusick 53540051Smckusick if (fslist == NULL) 53640051Smckusick return (NULL); 53740051Smckusick if (fslist[0] == 'n' && fslist[1] == 'o') { 53840051Smckusick fslist += 2; 53940051Smckusick skipvfs = 1; 54040051Smckusick } 54140051Smckusick for (i = 0, nextcp = fslist; *nextcp; nextcp++) 54240051Smckusick if (*nextcp == ',') 54340051Smckusick i++; 54466138Sbostic av = malloc((size_t)(i + 2) * sizeof(char *)); 54540051Smckusick if (av == NULL) 54640051Smckusick return (NULL); 54740051Smckusick nextcp = fslist; 54840051Smckusick i = 0; 54940051Smckusick av[i++] = nextcp; 55066138Sbostic while ((nextcp = index(nextcp, ',')) != NULL) { 55140051Smckusick *nextcp++ = '\0'; 55240051Smckusick av[i++] = nextcp; 55340051Smckusick } 55466138Sbostic av[i++] = NULL; 55540051Smckusick return (av); 55640051Smckusick } 55766138Sbostic 55866138Sbostic void 55966138Sbostic usage() 56066138Sbostic { 56166138Sbostic 56266138Sbostic (void)fprintf(stderr, 563*66171Spendry "usage: %s %s\n %s\n %s\n", 564*66171Spendry "mount [-dfruvw] [-t ufs | external_type]", 565*66171Spendry "[-o options] special node", 566*66171Spendry "mount [-adfruvw] [-t ufs | external_type]", 567*66171Spendry "mount [-dfruvw] special | node"); 56866138Sbostic exit(1); 56966138Sbostic } 570