projects
/
platform
/
upstream
/
toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6634e46
)
Don't close device handle until after calling flush ioctls, reported by Ashwini Sharma.
author
Rob Landley
<rob@landley.net>
Mon, 8 Sep 2014 13:40:06 +0000
(08:40 -0500)
committer
Rob Landley
<rob@landley.net>
Mon, 8 Sep 2014 13:40:06 +0000
(08:40 -0500)
toys/other/nbd_client.c
patch
|
blob
|
history
diff --git
a/toys/other/nbd_client.c
b/toys/other/nbd_client.c
index
33787d7
..
6b437c7
100644
(file)
--- a/
toys/other/nbd_client.c
+++ b/
toys/other/nbd_client.c
@@
-119,10
+119,9
@@
void nbd_client_main(void)
if (ioctl(nbd, NBD_DO_IT)>=0 || errno==EBADR) break;
close(sock);
}
- close(nbd);
// Flush queue and exit.
-
ioctl(nbd, NBD_CLEAR_QUE);
ioctl(nbd, NBD_CLEAR_SOCK);
+ if (CFG_TOYBOX_FREE) close(nbd);
}