This is necessary for example when
.I /etc
is on a read-only filesystem.
+.IP "\fB\-\-no\-canonicalize\fP"
+Don't canonicalize paths. The mount command canonicalizes all paths
+(from command line or fstab) and stores canonicalized paths to the
+.IR /etc/mtab
+file. This option can be used together with the
+.B \-f
+flag for already canonicalized absolut paths.
.IP "\fB\-p, \-\-pass\-fd \fInum\fP"
In case of a loop mount with encryption, read the passphrase from
file descriptor
{ "make-rslave", 0, 0, 141 },
{ "make-rprivate", 0, 0, 142 },
{ "make-runbindable", 0, 0, 143 },
+ { "no-canonicalize", 0, 0, 144 },
{ "internal-only", 0, 0, 'i' },
{ NULL, 0, 0, 0 }
};
case 143:
mounttype = (MS_UNBINDABLE | MS_REC);
break;
-
+ case 144:
+ nocanonicalize = 1;
+ break;
case '?':
default:
usage (stderr, EX_USAGE);
int mount_quiet;
int verbose;
+int nocanonicalize;
char *progname;
char *
{
char *res;
- if (path == NULL)
+ if (!path)
return NULL;
- if (is_pseudo_fs(path))
+ if (nocanonicalize || is_pseudo_fs(path))
return xstrdup(path);
res = canonicalize_path(path);
char *canonicalize (const char *path)
{
- char *res = canonicalize_path(path);
+ char *res;
+ if (!path)
+ return NULL;
+ else if (nocanonicalize)
+ return xstrdup(path);
+
+ res = canonicalize_path(path);
if (!res)
die(EX_SYSERR, _("not enough memory"));
return res;
/* global mount, umount, and losetup variables */
extern int mount_quiet;
extern int verbose;
+extern int nocanonicalize;
extern char *progname;
#define streq(s, t) (strcmp ((s), (t)) == 0)