diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-04-07 21:39:37 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-04-07 21:39:37 +0200 |
commit | 619a39ab3190060286edd83142b4e46bb328ba07 (patch) | |
tree | 143162f80567416f4ba577c4e90c93324df38747 /atasmart.c | |
parent | 10257ca6c9182a4dcbb5403ce5ec4a27e1c9e447 (diff) | |
download | libatasmart-619a39ab3190060286edd83142b4e46bb328ba07.tar.gz |
use O_NONBLOCK mode when opening device
Diffstat (limited to 'atasmart.c')
-rw-r--r-- | atasmart.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1919,7 +1919,13 @@ int sk_disk_open(const char *name, SkDisk **_d) { goto fail; } - if ((d->fd = open(name, O_RDONLY|O_NOCTTY)) < 0) { + if ((d->fd = open(name, + O_RDONLY|O_NOCTTY|O_NONBLOCK +#ifdef O_CLOEXEC + |O_CLOEXEC +#endif + + )) < 0) { ret = d->fd; goto fail; } |