summaryrefslogtreecommitdiffstats
path: root/sys-utils/eject.c
diff options
context:
space:
mode:
authorSami Kerola2012-04-05 22:40:47 +0200
committerKarel Zak2012-04-10 12:21:33 +0200
commit38de283e352714fc1462cffb91b41f8f1a3fc7f8 (patch)
tree92fba920cd588356237efa022266e4fb3c1c097d /sys-utils/eject.c
parentstrutils: return success on test program (diff)
downloadkernel-qcow2-util-linux-38de283e352714fc1462cffb91b41f8f1a3fc7f8.tar.gz
kernel-qcow2-util-linux-38de283e352714fc1462cffb91b41f8f1a3fc7f8.tar.xz
kernel-qcow2-util-linux-38de283e352714fc1462cffb91b41f8f1a3fc7f8.zip
eject: inform why open failed
Mostly to cover common case when user does not have permission to use eject. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/eject.c')
-rw-r--r--sys-utils/eject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/eject.c b/sys-utils/eject.c
index 245c02836..aa45c181c 100644
--- a/sys-utils/eject.c
+++ b/sys-utils/eject.c
@@ -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;
}