vanhofen
4 years ago
5 changed files with 128 additions and 38 deletions
@ -1,34 +0,0 @@ |
|||||
From ca845aeeddb17343c9289816833ca352f7c0d87b Mon Sep 17 00:00:00 2001 |
|
||||
From: "Brian C. Lane" <bcl@redhat.com> |
|
||||
Date: Tue, 23 Apr 2019 13:52:25 -0700 |
|
||||
Subject: [PATCH 4/4] Fix end_input usage in do_resizepart |
|
||||
|
|
||||
It needs to be set to NULL, since it may not get set by the call to |
|
||||
command_line_get_sector |
|
||||
---
|
|
||||
parted/parted.c | 2 +- |
|
||||
1 file changed, 1 insertion(+), 1 deletion(-) |
|
||||
|
|
||||
diff --git a/parted/parted.c b/parted/parted.c
|
|
||||
index 9dcdb05..df0c7ed 100644
|
|
||||
--- a/parted/parted.c
|
|
||||
+++ b/parted/parted.c
|
|
||||
@@ -1545,6 +1545,7 @@ do_resizepart (PedDevice** dev, PedDisk** diskp)
|
|
||||
PedGeometry *range_end = NULL; |
|
||||
PedConstraint* constraint; |
|
||||
int rc = 0; |
|
||||
+ char* end_input = NULL;
|
|
||||
|
|
||||
if (!disk) { |
|
||||
disk = ped_disk_new (*dev); |
|
||||
@@ -1565,7 +1566,6 @@ do_resizepart (PedDevice** dev, PedDisk** diskp)
|
|
||||
|
|
||||
start = part->geom.start; |
|
||||
end = oldend = part->geom.end; |
|
||||
- char *end_input;
|
|
||||
if (!command_line_get_sector (_("End?"), *dev, &end, &range_end, &end_input)) |
|
||||
goto error; |
|
||||
_adjust_end_if_iec(&start, &end, range_end, end_input); |
|
||||
--
|
|
||||
2.23.0 |
|
||||
|
|
@ -0,0 +1,69 @@ |
|||||
|
Submitted By: Ken Moffat <ken at linuxfromscratch dot org> |
||||
|
Date: 2014-08-16 |
||||
|
Initial Package Version: 3.2 |
||||
|
Upstream Status: Unknown |
||||
|
Origin: Funtoo Linux |
||||
|
URL: http://data.gpo.zugaina.org/funtoo/sys-block/parted/files/parted-3.2-devmapper.patch |
||||
|
Description: Parted-3.2 fails to build with --disable-device-mapper |
||||
|
|
||||
|
|
||||
|
--- a/libparted/arch/linux.c
|
||||
|
+++ b/libparted/arch/linux.c
|
||||
|
@@ -2304,6 +2304,7 @@
|
||||
|
return r < 0 ? NULL : resultp; |
||||
|
} |
||||
|
|
||||
|
+#ifdef ENABLE_DEVICE_MAPPER
|
||||
|
static char * |
||||
|
dm_canonical_path (PedDevice const *dev) |
||||
|
{ |
||||
|
@@ -2326,12 +2327,22 @@
|
||||
|
err: |
||||
|
return NULL; |
||||
|
} |
||||
|
+#endif /* ENABLE_DEVICE_MAPPER */
|
||||
|
|
||||
|
static char* |
||||
|
_device_get_part_path (PedDevice const *dev, int num) |
||||
|
{ |
||||
|
- char *devpath = (dev->type == PED_DEVICE_DM
|
||||
|
- ? dm_canonical_path (dev) : dev->path);
|
||||
|
+ char *devpath =
|
||||
|
+#ifdef ENABLE_DEVICE_MAPPER
|
||||
|
+ (
|
||||
|
+ dev->type == PED_DEVICE_DM
|
||||
|
+ ? dm_canonical_path (dev) :
|
||||
|
+#endif /* ENABLE_DEVICE_MAPPER */
|
||||
|
+ dev->path
|
||||
|
+#ifdef ENABLE_DEVICE_MAPPER
|
||||
|
+ )
|
||||
|
+#endif /* ENABLE_DEVICE_MAPPER */
|
||||
|
+ ;
|
||||
|
size_t path_len = strlen (devpath); |
||||
|
char *result; |
||||
|
/* Check for devfs-style /disc => /partN transformation |
||||
|
@@ -2945,12 +2956,14 @@
|
||||
|
unsigned long long *length); |
||||
|
|
||||
|
|
||||
|
+#ifdef ENABLE_DEVICE_MAPPER
|
||||
|
if (disk->dev->type == PED_DEVICE_DM) { |
||||
|
add_partition = _dm_add_partition; |
||||
|
remove_partition = _dm_remove_partition; |
||||
|
resize_partition = _dm_resize_partition; |
||||
|
get_partition_start_and_length = _dm_get_partition_start_and_length; |
||||
|
} else { |
||||
|
+#endif /* ENABLE_DEVICE_MAPPER */
|
||||
|
add_partition = _blkpg_add_partition; |
||||
|
remove_partition = _blkpg_remove_partition; |
||||
|
#ifdef BLKPG_RESIZE_PARTITION |
||||
|
@@ -2959,7 +2972,9 @@
|
||||
|
resize_partition = NULL; |
||||
|
#endif |
||||
|
get_partition_start_and_length = _kernel_get_partition_start_and_length; |
||||
|
+#ifdef ENABLE_DEVICE_MAPPER
|
||||
|
} |
||||
|
+#endif /* ENABLE_DEVICE_MAPPER */
|
||||
|
|
||||
|
/* lpn = largest partition number. |
||||
|
* for remove pass, use greater of device or label limit */ |
@ -0,0 +1,32 @@ |
|||||
|
https://bugs.gentoo.org/580022 |
||||
|
|
||||
|
From dec8995fe80508374beba6356f6ecbba8ef6b18b Mon Sep 17 00:00:00 2001 |
||||
|
From: Mike Frysinger <vapier@gentoo.org> |
||||
|
Date: Tue, 21 Jun 2016 15:01:08 -0400 |
||||
|
Subject: [PATCH] include sysmacros.h for major/minor/makedev |
||||
|
|
||||
|
Linux C libs are moving away from including this header implicitly via |
||||
|
sys/types.h, so include it explicitly. |
||||
|
|
||||
|
Upstream-Status: Pending |
||||
|
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> |
||||
|
|
||||
|
---
|
||||
|
libparted/arch/linux.c | 1 + |
||||
|
1 file changed, 1 insertion(+) |
||||
|
|
||||
|
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
|
||||
|
index 326b95619d31..e5c168be3c68 100644
|
||||
|
--- a/libparted/arch/linux.c
|
||||
|
+++ b/libparted/arch/linux.c
|
||||
|
@@ -37,6 +37,7 @@
|
||||
|
#include <dirent.h> |
||||
|
#include <sys/ioctl.h> |
||||
|
#include <sys/stat.h> |
||||
|
+#include <sys/sysmacros.h>
|
||||
|
#include <sys/types.h> |
||||
|
#include <sys/utsname.h> /* for uname() */ |
||||
|
#include <scsi/scsi.h> |
||||
|
--
|
||||
|
2.8.2 |
||||
|
|
Loading…
Reference in new issue