projects
/
platform
/
upstream
/
toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25fe0e0
)
Fix mount --move bug.
author
Rob Landley
<rob@landley.net>
Mon, 8 Sep 2014 00:30:05 +0000
(19:30 -0500)
committer
Rob Landley
<rob@landley.net>
Mon, 8 Sep 2014 00:30:05 +0000
(19:30 -0500)
toys/pending/mount.c
patch
|
blob
|
history
diff --git
a/toys/pending/mount.c
b/toys/pending/mount.c
index
53b16bc
..
4962df3
100644
(file)
--- a/
toys/pending/mount.c
+++ b/
toys/pending/mount.c
@@
-139,7
+139,11
@@
static void mount_filesystem(char *dev, char *dir, char *type,
}
// 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.