diff options
author | Kay Sievers <kay.sievers@suse.de> | 2005-09-16 21:23:36 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2005-09-16 21:23:36 +0200 |
commit | 3515c0ad001731edd9a1cbf6e3d9a3161d37eb4b (patch) | |
tree | 5db7fb625b53dc908a00cc6181afb23c940e28bb /extras | |
parent | 4b12433517bfb1a4cdf4eecc5102f2cc5e1e6288 (diff) |
ata_id: open volume O_NONBLOCK
Opticals like that and should be ok for disks too, as long as we
don't read().
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'extras')
-rw-r--r-- | extras/ata_id/ata_id.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/extras/ata_id/ata_id.c b/extras/ata_id/ata_id.c index 9579db3105..ba40555a0b 100644 --- a/extras/ata_id/ata_id.c +++ b/extras/ata_id/ata_id.c @@ -122,10 +122,7 @@ int main(int argc, char *argv[]) goto exit; } - fd = open(node, O_RDONLY); - if (fd < 0) - if (errno == ENOMEDIUM) - fd = open(node, O_RDONLY|O_NONBLOCK); + fd = open(node, O_RDONLY|O_NONBLOCK); if (fd < 0) { err("unable to open '%s'", node); rc = 1; |