]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
eject: call umount <mountpoint> rather than <device>
authorKarel Zak <kzak@redhat.com>
Wed, 28 Mar 2012 12:24:57 +0000 (14:24 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 28 Mar 2012 12:24:57 +0000 (14:24 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/eject.c

index 2fd47c3ac09cb6dc2e72ed554c3975d837544765..c814894268a31bb5f83696c87523f700d514d139 100644 (file)
@@ -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