summaryrefslogtreecommitdiffstats
path: root/misc-utils/eject.c
diff options
context:
space:
mode:
authorKarel Zak2012-03-28 14:24:57 +0200
committerKarel Zak2012-03-28 14:24:57 +0200
commit25c30aa8b974e71270fad54f8117be612b6e83e0 (patch)
tree3f78d8e2f57fba60cdd4bb64bd4df414796c2bc7 /misc-utils/eject.c
parenteject: use libmount to detect if cdrom is mounted (diff)
downloadkernel-qcow2-util-linux-25c30aa8b974e71270fad54f8117be612b6e83e0.tar.gz
kernel-qcow2-util-linux-25c30aa8b974e71270fad54f8117be612b6e83e0.tar.xz
kernel-qcow2-util-linux-25c30aa8b974e71270fad54f8117be612b6e83e0.zip
eject: call umount <mountpoint> rather than <device>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/eject.c')
-rw-r--r--misc-utils/eject.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc-utils/eject.c b/misc-utils/eject.c
index 2fd47c3ac..c81489426 100644
--- a/misc-utils/eject.c
+++ b/misc-utils/eject.c
@@ -605,8 +605,8 @@ static int eject_tape(int fd)
}
-/* Unmount a device. */
-static void unmount_one(const char *name)
+/* umount a device. */
+static void umount_one(const char *name)
{
int status;
@@ -729,7 +729,7 @@ static void unmount_devices(const char *pattern)
status = regexec(&preg, s1, 0, 0, 0);
if (status == 0) {
verbose(_("%s: unmounting"), s1);
- unmount_one(s1);
+ umount_one(s1);
regfree(&preg);
}
}
@@ -903,7 +903,7 @@ int main(int argc, char **argv)
/* unmount device if mounted */
if ((m_option != 1) && mounted) {
verbose(_("%s: unmounting"), device);
- unmount_one(device);
+ umount_one(mountpoint);
}
/* if it is a multipartition device, unmount any other partitions on