parted/0041-libparted-Remove-disabled-code.patch

109 lines
3.2 KiB
Diff
Raw Normal View History

From 945b13aed7e9762e00bda1b54e2c18eb3373a31d Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Fri, 20 Nov 2020 13:26:31 -0800
Subject: [PATCH 41/42] libparted: Remove disabled code
---
libparted/arch/gnu.c | 40 ----------------------------------------
libparted/labels/mac.c | 14 --------------
libparted/labels/pc98.c | 5 -----
3 files changed, 59 deletions(-)
diff --git a/libparted/arch/gnu.c b/libparted/arch/gnu.c
index 321b70a..922b93d 100644
--- a/libparted/arch/gnu.c
+++ b/libparted/arch/gnu.c
@@ -359,46 +359,6 @@ gnu_close (PedDevice* dev)
dev->dirty = 0;
}
-#if 0
- if (dev->dirty && dev->boot_dirty && dev->type != PED_DEVICE_FILE) {
- /* ouch! */
- ped_exception_throw (
- PED_EXCEPTION_WARNING,
- PED_EXCEPTION_OK,
- _("The partition table cannot be re-read. This means "
- "you need to reboot before mounting any "
- "modified partitions. You also need to reinstall "
- "your boot loader before you reboot (which may "
- "require mounting modified partitions). It is "
- "impossible do both things! So you'll need to "
- "boot off a rescue disk, and reinstall your boot "
- "loader from the rescue disk. Read section 4 of "
- "the Parted User documentation for more "
- "information."));
- return 1;
- }
-
- if (dev->dirty && dev->type != PED_DEVICE_FILE) {
- ped_exception_throw (
- PED_EXCEPTION_WARNING,
- PED_EXCEPTION_IGNORE,
- _("The partition table on %s cannot be re-read "
- "(%s). This means the Hurd knows nothing about any "
- "modifications you made. You should reboot your "
- "computer before doing anything with %s."),
- dev->path, strerror (errno), dev->path);
- }
-
- if (dev->boot_dirty && dev->type != PED_DEVICE_FILE) {
- ped_exception_throw (
- PED_EXCEPTION_WARNING,
- PED_EXCEPTION_OK,
- _("You should reinstall your boot loader before "
- "rebooting. Read section 4 of the Parted User "
- "documentation for more information."));
- }
-#endif
-
return 1;
}
diff --git a/libparted/labels/mac.c b/libparted/labels/mac.c
index 8980885..af9f4c3 100644
--- a/libparted/labels/mac.c
+++ b/libparted/labels/mac.c
@@ -560,20 +560,6 @@ _rawpart_analyse (MacRawPartition* raw_part, PedDisk* disk, int num)
mac_part_data->data_region_length
= PED_BE32_TO_CPU (raw_part->data_count);
- /* boot region - we have no idea what this is for, but Mac OSX
- * seems to put garbage here, and doesn't pay any attention to
- * it afterwards. [clausen, dan burcaw]
- */
-#if 0
- if (raw_part->boot_start) {
- ped_exception_throw (
- PED_EXCEPTION_ERROR,
- PED_EXCEPTION_CANCEL,
- _("The boot region doesn't start at the start "
- "of the partition."));
- goto error_destroy_part;
- }
-#endif
mac_part_data->boot_region_length
= PED_BE32_TO_CPU (raw_part->boot_count);
diff --git a/libparted/labels/pc98.c b/libparted/labels/pc98.c
index 328cd8d..b8993c4 100644
--- a/libparted/labels/pc98.c
+++ b/libparted/labels/pc98.c
@@ -418,13 +418,8 @@ fill_raw_part (PC98RawPartition* raw_part, const PedPartition* part)
return 0;
}
raw_part->end_cyl = PED_CPU_TO_LE16(c);
-#if 0
- raw_part->end_head = h;
- raw_part->end_sector = s;
-#else
raw_part->end_head = 0;
raw_part->end_sector = 0;
-#endif
return 1;
}
--
2.26.2