diff options
Diffstat (limited to 'meta/recipes-core/util-linux/util-linux')
-rw-r--r-- | meta/recipes-core/util-linux/util-linux/fix-configure.patch | 20 | ||||
-rw-r--r-- | meta/recipes-core/util-linux/util-linux/util-linux-native.patch | 173 |
2 files changed, 28 insertions, 165 deletions
diff --git a/meta/recipes-core/util-linux/util-linux/fix-configure.patch b/meta/recipes-core/util-linux/util-linux/fix-configure.patch index 0ea23183ca..cefae97e9c 100644 --- a/meta/recipes-core/util-linux/util-linux/fix-configure.patch +++ b/meta/recipes-core/util-linux/util-linux/fix-configure.patch | |||
@@ -5,16 +5,16 @@ Upstream-Status: Pending | |||
5 | 5 | ||
6 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | 6 | Signed-off-by: Saul Wold <sgw@linux.intel.com> |
7 | 7 | ||
8 | Index: util-linux-2.22.1/configure.ac | 8 | Index: util-linux-2.24.1/configure.ac |
9 | =================================================================== | 9 | =================================================================== |
10 | --- util-linux-2.22.1.orig/configure.ac | 10 | --- util-linux-2.24.1.orig/configure.ac |
11 | +++ util-linux-2.22.1/configure.ac | 11 | +++ util-linux-2.24.1/configure.ac |
12 | @@ -79,7 +79,7 @@ fi | 12 | @@ -76,7 +76,7 @@ fi |
13 | AC_SUBST([usrsbin_execdir]) | 13 | AC_SUBST([usrsbin_execdir]) |
14 | 14 | ||
15 | case $libdir in | 15 | AS_CASE([$libdir], |
16 | - '${exec_prefix}/'* | '${prefix}/'* | /usr/*) | 16 | - ['${exec_prefix}/'* | '${prefix}/'* | /usr/*], |
17 | + ${exec_prefix}/* | ${prefix}/* | /usr/*) | 17 | + [${exec_prefix}/* | ${prefix}/* | /usr/*], |
18 | usrlib_execdir=$libdir ;; | 18 | [usrlib_execdir=$libdir], |
19 | *) | 19 | [usrlib_execdir='${exec_prefix}'$libdir] |
20 | usrlib_execdir='${exec_prefix}'$libdir ;; | 20 | ) |
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-native.patch b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch index e8fcd98c64..afe543c6e8 100644 --- a/meta/recipes-core/util-linux/util-linux/util-linux-native.patch +++ b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch | |||
@@ -17,10 +17,11 @@ machines. | |||
17 | 17 | ||
18 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | 18 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> |
19 | 19 | ||
20 | diff -ur util-linux-2.23/configure.ac /home/lmhatle/util-linux-2.23-fixed/configure.ac | 20 | Index: util-linux-2.24.1/configure.ac |
21 | --- util-linux-2.23/configure.ac 2013-05-29 14:44:35.147853585 -0500 | 21 | =================================================================== |
22 | +++ /home/lmhatle/util-linux-2.23-fixed/configure.ac 2013-05-30 14:56:15.050799650 -0500 | 22 | --- util-linux-2.24.1.orig/configure.ac |
23 | @@ -323,6 +323,7 @@ | 23 | +++ util-linux-2.24.1/configure.ac |
24 | @@ -302,6 +302,7 @@ AC_CHECK_FUNCS([ \ | ||
24 | llseek \ | 25 | llseek \ |
25 | lseek64 \ | 26 | lseek64 \ |
26 | mempcpy \ | 27 | mempcpy \ |
@@ -28,10 +29,11 @@ diff -ur util-linux-2.23/configure.ac /home/lmhatle/util-linux-2.23-fixed/config | |||
28 | nanosleep \ | 29 | nanosleep \ |
29 | personality \ | 30 | personality \ |
30 | posix_fadvise \ | 31 | posix_fadvise \ |
31 | diff -ur util-linux-2.23/include/c.h /home/lmhatle/util-linux-2.23-fixed/include/c.h | 32 | Index: util-linux-2.24.1/include/c.h |
32 | --- util-linux-2.23/include/c.h 2013-04-12 04:25:46.852156874 -0500 | 33 | =================================================================== |
33 | +++ /home/lmhatle/util-linux-2.23-fixed/include/c.h 2013-05-30 14:56:11.310799488 -0500 | 34 | --- util-linux-2.24.1.orig/include/c.h |
34 | @@ -236,6 +236,13 @@ | 35 | +++ util-linux-2.24.1/include/c.h |
36 | @@ -236,6 +236,13 @@ static inline int dirfd(DIR *d) | ||
35 | #endif | 37 | #endif |
36 | 38 | ||
37 | /* | 39 | /* |
@@ -45,9 +47,10 @@ diff -ur util-linux-2.23/include/c.h /home/lmhatle/util-linux-2.23-fixed/include | |||
45 | * MAXHOSTNAMELEN replacement | 47 | * MAXHOSTNAMELEN replacement |
46 | */ | 48 | */ |
47 | static inline size_t get_hostname_max(void) | 49 | static inline size_t get_hostname_max(void) |
48 | diff -ur util-linux-2.23/lib/randutils.c /home/lmhatle/util-linux-2.23-fixed/lib/randutils.c | 50 | Index: util-linux-2.24.1/lib/randutils.c |
49 | --- util-linux-2.23/lib/randutils.c 2013-04-12 04:25:46.855156901 -0500 | 51 | =================================================================== |
50 | +++ /home/lmhatle/util-linux-2.23-fixed/lib/randutils.c 2013-05-30 14:55:26.622799644 -0500 | 52 | --- util-linux-2.24.1.orig/lib/randutils.c |
53 | +++ util-linux-2.24.1/lib/randutils.c | ||
51 | @@ -16,6 +16,7 @@ | 54 | @@ -16,6 +16,7 @@ |
52 | #include <sys/syscall.h> | 55 | #include <sys/syscall.h> |
53 | 56 | ||
@@ -56,9 +59,10 @@ diff -ur util-linux-2.23/lib/randutils.c /home/lmhatle/util-linux-2.23-fixed/lib | |||
56 | 59 | ||
57 | #ifdef HAVE_TLS | 60 | #ifdef HAVE_TLS |
58 | #define THREAD_LOCAL static __thread | 61 | #define THREAD_LOCAL static __thread |
59 | diff -ur util-linux-2.23/lib/wholedisk.c /home/lmhatle/util-linux-2.23-fixed/lib/wholedisk.c | 62 | Index: util-linux-2.24.1/lib/wholedisk.c |
60 | --- util-linux-2.23/lib/wholedisk.c 2013-04-12 04:25:46.855156901 -0500 | 63 | =================================================================== |
61 | +++ /home/lmhatle/util-linux-2.23-fixed/lib/wholedisk.c 2013-05-30 14:55:31.182799350 -0500 | 64 | --- util-linux-2.24.1.orig/lib/wholedisk.c |
65 | +++ util-linux-2.24.1/lib/wholedisk.c | ||
62 | @@ -10,6 +10,7 @@ | 66 | @@ -10,6 +10,7 @@ |
63 | 67 | ||
64 | #include "blkdev.h" | 68 | #include "blkdev.h" |
@@ -67,144 +71,3 @@ diff -ur util-linux-2.23/lib/wholedisk.c /home/lmhatle/util-linux-2.23-fixed/lib | |||
67 | 71 | ||
68 | int is_whole_disk_fd(int fd, const char *name) | 72 | int is_whole_disk_fd(int fd, const char *name) |
69 | { | 73 | { |
70 | diff -ur util-linux-2.23/fdisks/fdisksunlabel.c /home/lmhatle/util-linux-2.23-fixed/fdisks/fdisksunlabel.c | ||
71 | --- util-linux-2.23/fdisks/fdisksunlabel.c 2013-04-23 09:14:19.229015244 -0500 | ||
72 | +++ /home/lmhatle/util-linux-2.23-fixed/fdisks/fdisksunlabel.c 2013-05-30 14:54:55.978799735 -0500 | ||
73 | @@ -383,10 +383,10 @@ | ||
74 | } | ||
75 | } | ||
76 | |||
77 | -static int verify_sun_cmp(int *a, int *b, void *data) | ||
78 | -{ | ||
79 | - unsigned int *verify_sun_starts = (unsigned int *) data; | ||
80 | +static unsigned int *verify_sun_starts; | ||
81 | |||
82 | +static int verify_sun_cmp(int *a, int *b) | ||
83 | +{ | ||
84 | if (*a == -1) | ||
85 | return 1; | ||
86 | if (*b == -1) | ||
87 | @@ -401,7 +401,6 @@ | ||
88 | uint32_t starts[SUN_MAXPARTITIONS], lens[SUN_MAXPARTITIONS], start, stop; | ||
89 | uint32_t i,j,k,starto,endo; | ||
90 | int array[SUN_MAXPARTITIONS]; | ||
91 | - unsigned int *verify_sun_starts; | ||
92 | |||
93 | assert(cxt); | ||
94 | assert(cxt->label); | ||
95 | @@ -442,16 +441,14 @@ | ||
96 | } | ||
97 | } | ||
98 | } | ||
99 | - | ||
100 | for (i = 0; i < SUN_MAXPARTITIONS; i++) { | ||
101 | if (lens[i]) | ||
102 | array[i] = i; | ||
103 | else | ||
104 | array[i] = -1; | ||
105 | } | ||
106 | - qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]), | ||
107 | - (int (*)(const void *,const void *,void *)) verify_sun_cmp, | ||
108 | - verify_sun_starts); | ||
109 | + qsort(array,ARRAY_SIZE(array),sizeof(array[0]), | ||
110 | + (int (*)(const void *,const void *)) verify_sun_cmp); | ||
111 | |||
112 | if (array[0] == -1) { | ||
113 | fdisk_info(cxt, _("No partitions defined")); | ||
114 | @@ -468,6 +465,7 @@ | ||
115 | start = (starts[array[i]] + lens[array[i]]); | ||
116 | if (start < stop) | ||
117 | fdisk_warnx(cxt, _("Unused gap - sectors %d-%d"), start, stop); | ||
118 | + | ||
119 | return 0; | ||
120 | } | ||
121 | |||
122 | @@ -746,18 +744,12 @@ | ||
123 | } | ||
124 | } | ||
125 | |||
126 | - | ||
127 | void fdisk_sun_set_alt_cyl(struct fdisk_context *cxt) | ||
128 | { | ||
129 | struct sun_disklabel *sunlabel = self_disklabel(cxt); | ||
130 | - uintmax_t res; | ||
131 | - int rc = fdisk_ask_number(cxt, 0, /* low */ | ||
132 | - be16_to_cpu(sunlabel->acyl), /* default */ | ||
133 | - 65535, /* high */ | ||
134 | - _("Number of alternate cylinders"), /* query */ | ||
135 | - &res); /* result */ | ||
136 | - if (!rc) | ||
137 | - sunlabel->acyl = cpu_to_be16(res); | ||
138 | + sunlabel->acyl = | ||
139 | + cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->acyl), 65535, 0, | ||
140 | + _("Number of alternate cylinders"))); | ||
141 | } | ||
142 | |||
143 | void fdisk_sun_set_ncyl(struct fdisk_context *cxt, int cyl) | ||
144 | @@ -769,54 +761,33 @@ | ||
145 | void fdisk_sun_set_xcyl(struct fdisk_context *cxt) | ||
146 | { | ||
147 | struct sun_disklabel *sunlabel = self_disklabel(cxt); | ||
148 | - uintmax_t res; | ||
149 | - int rc = fdisk_ask_number(cxt, 0, /* low */ | ||
150 | - be16_to_cpu(sunlabel->apc), /* default */ | ||
151 | - cxt->geom.sectors, /* high */ | ||
152 | - _("Extra sectors per cylinder"), /* query */ | ||
153 | - &res); /* result */ | ||
154 | - if (!rc) | ||
155 | - sunlabel->apc = cpu_to_be16(res); | ||
156 | + sunlabel->apc = | ||
157 | + cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->apc), cxt->geom.sectors, 0, | ||
158 | + _("Extra sectors per cylinder"))); | ||
159 | } | ||
160 | |||
161 | void fdisk_sun_set_ilfact(struct fdisk_context *cxt) | ||
162 | { | ||
163 | struct sun_disklabel *sunlabel = self_disklabel(cxt); | ||
164 | - uintmax_t res; | ||
165 | - int rc = fdisk_ask_number(cxt, 1, /* low */ | ||
166 | - be16_to_cpu(sunlabel->intrlv), /* default */ | ||
167 | - 32, /* high */ | ||
168 | - _("Interleave factor"), /* query */ | ||
169 | - &res); /* result */ | ||
170 | - if (!rc) | ||
171 | - sunlabel->intrlv = cpu_to_be16(res); | ||
172 | + sunlabel->intrlv = | ||
173 | + cpu_to_be16(read_int(cxt, 1, be16_to_cpu(sunlabel->intrlv), 32, 0, | ||
174 | + _("Interleave factor"))); | ||
175 | } | ||
176 | |||
177 | void fdisk_sun_set_rspeed(struct fdisk_context *cxt) | ||
178 | { | ||
179 | struct sun_disklabel *sunlabel = self_disklabel(cxt); | ||
180 | - uintmax_t res; | ||
181 | - int rc = fdisk_ask_number(cxt, 1, /* low */ | ||
182 | - be16_to_cpu(sunlabel->rpm), /* default */ | ||
183 | - USHRT_MAX, /* high */ | ||
184 | - _("Rotation speed (rpm)"), /* query */ | ||
185 | - &res); /* result */ | ||
186 | - if (!rc) | ||
187 | - sunlabel->rpm = cpu_to_be16(res); | ||
188 | - | ||
189 | + sunlabel->rpm = | ||
190 | + cpu_to_be16(read_int(cxt, 1, be16_to_cpu(sunlabel->rpm), 100000, 0, | ||
191 | + _("Rotation speed (rpm)"))); | ||
192 | } | ||
193 | |||
194 | void fdisk_sun_set_pcylcount(struct fdisk_context *cxt) | ||
195 | { | ||
196 | struct sun_disklabel *sunlabel = self_disklabel(cxt); | ||
197 | - uintmax_t res; | ||
198 | - int rc = fdisk_ask_number(cxt, 0, /* low */ | ||
199 | - be16_to_cpu(sunlabel->pcyl), /* default */ | ||
200 | - USHRT_MAX, /* high */ | ||
201 | - _("Number of physical cylinders"), /* query */ | ||
202 | - &res); /* result */ | ||
203 | - if (!rc) | ||
204 | - sunlabel->pcyl = cpu_to_be16(res); | ||
205 | + sunlabel->pcyl = | ||
206 | + cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->pcyl), 65535, 0, | ||
207 | + _("Number of physical cylinders"))); | ||
208 | } | ||
209 | |||
210 | static int sun_write_disklabel(struct fdisk_context *cxt) | ||