mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
parted: update to parted-3.1
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
e120c30211
commit
08c3e9f85e
@ -1,62 +0,0 @@
|
||||
parted:
|
||||
=================
|
||||
downgrade to 1.9.0, issues while creating an partition with parted-2.3 with 'unit cyl'
|
||||
|
||||
wrong:
|
||||
(parted) unit cyl
|
||||
(parted) print
|
||||
Modell: SanDisk U3 Cruzer Micro (scsi)
|
||||
Festplatte /dev/sdc: 248cyl
|
||||
Sektorgröße (logisch/physisch): 512B/512B
|
||||
BIOS Zylinder-, Kopf-, Sektor-Geometrie: 248, 255, 63. Jeder Zylinder ist 8225kB groß.
|
||||
Partitionstabelle: msdos
|
||||
|
||||
Nummer Anfang Ende Größe Typ Dateisystem Flags
|
||||
1 0cyl 16cyl 15cyl primary ext2
|
||||
2 16cyl 246cyl 230cyl primary ext2
|
||||
|
||||
fdisk -l:
|
||||
|
||||
Befehl (m für Hilfe): p
|
||||
|
||||
Platte /dev/sdc: 2047 MByte, 2047678976 Byte
|
||||
63 Köpfe, 62 Sektoren/Spur, 1023 Zylinder
|
||||
Einheiten = Zylinder von 3906 × 512 = 1999872 Bytes
|
||||
Disk identifier: 0x000acf2a
|
||||
|
||||
Gerät boot. Anfang Ende Blöcke Id System
|
||||
/dev/sdc1 1 67 128000 83 Linux
|
||||
Partition 1 hat unterschiedliche phys./log. Anfänge (nicht-Linux?):
|
||||
phys=(0, 32, 33) logisch=(0, 33, 3)
|
||||
Partition 1 hat unterschiedliche phys./log. Enden:
|
||||
phys=(16, 15, 63) logisch=(66, 4, 4)
|
||||
Partition 1 endet nicht an einer Zylindergrenze.
|
||||
/dev/sdc2 67 1016 1854464 83 Linux
|
||||
Partition 2 hat unterschiedliche phys./log. Anfänge (nicht-Linux?):
|
||||
phys=(16, 16, 1) logisch=(66, 4, 5)
|
||||
Partition 2 hat unterschiedliche phys./log. Enden:
|
||||
phys=(246, 237, 55) logisch=(1015, 38, 30)
|
||||
Partition 2 endet nicht an einer Zylindergrenze.
|
||||
|
||||
right:
|
||||
(parted) unit cyl
|
||||
(parted) print list
|
||||
Modell: SanDisk U3 Cruzer Micro (scsi)
|
||||
Festplatte /dev/sdb: 248cyl
|
||||
Sektorgröße (logisch/physisch): 512B/512B
|
||||
BIOS Zylinder-, Kopf-, Sektor-Geometrie: 248, 255, 63. Jeder Zylinder ist 8225kB groß.
|
||||
Partitionstabelle: msdos
|
||||
|
||||
Nummer Anfang Ende Größe Typ Dateisystem Flags
|
||||
1 0cyl 15cyl 15cyl primary ext2 boot
|
||||
2 16cyl 246cyl 231cyl primary ext2
|
||||
|
||||
fdisk -l:
|
||||
Platte /dev/sdb: 2047 MByte, 2047678976 Byte
|
||||
255 Köpfe, 63 Sektoren/Spur, 248 Zylinder
|
||||
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
|
||||
Disk identifier: 0x0007f340
|
||||
|
||||
Gerät boot. Anfang Ende Blöcke Id System
|
||||
/dev/sdb1 * 1 16 128488+ 83 Linux
|
||||
/dev/sdb2 17 247 1855507+ 83 Linux
|
@ -19,12 +19,12 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="parted"
|
||||
PKG_VERSION="3.0"
|
||||
PKG_VERSION="3.1"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.gnu.org/software/parted/"
|
||||
PKG_URL="http://ftp.gnu.org/gnu/parted/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_URL="http://ftp.gnu.org/gnu/parted/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS="util-linux"
|
||||
PKG_BUILD_DEPENDS="toolchain util-linux"
|
||||
PKG_PRIORITY="optional"
|
||||
|
@ -1,28 +0,0 @@
|
||||
diff -up parted-2.1/libparted/arch/linux.c.original parted-2.1/libparted/arch/linux.c
|
||||
--- parted-2.1/libparted/arch/linux.c.original 2010-07-06 15:05:19.921823935 +0900
|
||||
+++ parted-2.1/libparted/arch/linux.c 2010-07-06 16:42:16.420762063 +0900
|
||||
@@ -221,6 +221,14 @@ struct blkdev_ioctl_param {
|
||||
#define SCSI_DISK5_MAJOR 69
|
||||
#define SCSI_DISK6_MAJOR 70
|
||||
#define SCSI_DISK7_MAJOR 71
|
||||
+#define SCSI_DISK8_MAJOR 128
|
||||
+#define SCSI_DISK9_MAJOR 129
|
||||
+#define SCSI_DISK10_MAJOR 130
|
||||
+#define SCSI_DISK11_MAJOR 131
|
||||
+#define SCSI_DISK12_MAJOR 132
|
||||
+#define SCSI_DISK13_MAJOR 133
|
||||
+#define SCSI_DISK14_MAJOR 134
|
||||
+#define SCSI_DISK15_MAJOR 135
|
||||
#define COMPAQ_SMART2_MAJOR 72
|
||||
#define COMPAQ_SMART2_MAJOR1 73
|
||||
#define COMPAQ_SMART2_MAJOR2 74
|
||||
@@ -259,7 +267,8 @@ struct blkdev_ioctl_param {
|
||||
#define SCSI_BLK_MAJOR(M) ( \
|
||||
(M) == SCSI_DISK0_MAJOR \
|
||||
|| (M) == SCSI_CDROM_MAJOR \
|
||||
- || ((M) >= SCSI_DISK1_MAJOR && (M) <= SCSI_DISK7_MAJOR))
|
||||
+ || ((M) >= SCSI_DISK1_MAJOR && (M) <= SCSI_DISK7_MAJOR) \
|
||||
+ || ((M) >= SCSI_DISK8_MAJOR && (M) <= SCSI_DISK15_MAJOR))
|
||||
|
||||
/* Maximum number of partitions supported by linux. */
|
||||
#define MAX_NUM_PARTS 64
|
@ -1,68 +0,0 @@
|
||||
From 763d9aca0fd5c79c46243774c17b562013a93418 Mon Sep 17 00:00:00 2001
|
||||
From: Brian C. Lane <bcl@redhat.com>
|
||||
Date: Fri, 17 Sep 2010 09:21:24 -0700
|
||||
Subject: [PATCH] Handle syncing partition changes when using blkext majors (#634980)
|
||||
|
||||
Also remove unused _device_get_partition_range function
|
||||
---
|
||||
libparted/arch/linux.c | 37 ++++---------------------------------
|
||||
1 files changed, 4 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
|
||||
index 38f4e31..225d06b 100644
|
||||
--- a/libparted/arch/linux.c
|
||||
+++ b/libparted/arch/linux.c
|
||||
@@ -2391,35 +2391,6 @@ _blkpg_remove_partition (PedDisk* disk, int n)
|
||||
}
|
||||
|
||||
/*
|
||||
- * The number of partitions that a device can have depends on the kernel.
|
||||
- * If we don't find this value in /sys/block/DEV/range, we will use our own
|
||||
- * value.
|
||||
- */
|
||||
-static unsigned int
|
||||
-_device_get_partition_range(PedDevice* dev)
|
||||
-{
|
||||
- int range, r;
|
||||
- char path[128];
|
||||
- FILE* fp;
|
||||
- bool ok;
|
||||
-
|
||||
- r = snprintf(path, sizeof(path), "/sys/block/%s/range",
|
||||
- last_component(dev->path));
|
||||
- if (r < 0 || r >= sizeof(path))
|
||||
- return MAX_NUM_PARTS;
|
||||
-
|
||||
- fp = fopen(path, "r");
|
||||
- if (!fp)
|
||||
- return MAX_NUM_PARTS;
|
||||
-
|
||||
- ok = fscanf(fp, "%d", &range) == 1;
|
||||
- fclose(fp);
|
||||
-
|
||||
- /* (range <= 0) is none sense.*/
|
||||
- return ok && range > 0 ? range : MAX_NUM_PARTS;
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
* Sync the partition table in two step process:
|
||||
* 1. Remove all of the partitions from the kernel's tables, but do not attempt
|
||||
* removal of any partition for which the corresponding ioctl call fails.
|
||||
@@ -2441,10 +2412,10 @@ _disk_sync_part_table (PedDisk* disk)
|
||||
int lpn;
|
||||
|
||||
/* lpn = largest partition number. */
|
||||
- if (ped_disk_get_max_supported_partition_count(disk, &lpn))
|
||||
- lpn = PED_MIN(lpn, _device_get_partition_range(disk->dev));
|
||||
- else
|
||||
- lpn = _device_get_partition_range(disk->dev);
|
||||
+ if (!ped_disk_get_max_supported_partition_count(disk, &lpn))
|
||||
+ lpn = 256; /* HDG: not pretty but there is no other way
|
||||
+ as we must make sure any removed partitions
|
||||
+ actually get removed from the kernels view */
|
||||
|
||||
/* Its not possible to support largest_partnum < 0.
|
||||
* largest_partnum == 0 would mean does not support partitions.
|
||||
--
|
||||
1.7.2.2
|
||||
|
Loading…
x
Reference in New Issue
Block a user