summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/mount.c')
-rw-r--r--mdk-stage1/mount.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mdk-stage1/mount.c b/mdk-stage1/mount.c
index 7ee55832f..bcdc069ca 100644
--- a/mdk-stage1/mount.c
+++ b/mdk-stage1/mount.c
@@ -172,8 +172,10 @@ int my_mount(char *dev, char *location, char *fs)
rc = mount(dev, location, fs, flags, opts);
- if (rc != 0)
- log_perror(dev);
+ if (rc != 0) {
+ log_perror("mount failed");
+ rmdir(location);
+ }
return rc;
}