changeset 1461:67c1402e9723 draft

Fix mount --move bug.
author Rob Landley <rob@landley.net>
date Sun, 07 Sep 2014 19:30:05 -0500
parents 94f7ec50ef50
children 83cbfc4b0de7
files toys/pending/mount.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/toys/pending/mount.c	Sun Sep 07 14:42:51 2014 -0500
+++ b/toys/pending/mount.c	Sun Sep 07 19:30:05 2014 -0500
@@ -139,7 +139,11 @@
   }
 
   // Autodetect bind mount or filesystem type
-  if (!(flags & MS_MOVE) && (!type || !strcmp(type, "auto"))) {
+
+  if (type && !strcmp(type, "auto")) type = 0;
+  if (flags & MS_MOVE) {
+    if (type) error_exit("--move with -t");
+  } else if (!type) {
     struct stat stdev, stdir;
 
     // file on file or dir on dir is a --bind mount.