From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 1/3] eject: inform why open failed
Date: Thu, 5 Apr 2012 22:40:47 +0200 [thread overview]
Message-ID: <1333658449-20112-1-git-send-email-kerolasa@iki.fi> (raw)
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-utils/eject.c b/sys-utils/eject.c
index 2d8b0cb..790ab3a 100644
--- a/sys-utils/eject.c
+++ b/sys-utils/eject.c
@@ -661,7 +661,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;
}
--
1.7.9.6
next reply other threads:[~2012-04-05 20:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-05 20:40 Sami Kerola [this message]
2012-04-05 20:40 ` [PATCH 2/3] eject: close open file [cppcheck] Sami Kerola
2012-04-10 10:33 ` Karel Zak
2012-04-05 20:40 ` [PATCH 3/3] docs: eject.1: align with Documentation/howto-man-page.txt Sami Kerola
2012-04-10 10:33 ` Karel Zak
2012-04-10 10:32 ` [PATCH 1/3] eject: inform why open failed Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1333658449-20112-1-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox