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>
This commit is contained in:
Sami Kerola 2012-04-05 22:40:47 +02:00 committed by Karel Zak
parent 958d2b712a
commit 38de283e35
1 changed files with 1 additions and 1 deletions

View 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;
}