mount: prevent second mount -a from mounting everything again

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2009-12-05 04:25:19 +01:00
parent 14b0f4feb3
commit a7329667b4
2 changed files with 59 additions and 21 deletions

View File

@@ -167,10 +167,9 @@ int df_main(int argc UNUSED_PARAM, char **argv)
continue;
#ifdef WHY_WE_DO_IT_FOR_DEV_ROOT_ONLY
/* ... and also this is the only user of find_block_device */
if (strcmp(device, "/dev/root") == 0) {
/* Adjusts device to be the real root device,
* or leaves device alone if it can't find it */
* or leaves device alone if it can't find it */
device = find_block_device("/");
if (!device) {
goto set_error;