]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
eject: inform why open failed
authorSami Kerola <kerolasa@iki.fi>
Thu, 5 Apr 2012 20:40:47 +0000 (22:40 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 10 Apr 2012 10:21:33 +0000 (12:21 +0200)
Mostly to cover common case when user does not have permission to use
eject.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sys-utils/eject.c

index 245c02836518c7daf8aeec591d7d1a2102372883..aa45c181c19a2d2c71d6f41509fc407296a59e47 100644 (file)
@@ -673,7 +673,7 @@ static int open_device(const char *name)
        if (fd < 0)
                fd = open(name, O_RDONLY|O_NONBLOCK);
        if (fd == -1)
-               errx(EXIT_FAILURE, _("%s: open failed"), name);
+               err(EXIT_FAILURE, _("%s: open failed"), name);
        return fd;
 }