2016-01-28 05:41:36 +01:00
|
|
|
Index: LVM2.2.02.141/lib/filters/filter-type.c
|
2014-09-25 10:31:10 +02:00
|
|
|
===================================================================
|
2016-01-28 05:41:36 +01:00
|
|
|
--- LVM2.2.02.141.orig/lib/filters/filter-type.c
|
|
|
|
+++ LVM2.2.02.141/lib/filters/filter-type.c
|
2014-09-25 10:31:10 +02:00
|
|
|
@@ -12,6 +12,11 @@
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2016-01-28 05:41:36 +01:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2006-12-18 14:01:39 +01:00
|
|
|
*/
|
|
|
|
+#include <sys/ioctl.h>
|
|
|
|
+#include <linux/fs.h>
|
|
|
|
+#undef MAJOR
|
|
|
|
+#undef MINOR
|
|
|
|
+#undef MKDEV
|
2014-09-25 10:31:10 +02:00
|
|
|
|
2006-12-18 14:01:39 +01:00
|
|
|
#include "lib.h"
|
|
|
|
#include "filter.h"
|
2014-09-25 10:31:10 +02:00
|
|
|
@@ -28,6 +33,13 @@ static int _passes_lvm_type_device_filte
|
2006-12-18 14:01:39 +01:00
|
|
|
return 0;
|
|
|
|
}
|
2012-10-23 19:40:13 +02:00
|
|
|
|
2014-09-25 10:31:10 +02:00
|
|
|
+ /* Skip cdrom device */
|
|
|
|
+ #define CDROM_GET_CAPABILITY 0x5331
|
|
|
|
+ if (ioctl(dev->fd, CDROM_GET_CAPABILITY) >= 0) {
|
|
|
|
+ log_debug_devs("%s: Skipping: cdrom device", name );
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
2006-12-18 14:01:39 +01:00
|
|
|
+
|
2014-09-25 10:31:10 +02:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|