Lines Matching refs:mnt

168 	struct mnttab mnt;
229 mnt.mnt_special = argv[optind];
230 mnt.mnt_mountp = argv[optind+1];
231 mnt.mnt_fstype = fstype;
251 mnt.mnt_mntopts = opts;
252 if (findopt(mnt.mnt_mntopts, "m"))
254 if ((gflg || findopt(mnt.mnt_mntopts, MNTOPT_GLOBAL)) &&
255 findopt(mnt.mnt_mntopts, MNTOPT_NBMAND)) {
265 if (findopt(mnt.mnt_mntopts, MNTOPT_RQ)) {
266 rmopt(&mnt, MNTOPT_RQ);
270 mountfs(&mnt);
414 mountfs(struct mnttab *mnt)
425 (void) strcpy(opts, mnt->mnt_mntopts);
429 flags |= eatmntopt(mnt, MNTOPT_RO) ? MS_RDONLY : 0;
430 flags |= eatmntopt(mnt, MNTOPT_REMOUNT) ? MS_REMOUNT : 0;
431 flags |= eatmntopt(mnt, MNTOPT_GLOBAL) ? MS_GLOBAL : 0;
433 if (eatmntopt(mnt, MNTOPT_NOINTR))
435 if (eatmntopt(mnt, MNTOPT_INTR))
437 if (eatmntopt(mnt, MNTOPT_SYNCDIR))
439 if (eatmntopt(mnt, MNTOPT_FORCEDIRECTIO)) {
443 if (eatmntopt(mnt, MNTOPT_NOFORCEDIRECTIO)) {
447 if (eatmntopt(mnt, MNTOPT_NOSETSEC))
449 if (eatmntopt(mnt, MNTOPT_LARGEFILES))
451 if (eatmntopt(mnt, MNTOPT_NOLARGEFILES))
454 (void) eatmntopt(mnt, MNTOPT_LOGGING);
455 if (eatmntopt(mnt, MNTOPT_NOLOGGING))
457 if (eatmntopt(mnt, MNTOPT_NOATIME))
459 if (eatmntopt(mnt, MNTOPT_DFRATIME))
461 if (eatmntopt(mnt, MNTOPT_NODFRATIME))
525 replace_opts(mnt->mnt_mntopts, 1, MNTOPT_RW, MNTOPT_RO);
527 fixopts(mnt, opts);
534 if (gflg || findopt(mnt->mnt_mntopts, MNTOPT_GLOBAL)) {
536 if (mnt->mnt_mntopts != '\0')
537 (void) strcat(mnt->mnt_mntopts, ",");
538 (void) strcat(mnt->mnt_mntopts, MNTOPT_LOGGING);
545 if (mnt->mnt_mntopts != '\0')
546 (void) strcat(mnt->mnt_mntopts, ",");
547 (void) strcat(mnt->mnt_mntopts, MNTOPT_NOLOGGING);
552 again: if (mount(mnt->mnt_special, mnt->mnt_mountp, flags, fstype,
553 &args, sizeof (args), mnt->mnt_mntopts, MAX_MNTOPT_STR) != 0) {
563 if (!in_mnttab(mnt->mnt_mountp) &&
569 rpterr(mnt->mnt_special, mnt->mnt_mountp);
575 enable_logging(mnt->mnt_mountp, mnt->mnt_special);
577 disable_logging(mnt->mnt_mountp, mnt->mnt_special);
581 cmp_requested_to_actual_options(opts, mnt->mnt_mntopts,
582 mnt->mnt_special, mnt->mnt_mountp);
585 if (checkislog(mnt->mnt_mountp)) {
592 if (stat64(mnt->mnt_mountp, &statb) != 0)
597 mtdesc.mtd_mntpt = mnt->mnt_mountp;
616 eatmntopt(struct mnttab *mnt, char *opt)
620 has = (findopt(mnt->mnt_mntopts, opt) != NULL);
621 rmopt(mnt, opt);
629 rmopt(struct mnttab *mnt, char *opt)
634 while (optstart = findopt(mnt->mnt_mntopts, opt)) {
641 } else if (optstart != mnt->mnt_mntopts) {
650 * mnt->mnt_ops has un-eaten opts, opts is the original opts list.
651 * Set mnt->mnt_opts to the original, the kernel will then remove
660 fixopts(struct mnttab *mnt, char *opts)
677 (void) strlcpy(mnt->mnt_mntopts, opts, MAX_MNTOPT_STR);
678 rmopt(mnt, "f");
679 rmopt(mnt, MNTOPT_REMOUNT);