summaryrefslogtreecommitdiff
path: root/mount/umount.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2006-12-07 00:26:28 +0100
committerKarel Zak <kzak@redhat.com>2006-12-07 00:26:28 +0100
commit5213517f54c70a784c06ee85c066aa2b4f375c4b (patch)
treebd0b55ed9621bf27f70fc2e338a9816496246beb /mount/umount.c
parentb22550fa1506e7cf4101bacc694842678908aaf2 (diff)
downloadutil-linux-old-5213517f54c70a784c06ee85c066aa2b4f375c4b.tar.gz
Imported from util-linux-2.12l tarball.
Diffstat (limited to 'mount/umount.c')
-rw-r--r--mount/umount.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mount/umount.c b/mount/umount.c
index 34ca1084..15d94f93 100644
--- a/mount/umount.c
+++ b/mount/umount.c
@@ -549,6 +549,11 @@ umount_file (char *arg) {
int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group;
int ok;
+ if (!*arg) { /* "" would be expanded to `pwd` */
+ die(2, _("Cannot umount \"\"\n"));
+ return 0;
+ }
+
file = canonicalize(arg); /* mtab paths are canonicalized */
if (verbose > 1)
printf(_("Trying to umount %s\n"), file);