Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2:Update
lvm2
improve_probing.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File improve_probing.diff of Package lvm2
Index: lib/filters/filter.c =================================================================== --- lib/filters/filter.c.orig 2009-04-27 16:15:37.000000000 +0800 +++ lib/filters/filter.c 2009-04-27 16:15:39.000000000 +0800 @@ -13,6 +13,12 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <sys/ioctl.h> +#include <linux/fs.h> +#undef MAJOR +#undef MINOR +#undef MKDEV + #include "lib.h" #include "dev-cache.h" #include "filter.h" @@ -103,11 +109,18 @@ } /* Check it's accessible */ - if (!dev_open_flags(dev, O_RDONLY, 0, 1)) { + if (!dev_open_flags(dev, O_RDONLY|O_NONBLOCK, 0, 1)) { log_debug("%s: Skipping: open failed", name); return 0; } - + + /* Skip cdrom device */ + #define CDROM_GET_CAPABILITY 0x5331 + if (ioctl(dev->fd, CDROM_GET_CAPABILITY) >= 0) { + log_debug("%s: Skipping: cdrom device", name ); + goto out; + } + /* Check it's not too small */ if (!dev_get_size(dev, &size)) { log_debug("%s: Skipping: dev_get_size failed", name);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor