diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2009-10-26 23:27:08 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-27 17:17:34 +0100 |
commit | a48308701a4d89d7cc0d0557cfabaec94a0bb3b0 (patch) | |
tree | a7b2baa086249a6c37c3479f28f4a680a1133a64 /miscutils | |
parent | ca254490d703c750390042c9afa21d1537c90e9a (diff) |
add and use xopen_nonblocking (-18b)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/eject.c | 2 | ||||
-rw-r--r-- | miscutils/hdparm.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/miscutils/eject.c b/miscutils/eject.c index 75618bea6..adff9e0e2 100644 --- a/miscutils/eject.c +++ b/miscutils/eject.c @@ -103,7 +103,7 @@ int eject_main(int argc UNUSED_PARAM, char **argv) eject /dev/cdrom */ - xmove_fd(xopen(device, O_RDONLY|O_NONBLOCK), dev_fd); + xmove_fd(xopen_nonblocking(device), dev_fd); if (ENABLE_FEATURE_EJECT_SCSI && (flags & FLAG_SCSI)) eject_scsi(device); diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 65c11ec79..c4d2f3b03 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c @@ -1552,8 +1552,8 @@ static void process_dev(char *devname) unsigned char args[4] = { WIN_SETFEATURES, 0, 0, 0 }; const char *fmt = " %s\t= %2ld"; - /*fd = xopen(devname, O_RDONLY | O_NONBLOCK);*/ - xmove_fd(xopen(devname, O_RDONLY | O_NONBLOCK), fd); + /*fd = xopen_nonblocking(devname);*/ + xmove_fd(xopen_nonblocking(devname), fd); printf("\n%s:\n", devname); if (getset_readahead == IS_SET) { |