projects
/
platform
/
upstream
/
libatasmart.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10257ca
)
use O_NONBLOCK mode when opening device
author
Lennart Poettering
<lennart@poettering.net>
Tue, 7 Apr 2009 19:39:37 +0000
(21:39 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 7 Apr 2009 19:39:37 +0000
(21:39 +0200)
atasmart.c
patch
|
blob
|
history
diff --git
a/atasmart.c
b/atasmart.c
index
44e095d
..
c778831
100644
(file)
--- a/
atasmart.c
+++ b/
atasmart.c
@@
-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;
}