summaryrefslogtreecommitdiff
path: root/util-linux/mount.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-03 23:52:41 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-03 23:52:41 +0000
commit32d49bc70fa544c45421ae475b38b412e610e278 (patch)
tree964eb7c919ac3712f0a072bf2adbb70d1ca6f22d /util-linux/mount.c
parentc85bfcad5206598e7a1dc82c2144f3129518f7d6 (diff)
downloadbusybox-w32-32d49bc70fa544c45421ae475b38b412e610e278.tar.gz
busybox-w32-32d49bc70fa544c45421ae475b38b412e610e278.tar.bz2
busybox-w32-32d49bc70fa544c45421ae475b38b412e610e278.zip
mkswap: do not do extra seek
mount: add another mount helper call method
Diffstat (limited to 'util-linux/mount.c')
-rw-r--r--util-linux/mount.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 4ac52cd02..5e6c3ba72 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -309,6 +309,27 @@ static int mount_it_now(struct mntent *mp, int vfsflags, char *filteropts)
309 for (;;) { 309 for (;;) {
310 rc = mount(mp->mnt_fsname, mp->mnt_dir, mp->mnt_type, 310 rc = mount(mp->mnt_fsname, mp->mnt_dir, mp->mnt_type,
311 vfsflags, filteropts); 311 vfsflags, filteropts);
312
313 // If mount failed, try
314 // helper program <mnt_type>
315 if (ENABLE_FEATURE_MOUNT_HELPERS && rc) {
316 char *args[6];
317 int errno_save = errno;
318 args[0] = mp->mnt_type;
319 rc = 1;
320 if (filteropts) {
321 args[rc++] = (char *)"-o";
322 args[rc++] = filteropts;
323 }
324 args[rc++] = mp->mnt_fsname;
325 args[rc++] = mp->mnt_dir;
326 args[rc] = NULL;
327 rc = wait4pid(spawn(args));
328 if (!rc)
329 break;
330 errno = errno_save;
331 }
332
312 if (!rc || (vfsflags & MS_RDONLY) || (errno != EACCES && errno != EROFS)) 333 if (!rc || (vfsflags & MS_RDONLY) || (errno != EACCES && errno != EROFS))
313 break; 334 break;
314 if (!(vfsflags & MS_SILENT)) 335 if (!(vfsflags & MS_SILENT))