summaryrefslogtreecommitdiff
path: root/system/parted/bsd-endian.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-08-05 05:57:13 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-08-05 05:57:13 +0000
commit41e1b0f5afd093699d1f96baf8d8fbfa8aeb85a8 (patch)
tree3a7c35ab483502b821fb8dd53de6178a0e1e228c /system/parted/bsd-endian.patch
parent8a6e7b726fc93908618526a83d8243365ff3ae46 (diff)
downloadpackages-41e1b0f5afd093699d1f96baf8d8fbfa8aeb85a8.tar.gz
packages-41e1b0f5afd093699d1f96baf8d8fbfa8aeb85a8.tar.bz2
packages-41e1b0f5afd093699d1f96baf8d8fbfa8aeb85a8.tar.xz
packages-41e1b0f5afd093699d1f96baf8d8fbfa8aeb85a8.zip
system/parted: fix BSD disklabel manipulation on big endian systems
See also: upstream bug 31923 <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31923>
Diffstat (limited to 'system/parted/bsd-endian.patch')
-rw-r--r--system/parted/bsd-endian.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/system/parted/bsd-endian.patch b/system/parted/bsd-endian.patch
new file mode 100644
index 000000000..6e5e13c0e
--- /dev/null
+++ b/system/parted/bsd-endian.patch
@@ -0,0 +1,13 @@
+See-Also: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31923
+
+--- parted-3.2/libparted/labels/bsd.c.old 2014-06-15 18:17:43.000000000 +0000
++++ parted-3.2/libparted/labels/bsd.c 2019-08-05 05:48:52.914401379 +0000
+@@ -364,7 +364,7 @@
+ max_part = i;
+ }
+
+- label->d_npartitions = PED_CPU_TO_LE16 (max_part) + 1;
++ label->d_npartitions = PED_CPU_TO_LE16 (max_part + 1);
+ label->d_checksum = xbsd_dkcksum (label);
+
+ alpha_bootblock_checksum (bsd_specific->boot_code);