[parted-devel] [PATCH 27/28] libparted: Remove disabled code
Brian C. Lane
bcl at redhat.com
Fri Nov 20 22:22:42 GMT 2020
---
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
More information about the parted-devel
mailing list