/
loop-limits.patch
70 lines (67 loc) · 2.32 KB
/
loop-limits.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Description: Remove limits on loop labels
There's no reason to impose any particular limit on loop labels, since they
just represent a single large partition. Sector counts over 2^32 are
needed for large RAID arrays.
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Debian: http://bugs.debian.org/592679
Bug-Ubuntu: https://bugs.launchpad.net/bugs/543838
Forwarded: http://lists.alioth.debian.org/pipermail/parted-devel/2010-August/003725.html
Last-Update: 2010-04-09
Index: b/libparted/labels/pt-limit.c
===================================================================
--- a/libparted/labels/pt-limit.c
+++ b/libparted/labels/pt-limit.c
@@ -120,8 +120,8 @@
#line 18 "pt-limit.gperf"
{"sun",128ULL*UINT32_MAX,UINT32_MAX},
{""}, {""}, {""}, {""},
-#line 22 "pt-limit.gperf"
- {"loop",UINT32_MAX,UINT32_MAX},
+#line 23 "pt-limit.gperf"
+ {"loop",UINT64_MAX,UINT64_MAX},
{""}, {""}, {""}, {""},
#line 10 "pt-limit.gperf"
{"gpt",UINT64_MAX,UINT64_MAX},
@@ -132,7 +132,7 @@
#line 8 "pt-limit.gperf"
{"dasd",UINT32_MAX,UINT32_MAX},
{""}, {""}, {""}, {""},
-#line 26 "pt-limit.gperf"
+#line 27 "pt-limit.gperf"
{"amiga",UINT32_MAX,UINT32_MAX},
{""}, {""}, {""}, {""},
#line 9 "pt-limit.gperf"
@@ -144,7 +144,7 @@
#line 20 "pt-limit.gperf"
{"bsd",UINT32_MAX,UINT32_MAX},
{""}, {""}, {""}, {""},
-#line 23 "pt-limit.gperf"
+#line 24 "pt-limit.gperf"
{"pc98",UINT32_MAX,UINT32_MAX}
};
Index: b/libparted/labels/pt-limit.gperf
===================================================================
--- a/libparted/labels/pt-limit.gperf
+++ b/libparted/labels/pt-limit.gperf
@@ -19,7 +19,8 @@
#
bsd,UINT32_MAX,UINT32_MAX
# aix,UINT32_MAX,UINT32_MAX
-loop,UINT32_MAX,UINT32_MAX
+# In reality, loop labels have no particular limit.
+loop,UINT64_MAX,UINT64_MAX
pc98,UINT32_MAX,UINT32_MAX
#
# FIXME: not verified. looks like these are cylinder aligned, too
Index: b/tests/t9021-maxima.sh
===================================================================
--- a/tests/t9021-maxima.sh
+++ b/tests/t9021-maxima.sh
@@ -42,7 +42,7 @@
max_start=4294967295
max_len=4294967295
case $t in
- gpt) max_start=18446744073709551615; max_len=$max_start;;
+ gpt|loop) max_start=18446744073709551615; max_len=$max_start;;
sun) max_start=549755813760;; # 128 * (2^32-1)
esac