Work around media detection problems
authorDavid Zeuthen <davidz@redhat.com>
Tue, 7 Jul 2009 00:57:28 +0000 (20:57 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Tue, 7 Jul 2009 00:57:28 +0000 (20:57 -0400)
commitf4fd9ea976f6baad2a7b876bc2509c04bfaeb1c6
tree0c7c66f454c7b2ba34b036432d03b8a1b254fdae
parent532742921eb77ddf189e5d3bfff16cbdb5a38a69
Work around media detection problems

Seems that the kernel won't revalidate media unless O_NONBLOCK is
passed. This contradicts how things are supposed to work (O_NONBLOCK
is a hint to avoid testing things like media state), see
http://bugzilla.kernel.org/show_bug.cgi?id=13029 for more information.

So to be on the safe side, open the device both with and without
O_NONBLOCK.
src/devkit-disks-poller.c