chiark / gitweb /
ata_id: open volume O_NONBLOCK
[elogind.git] / extras / ata_id / ata_id.c
index 9579db310593b5608493efd003808800f7265d8e..ba40555a0b1040c3b41209ea8be484b81569a9b8 100644 (file)
@@ -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;