Marcus Meissner
0621383d81
update to lvm2-2.02.111 OBS-URL: https://build.opensuse.org/request/show/251781 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=104
31 lines
842 B
Diff
31 lines
842 B
Diff
Index: LVM2.2.02.111/lib/filters/filter-type.c
|
|
===================================================================
|
|
--- LVM2.2.02.111.orig/lib/filters/filter-type.c
|
|
+++ LVM2.2.02.111/lib/filters/filter-type.c
|
|
@@ -12,6 +12,11 @@
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
* 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 "filter.h"
|
|
@@ -28,6 +33,13 @@ static int _passes_lvm_type_device_filte
|
|
return 0;
|
|
}
|
|
|
|
+ /* 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;
|
|
+ }
|
|
+
|
|
return 1;
|
|
}
|
|
|