summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2000-09-25 21:47:47 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2000-09-25 21:47:47 (GMT)
commitc5ec7c6af50138c9c6ac5833548cc5e7850fd4a6 (patch)
treed18aa3e2876efb8c65ebf02dae3f8a7acd603e30
parent9fe2864f594c70e001363b749995bbbdfe58ce58 (diff)
downloadautofs3-c5ec7c6af50138c9c6ac5833548cc5e7850fd4a6.zip
autofs3-c5ec7c6af50138c9c6ac5833548cc5e7850fd4a6.tar.gz
autofs3-c5ec7c6af50138c9c6ac5833548cc5e7850fd4a6.tar.bz2
autofs3-c5ec7c6af50138c9c6ac5833548cc5e7850fd4a6.tar.xz
Update to use new syntax "mount --bind" instead of "mount -t bind".
-rw-r--r--modules/mount_bind.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/modules/mount_bind.c b/modules/mount_bind.c
index 18ed071..5eb45b7 100644
--- a/modules/mount_bind.c
+++ b/modules/mount_bind.c
@@ -56,23 +56,17 @@ int mount_mount(const char *root, const char *name, int name_len,
return 1;
}
- if ( options ) {
- syslog(LOG_DEBUG, MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
- fstype, options, what, fullpath);
- err = spawnl(LOG_NOTICE, PATH_MOUNT, PATH_MOUNT, "-t", fstype,
- SLOPPYOPT "-o", options, what, fullpath, NULL);
- } else {
- syslog(LOG_DEBUG, MODPREFIX "calling mount -t %s %s %s",
- fstype, what, fullpath);
- err = spawnl(LOG_NOTICE, PATH_MOUNT, PATH_MOUNT, "-t", fstype,
- what, fullpath, NULL);
- }
+ syslog(LOG_DEBUG, MODPREFIX "calling mount --bind %s %s",
+ fstype, what, fullpath);
+ err = spawnl(LOG_NOTICE, PATH_MOUNT, PATH_MOUNT, "--bind",
+ what, fullpath, NULL);
+
if ( err ) {
if ( rmdir(fullpath) && errno == EBUSY )
return 0;
- syslog(LOG_DEBUG, MODPREFIX "failed to mount %s (type %s) on %s, trying symlink",
- what, fstype, fullpath);
+ syslog(LOG_DEBUG, MODPREFIX "failed to mount --bind %s on %s, trying symlink",
+ what, fullpath);
if ( symlink(what, fullpath) && errno != EEXIST ) {
syslog(LOG_NOTICE, MODPREFIX "failed to create local mount %s -> %s", fullpath, what);