FreeBSD Bugzilla – Attachment 79233 Details for
Bug 113838
[patch] [request] mount(8): add support for relative pathnames
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.69 KB, created by
Ighighi
on 2007-06-18 21:30:04 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Ighighi
Created:
2007-06-18 21:30:04 UTC
Size:
1.69 KB
patch
obsolete
>--- src/sbin/mount/mount.c.orig Wed Feb 7 00:01:41 2007 >+++ src/sbin/mount/mount.c Mon Jun 18 16:08:01 2007 >@@ -155,6 +155,7 @@ > pid_t pid; > int all, ch, i, init_flags, late, mntsize, rval, have_fstab, ro; > char *cp, *ep, *options; >+ char *arg1, tryargv[PATH_MAX]; > > all = init_flags = late = 0; > ro = 0; >@@ -267,12 +268,17 @@ > if (vfslist != NULL) > usage(); > >- rmslashes(*argv, *argv); >+ arg1 = *argv; >+ rmslashes(arg1, arg1); > if (init_flags & MNT_UPDATE) { > mntfromname = NULL; > have_fstab = 0; >- if ((mntbuf = getmntpt(*argv)) == NULL) >- errx(1, "not currently mounted %s", *argv); >+ if ((mntbuf = getmntpt(arg1)) == NULL) { >+ if (realpath(arg1, tryargv) == NULL || >+ (mntbuf = getmntpt(tryargv)) == NULL) >+ errx(1, "not currently mounted %s", arg1); >+ arg1 = tryargv; >+ } > /* > * Only get the mntflags from fstab if both mntpoint > * and mntspec are identical. Also handle the special >@@ -306,13 +312,18 @@ > mntbuf->f_mntonname, init_flags, options, 0); > break; > } >- if ((fs = getfsfile(*argv)) == NULL && >- (fs = getfsspec(*argv)) == NULL) >- errx(1, "%s: unknown special file or file system", >- *argv); >+tryagain: >+ if ((fs = getfsfile(arg1)) == NULL && >+ (fs = getfsspec(arg1)) == NULL) { >+ if (arg1 == tryargv || realpath(arg1, tryargv) == NULL) >+ errx(1, "%s: unknown special file or file system", >+ arg1); >+ arg1 = tryargv; >+ goto tryagain; >+ >+ } > if (BADTYPE(fs->fs_type)) >- errx(1, "%s has unknown file system type", >- *argv); >+ errx(1, "%s has unknown file system type", arg1); > rval = mountfs(fs->fs_vfstype, fs->fs_spec, fs->fs_file, > init_flags, options, fs->fs_mntops); > break;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 113838
: 79233