summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-01-26 06:13:15 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2012-01-26 09:58:02 +0100
commita2b05eddcfa02d57dd2ac5b1c33fca4647af283b (patch)
treeb45de5c3325cb860a6c41f322c28f18f97b5fee5
parentc1a40bffd7937a975bbaa201bc5932cf6d6d3a59 (diff)
downloadmeta-openembedded-a2b05eddcfa02d57dd2ac5b1c33fca4647af283b.tar.gz
systemd: Forward port format-replace-m-uclibc.patch
This patch was not applying and had to consider more fields this time. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-rw-r--r--meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch109
1 files changed, 43 insertions, 66 deletions
diff --git a/meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch b/meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch
index 2bf57729c2..1c95023bbd 100644
--- a/meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch
+++ b/meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch
@@ -9,8 +9,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
9 9
10Index: git/src/mount-setup.c 10Index: git/src/mount-setup.c
11=================================================================== 11===================================================================
12--- git.orig/src/mount-setup.c 2011-09-18 19:16:53.000000000 -0700 12--- git.orig/src/mount-setup.c 2012-01-25 21:27:23.000000000 -0800
13+++ git/src/mount-setup.c 2011-09-18 19:40:14.635725954 -0700 13+++ git/src/mount-setup.c 2012-01-25 21:59:43.897031326 -0800
14@@ -182,10 +182,10 @@ 14@@ -182,10 +182,10 @@
15 (void) fgets(buf, sizeof(buf), f); 15 (void) fgets(buf, sizeof(buf), f);
16 16
@@ -49,8 +49,8 @@ Index: git/src/mount-setup.c
49 if (r < 0) { 49 if (r < 0) {
50Index: git/src/socket-util.c 50Index: git/src/socket-util.c
51=================================================================== 51===================================================================
52--- git.orig/src/socket-util.c 2011-09-18 19:16:53.000000000 -0700 52--- git.orig/src/socket-util.c 2012-01-25 21:27:23.000000000 -0800
53+++ git/src/socket-util.c 2011-09-18 19:38:47.205597702 -0700 53+++ git/src/socket-util.c 2012-01-25 21:59:43.897031326 -0800
54@@ -192,7 +192,7 @@ 54@@ -192,7 +192,7 @@
55 int socket_address_parse_netlink(SocketAddress *a, const char *s) { 55 int socket_address_parse_netlink(SocketAddress *a, const char *s) {
56 int family; 56 int family;
@@ -79,46 +79,11 @@ Index: git/src/socket-util.c
79 a->sockaddr.nl.nl_family = AF_NETLINK; 79 a->sockaddr.nl.nl_family = AF_NETLINK;
80 a->sockaddr.nl.nl_groups = group; 80 a->sockaddr.nl.nl_groups = group;
81 81
82Index: git/src/cryptsetup-generator.c
83===================================================================
84--- git.orig/src/cryptsetup-generator.c 2011-09-18 19:16:53.000000000 -0700
85+++ git/src/cryptsetup-generator.c 2011-09-18 19:38:47.205597702 -0700
86@@ -263,7 +263,7 @@
87
88 for (;;) {
89 char line[LINE_MAX], *l;
90- char *name = NULL, *device = NULL, *password = NULL, *options = NULL;
91+ char name[50], device[50], password[50], options[50] = NULL;
92 int k;
93
94 if (!(fgets(line, sizeof(line), f)))
95@@ -275,7 +275,7 @@
96 if (*l == '#' || *l == 0)
97 continue;
98
99- if ((k = sscanf(l, "%ms %ms %ms %ms", &name, &device, &password, &options)) < 2 || k > 4) {
100+ if ((k = sscanf(l, "%s %s %s %s", &name, &device, &password, &options)) < 2 || k > 4) {
101 log_error("Failed to parse /etc/crypttab:%u, ignoring.", n);
102 r = EXIT_FAILURE;
103 goto next;
104@@ -284,11 +284,7 @@
105 if (create_disk(name, device, password, options) < 0)
106 r = EXIT_FAILURE;
107
108- next:
109- free(name);
110- free(device);
111- free(password);
112- free(options);
113+ next:;
114 }
115
116 finish:
117Index: git/src/swap.c 82Index: git/src/swap.c
118=================================================================== 83===================================================================
119--- git.orig/src/swap.c 2011-09-18 19:16:53.000000000 -0700 84--- git.orig/src/swap.c 2012-01-25 21:27:23.000000000 -0800
120+++ git/src/swap.c 2011-09-18 19:38:47.205597702 -0700 85+++ git/src/swap.c 2012-01-25 21:59:43.897031326 -0800
121@@ -1044,11 +1044,12 @@ 86@@ -1049,11 +1049,12 @@
122 (void) fscanf(m->proc_swaps, "%*s %*s %*s %*s %*s\n"); 87 (void) fscanf(m->proc_swaps, "%*s %*s %*s %*s %*s\n");
123 88
124 for (i = 1;; i++) { 89 for (i = 1;; i++) {
@@ -133,7 +98,7 @@ Index: git/src/swap.c
133 "%*s " /* type of swap */ 98 "%*s " /* type of swap */
134 "%*s " /* swap size */ 99 "%*s " /* swap size */
135 "%*s " /* used */ 100 "%*s " /* used */
136@@ -1059,12 +1060,10 @@ 101@@ -1064,12 +1065,10 @@
137 break; 102 break;
138 103
139 log_warning("Failed to parse /proc/swaps:%u.", i); 104 log_warning("Failed to parse /proc/swaps:%u.", i);
@@ -148,35 +113,46 @@ Index: git/src/swap.c
148 return -ENOMEM; 113 return -ENOMEM;
149Index: git/src/tmpfiles.c 114Index: git/src/tmpfiles.c
150=================================================================== 115===================================================================
151--- git.orig/src/tmpfiles.c 2011-09-18 19:16:53.000000000 -0700 116--- git.orig/src/tmpfiles.c 2012-01-25 21:27:23.000000000 -0800
152+++ git/src/tmpfiles.c 2011-09-18 19:38:47.205597702 -0700 117+++ git/src/tmpfiles.c 2012-01-25 22:06:58.649052774 -0800
153@@ -67,7 +67,7 @@ 118@@ -73,8 +73,8 @@
154 typedef struct Item { 119 typedef struct Item {
155 char type; 120 ItemType type;
156 121
157- char *path; 122- char *path;
123- char *argument;
158+ char path[50]; 124+ char path[50];
125+ char argument[50];
159 uid_t uid; 126 uid_t uid;
160 gid_t gid; 127 gid_t gid;
161 mode_t mode; 128 mode_t mode;
162@@ -664,7 +664,6 @@ 129@@ -822,7 +822,6 @@
130 case CREATE_CHAR_DEVICE:
131 case CREATE_BLOCK_DEVICE:
132 case IGNORE_PATH:
133- case RELABEL_PATH:
134 case RECURSIVE_RELABEL_PATH:
135 case WRITE_FILE:
136 break;
137@@ -858,8 +857,6 @@
163 static void item_free(Item *i) { 138 static void item_free(Item *i) {
164 assert(i); 139 assert(i);
165 140
166- free(i->path); 141- free(i->path);
142- free(i->argument);
167 free(i); 143 free(i);
168 } 144 }
169 145
170@@ -699,7 +698,7 @@ 146@@ -906,7 +903,7 @@
171 147
172 static int parse_line(const char *fname, unsigned line, const char *buffer) { 148 static int parse_line(const char *fname, unsigned line, const char *buffer) {
173 Item *i, *existing; 149 Item *i, *existing;
174- char *mode = NULL, *user = NULL, *group = NULL, *age = NULL; 150- char *mode = NULL, *user = NULL, *group = NULL, *age = NULL;
175+ char mode[50], user[50], group[50], age[50]; 151+ char mode[50], user[50], group[50], age[50];
152 char type;
176 Hashmap *h; 153 Hashmap *h;
177 int r; 154 int r, n = -1;
178 155@@ -923,18 +920,18 @@
179@@ -714,17 +713,17 @@
180 156
181 if (sscanf(buffer, 157 if (sscanf(buffer,
182 "%c " 158 "%c "
@@ -184,26 +160,27 @@ Index: git/src/tmpfiles.c
184- "%ms " 160- "%ms "
185- "%ms " 161- "%ms "
186- "%ms " 162- "%ms "
187- "%ms", 163- "%ms "
164+ "%s "
188+ "%s " 165+ "%s "
189+ "%s " 166+ "%s "
190+ "%s " 167+ "%s "
191+ "%s " 168+ "%s "
192+ "%s", 169 "%n",
193 &i->type, 170 &type,
194 &i->path, 171 &i->path,
195- &mode, 172- &mode,
196- &user, 173- &user,
197- &group, 174- &group,
198- &age) < 2) { 175- &age,
199+ mode, 176+ mode,
200+ user, 177+ user,
201+ group, 178+ group,
202+ age) < 2) { 179+ age,
180 &n) < 2) {
203 log_error("[%s:%u] Syntax error.", fname, line); 181 log_error("[%s:%u] Syntax error.", fname, line);
204 r = -EIO; 182 r = -EIO;
205 goto finish; 183@@ -1096,11 +1093,6 @@
206@@ -825,11 +824,6 @@
207 r = 0; 184 r = 0;
208 185
209 finish: 186 finish:
@@ -217,8 +194,8 @@ Index: git/src/tmpfiles.c
217 194
218Index: git/src/mount.c 195Index: git/src/mount.c
219=================================================================== 196===================================================================
220--- git.orig/src/mount.c 2011-09-18 19:16:53.000000000 -0700 197--- git.orig/src/mount.c 2012-01-25 21:27:23.000000000 -0800
221+++ git/src/mount.c 2011-09-18 19:38:47.215597732 -0700 198+++ git/src/mount.c 2012-01-25 21:59:43.901031505 -0800
222@@ -24,6 +24,7 @@ 199@@ -24,6 +24,7 @@
223 #include <mntent.h> 200 #include <mntent.h>
224 #include <sys/epoll.h> 201 #include <sys/epoll.h>
@@ -227,7 +204,7 @@ Index: git/src/mount.c
227 204
228 #include "unit.h" 205 #include "unit.h"
229 #include "mount.h" 206 #include "mount.h"
230@@ -1556,7 +1557,13 @@ 207@@ -1561,7 +1562,13 @@
231 static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) { 208 static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
232 int r = 0; 209 int r = 0;
233 unsigned i; 210 unsigned i;
@@ -242,7 +219,7 @@ Index: git/src/mount.c
242 219
243 assert(m); 220 assert(m);
244 221
245@@ -1565,26 +1572,26 @@ 222@@ -1570,26 +1577,26 @@
246 for (i = 1;; i++) { 223 for (i = 1;; i++) {
247 int k; 224 int k;
248 225
@@ -280,7 +257,7 @@ Index: git/src/mount.c
280 257
281 if (k == EOF) 258 if (k == EOF)
282 break; 259 break;
283@@ -1608,22 +1615,12 @@ 260@@ -1613,22 +1620,12 @@
284 r = k; 261 r = k;
285 262
286 clean_up: 263 clean_up:
@@ -305,8 +282,8 @@ Index: git/src/mount.c
305 free(o); 282 free(o);
306Index: git/src/umount.c 283Index: git/src/umount.c
307=================================================================== 284===================================================================
308--- git.orig/src/umount.c 2011-09-18 19:16:53.000000000 -0700 285--- git.orig/src/umount.c 2012-01-25 21:27:23.000000000 -0800
309+++ git/src/umount.c 2011-09-18 19:38:47.215597732 -0700 286+++ git/src/umount.c 2012-01-25 21:59:43.901031505 -0800
310@@ -60,7 +60,9 @@ 287@@ -60,7 +60,9 @@
311 288
312 static int mount_points_list_get(MountPoint **head) { 289 static int mount_points_list_get(MountPoint **head) {