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

Jim Meyering meyering at alioth.debian.org
Fri Jan 29 08:59:14 UTC 2010


 libparted/Makefile.am  |    1 
 libparted/arch/blkpg.h |   64 -------------------------------------------------
 libparted/arch/linux.c |    3 --
 3 files changed, 1 insertion(+), 67 deletions(-)

New commits:
commit ef1c917f79c510eb80f705dd1bdf37354b9089c2
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Mon Jan 11 11:59:26 2010 +0100

    linux: remove unused blkpg.h header file
    
    * libparted/arch/linux.c: Don't include blkpg.h.
    * libparted/arch/blkpg.h: Deleted.
    * libparted/Makefile.am (libparted_la_SOURCES): Remove arch/blkpg.h.

diff --git a/libparted/Makefile.am b/libparted/Makefile.am
index 5c6bac0..2bdadd8 100644
--- a/libparted/Makefile.am
+++ b/libparted/Makefile.am
@@ -36,7 +36,6 @@ libparted_la_SOURCES  = debug.c			\
 			cs/geom.c		\
 			cs/constraint.c		\
 			cs/natmath.c		\
-			arch/blkpg.h		\
 			$(ARCH_SOURCE)
 
 
diff --git a/libparted/arch/blkpg.h b/libparted/arch/blkpg.h
deleted file mode 100644
index 2a5e4fb..0000000
--- a/libparted/arch/blkpg.h
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef _LINUX_BLKPG_H
-#define _LINUX_BLKPG_H
-
-/*
- * Partition table and disk geometry handling
- *
- * A single ioctl with lots of subfunctions:
- *
- * Device number stuff:
- *    get_whole_disk()		(given the device number of a partition,
- *                               find the device number of the encompassing disk)
- *    get_all_partitions()	(given the device number of a disk, return the
- *				 device numbers of all its known partitions)
- *
- * Partition stuff:
- *    add_partition()
- *    delete_partition()
- *    test_partition_in_use()	(also for test_disk_in_use)
- *
- * Geometry stuff:
- *    get_geometry()
- *    set_geometry()
- *    get_bios_drivedata()
- *
- * For today, only the partition stuff - aeb, 990515
- */
-#include <linux/ioctl.h>
-
-#define BLKPG      _IO(0x12,105)
-
-/* The argument structure */
-struct blkpg_ioctl_arg {
-        int op;
-        int flags;
-        int datalen;
-        void *data;
-};
-
-/* The subfunctions (for the op field) */
-#define BLKPG_ADD_PARTITION	1
-#define BLKPG_DEL_PARTITION	2
-
-/* Sizes of name fields. Unused at present. */
-#define BLKPG_DEVNAMELTH	64
-#define BLKPG_VOLNAMELTH	64
-
-/* The data structure for ADD_PARTITION and DEL_PARTITION */
-struct blkpg_partition {
-	long long start;		/* starting offset in bytes */
-	long long length;		/* length in bytes */
-	int pno;			/* partition number */
-	char devname[BLKPG_DEVNAMELTH];	/* partition name, like sda5 or c0d1p2,
-					   to be used in kernel messages */
-	char volname[BLKPG_VOLNAMELTH];	/* volume label */
-};
-
-#ifdef __KERNEL__
-
-extern char * partition_name(kdev_t dev);
-extern int blk_ioctl(kdev_t dev, unsigned int cmd, unsigned long arg);
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_BLKPG_H */
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index bf33059..b14c9ca 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -44,7 +44,6 @@
 #include <libdevmapper.h>
 #endif
 
-#include "blkpg.h"
 #include "../architecture.h"
 #include "dirname.h"
 

commit 9eb876ce416aa395f5800ab5584060370185b571
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Mon Jan 11 11:59:25 2010 +0100

    linux: use blkid_topology_get_physical_sector_size
    
    The official 2.17 release of util-linux-ng, has added a function to
    get the physical sector size.  Use that instead of getting the
    minimum io size.
    * libparted/arch/linux.c (_device_set_sector_size): Use
    blkid_topology_get_physical_sector_size.

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index aefe788..bf33059 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -668,7 +668,7 @@ _device_set_sector_size (PedDevice* dev)
                         dev->path, strerror (errno), PED_SECTOR_SIZE_DEFAULT);
         } else {
                 dev->phys_sector_size =
-                        blkid_topology_get_minimum_io_size(
+                        blkid_topology_get_physical_sector_size(
                                 arch_specific->topology);
         }
 #endif



More information about the Parted-commits mailing list