[Parted-commits] GNU Parted Official Repository: Changes to 'master'

Jim Meyering meyering at alioth.debian.org
Fri Feb 26 18:02:30 UTC 2010


 NEWS                    |    4 ++++
 include/parted/device.h |    3 ++-
 libparted/arch/linux.c  |   12 ++++++++++--
 parted/parted.c         |    2 +-
 4 files changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 9c7167e1d2fa8d7114152b0f2a996e0c054590ad
Author: Colin Watson <cjwatson at ubuntu.com>
Date:   Fri Feb 26 17:37:53 2010 +0000

    libparted: don't export linux_get_*_alignment functions
    
    These functions are only used in libparted/arch/linux.c or via
    linux_dev_ops, so do not export them.
    
    * libparted/arch/linux.c (linux_get_minimum_alignment): Declare static.
    (linux_get_optimum_alignment): Likewise.

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 1fb5ab7..23d5b71 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2571,7 +2571,7 @@ linux_disk_commit (PedDisk* disk)
 }
 
 #if USE_BLKID
-PedAlignment*
+static PedAlignment*
 linux_get_minimum_alignment(const PedDevice *dev)
 {
         blkid_topology tp = LINUX_SPECIFIC(dev)->topology;
@@ -2589,7 +2589,7 @@ linux_get_minimum_alignment(const PedDevice *dev)
                 blkid_topology_get_minimum_io_size(tp) / dev->sector_size);
 }
 
-PedAlignment*
+static PedAlignment*
 linux_get_optimum_alignment(const PedDevice *dev)
 {
         blkid_topology tp = LINUX_SPECIFIC(dev)->topology;

commit 84da8440fad9e204b989c0d2574e384195f5817f
Author: Petr Uzel <petr.uzel at suse.cz>
Date:   Fri Feb 26 17:59:24 2010 +0100

    Add support for ATA over Ethernet (AoE) devices
    
    Recognize AoE Devices, so "parted -s /dev/etherd/eX.Y" now
    prints "Model: ATA over Ethernet Device (aoe)" instead of
    "Model: Unknown (unknown)".
    
    * include/parted/device.h(PedDeviceType): Add PED_DEVICE_AOE.
    * libparted/arch/linux.c(AOE_MAJOR): New define.
    * libparted/arch/linux.c(_device_probe_type): Recognize AoE devices.
    * libparted/arch/linux.c(linux_new): Handle AoE devices.
    * parted/parted.c(do_print): Add "aoe" to the list of available
    transports.
    * NEWS (New features): Mention it.

diff --git a/NEWS b/NEWS
index 3eb2ea7..f6662c8 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ GNU parted NEWS                                    -*- outline -*-
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** New features
+
+  parted now recognizes ATA over Ethernet (AoE) devices
+
 
 * Noteworthy changes in release 2.2 (2010-02-26) [stable]
 
diff --git a/include/parted/device.h b/include/parted/device.h
index 3580c2a..764c246 100644
--- a/include/parted/device.h
+++ b/include/parted/device.h
@@ -46,7 +46,8 @@ typedef enum {
         PED_DEVICE_DM           = 12,
         PED_DEVICE_XVD          = 13,
         PED_DEVICE_SDMMC        = 14,
-        PED_DEVICE_VIRTBLK      = 15
+        PED_DEVICE_VIRTBLK      = 15,
+        PED_DEVICE_AOE          = 16
 } PedDeviceType;
 
 typedef struct _PedDevice PedDevice;
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 49ab08c..1fb5ab7 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -249,6 +249,7 @@ struct blkdev_ioctl_param {
 #define UBD_MAJOR               98
 #define DASD_MAJOR              94
 #define VIODASD_MAJOR           112
+#define AOE_MAJOR               152
 #define SX8_MAJOR1              160
 #define SX8_MAJOR2              161
 #define XVD_MAJOR               202
@@ -540,6 +541,8 @@ _device_probe_type (PedDevice* dev)
                 dev->type = PED_DEVICE_DAC960;
         } else if (dev_major == ATARAID_MAJOR && (dev_minor % 0x10 == 0)) {
                 dev->type = PED_DEVICE_ATARAID;
+        } else if (dev_major == AOE_MAJOR && (dev_minor % 0x10 == 0)) {
+                dev->type = PED_DEVICE_AOE;
         } else if (dev_major == DASD_MAJOR && (dev_minor % 0x4 == 0)) {
                 dev->type = PED_DEVICE_DASD;
         } else if (dev_major == VIODASD_MAJOR && (dev_minor % 0x8 == 0)) {
@@ -1313,6 +1316,11 @@ linux_new (const char* path)
                         goto error_free_arch_specific;
                 break;
 
+        case PED_DEVICE_AOE:
+                if (!init_generic (dev, _("ATA over Ethernet Device")))
+                    goto error_free_arch_specific;
+                break;
+
 #if defined __s390__ || defined __s390x__
         case PED_DEVICE_DASD:
                 if (!init_dasd (dev, _("IBM S390 DASD drive")))
diff --git a/parted/parted.c b/parted/parted.c
index 44f8255..ae6fd6f 100644
--- a/parted/parted.c
+++ b/parted/parted.c
@@ -1396,7 +1396,7 @@ do_print (PedDevice** dev)
         const char *const transport[] = {"unknown", "scsi", "ide", "dac960",
                                          "cpqarray", "file", "ataraid", "i2o",
                                          "ubd", "dasd", "viodasd", "sx8", "dm",
-                                         "xvd", "sd/mmc", "virtblk"};
+                                         "xvd", "sd/mmc", "virtblk", "aoe"};
         char*           peek_word;
         char*           start;
         char*           end;



More information about the Parted-commits mailing list