rpms/parted/devel parted-1.8.6-xvd.patch, NONE, 1.1 parted.spec, 1.107, 1.108

David Cantrell (dcantrel) fedora-extras-commits at redhat.com
Tue Aug 7 18:12:04 UTC 2007


Author: dcantrel

Update of /cvs/pkgs/rpms/parted/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16708

Modified Files:
	parted.spec 
Added Files:
	parted-1.8.6-xvd.patch 
Log Message:
* Tue Aug 07 2007 David Cantrell <dcantrell at redhat.com> - 1.8.6-6
- Detect Xen virtual block devices and set model name appropriately


parted-1.8.6-xvd.patch:

--- NEW FILE parted-1.8.6-xvd.patch ---
diff -up parted-1.8.6/libparted/arch/linux.c.xvd parted-1.8.6/libparted/arch/linux.c
--- parted-1.8.6/libparted/arch/linux.c.xvd	2007-08-07 14:05:59.000000000 -0400
+++ parted-1.8.6/libparted/arch/linux.c	2007-08-07 14:07:13.000000000 -0400
@@ -248,6 +248,7 @@ struct blkdev_ioctl_param {
 #define VIODASD_MAJOR           112
 #define SX8_MAJOR1              160
 #define SX8_MAJOR2              161
+#define XVD_MAJOR               202
 
 #define SCSI_BLK_MAJOR(M) (                                             \
                 (M) == SCSI_DISK0_MAJOR                                 \
@@ -450,6 +451,8 @@ _device_probe_type (PedDevice* dev)
         } else if (_is_dm_major(dev_major)) {
                 dev->type = PED_DEVICE_DM;
 #endif
+        } else if (dev_major == XVD_MAJOR && (dev_minor % 0x10 == 0)) {
+                dev->type = PED_DEVICE_XVD;
         } else {
                 dev->type = PED_DEVICE_UNKNOWN;
         }
@@ -1152,6 +1155,11 @@ linux_new (const char* path)
                 break;
 #endif
 
+        case PED_DEVICE_XVD:
+                if (!init_generic (dev, _("Xen Virtual Block Device")))
+                        goto error_free_arch_specific;
+                break;
+
         case PED_DEVICE_UNKNOWN:
                 if (!init_generic (dev, _("Unknown")))
                         goto error_free_arch_specific;
diff -up parted-1.8.6/include/parted/device.h.xvd parted-1.8.6/include/parted/device.h
--- parted-1.8.6/include/parted/device.h.xvd	2007-01-12 10:15:10.000000000 -0500
+++ parted-1.8.6/include/parted/device.h	2007-08-07 14:07:13.000000000 -0400
@@ -45,11 +45,11 @@ typedef enum {
         PED_DEVICE_UBD          = 8,
         PED_DEVICE_DASD         = 9,
         PED_DEVICE_VIODASD      = 10,
-        PED_DEVICE_SX8          = 11
+        PED_DEVICE_SX8          = 11,
 #ifdef ENABLE_DEVICE_MAPPER
-                                    ,
-        PED_DEVICE_DM           = 12
+        PED_DEVICE_DM           = 12,
 #endif
+        PED_DEVICE_XVD          = 13
 } PedDeviceType;
 
 typedef struct _PedDevice PedDevice;


Index: parted.spec
===================================================================
RCS file: /cvs/pkgs/rpms/parted/devel/parted.spec,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -r1.107 -r1.108
--- parted.spec	19 Apr 2007 18:52:23 -0000	1.107
+++ parted.spec	7 Aug 2007 18:11:31 -0000	1.108
@@ -4,7 +4,7 @@
 Summary: The GNU disk partition manipulation program
 Name:    parted
 Version: 1.8.6
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: GPL
 Group:   Applications/System
 URL:     http://www.gnu.org/software/parted
@@ -14,6 +14,7 @@
 Patch1: %{name}-1.8.6-notransname.patch
 Patch2: %{name}-1.8.6-off-by-one.patch
 Patch3: %{name}-1.8.6-primary-boundary.patch
+Patch4: %{name}-1.8.6-xvd.patch
 
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: e2fsprogs-devel readline-devel ncurses-devel
@@ -47,6 +48,7 @@
 %patch1 -p1 -b .notransname
 %patch2 -p1 -b .offbyone
 %patch3 -p1 -b .boundary
+%patch4 -p1 -b .xvd
 
 %build
 %configure --enable-device-mapper --enable-selinux --disable-static
@@ -91,6 +93,9 @@
 %{_libdir}/pkgconfig/libparted.pc
 
 %changelog
+* Tue Aug 07 2007 David Cantrell <dcantrell at redhat.com> - 1.8.6-6
+- Detect Xen virtual block devices and set model name appropriately
+
 * Thu Apr 19 2007 David Cantrell <dcantrell at redhat.com> - 1.8.6-5
 - Spec file cleanups for merge review (#226230)
 




More information about the scm-commits mailing list