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:
parent
958d2b712a
commit
38de283e35
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue