diff options
author | Rob Landley <rob@landley.net> | 2022-04-04 11:42:32 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2022-04-04 11:42:32 -0500 |
commit | a682f18b338d1eda088744d9b103689ff674f580 (patch) | |
tree | 1c0e1a894bb606add67ad4e2667c4263743c8ce7 | |
parent | b6eb5a16dcc1b50b20cc00b504cd03beea27e17b (diff) | |
download | toybox-a682f18b338d1eda088744d9b103689ff674f580.tar.gz |
Earlier test ensures dev isn't null when !FLAG(a), so don't test same again.
-rw-r--r-- | toys/lsb/mount.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/toys/lsb/mount.c b/toys/lsb/mount.c index 22021ab9..10e8e9e4 100644 --- a/toys/lsb/mount.c +++ b/toys/lsb/mount.c @@ -232,8 +232,7 @@ static void mount_filesystem(char *dev, char *dir, char *type, i = strlen(type); if (i) type[i-1] = 0; } - if (FLAG(v)) - printf("try '%s' type '%s' on '%s'\n", dev, type, dir); + if (FLAG(v)) printf("try '%s' type '%s' on '%s'\n", dev, type, dir); for (;;) { rc = mount(dev, dir, type, flags, opts); // Did we succeed, fail unrecoverably, or already try read-only? @@ -354,8 +353,7 @@ void mount_main(void) continue; } else { if (dir && strcmp(dir, mm->dir)) continue; - if (dev && strcmp(dev, mm->device) && (dir || strcmp(dev, mm->dir))) - continue; + if (strcmp(dev, mm->device) && (dir || strcmp(dev, mm->dir))) continue; } // Don't overmount the same dev on the same directory |