diff options
| author | Khem Raj <raj.khem@gmail.com> | 2011-09-19 11:24:19 +0000 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-09-19 08:24:55 +0200 |
| commit | 0f149196c1de01bd557a0dfbba169d73c0d93ad3 (patch) | |
| tree | 80aa5231db6a96a7b54365456058991e81fece96 | |
| parent | 6cbe04603a429303dfda628552fcead5c43e317e (diff) | |
| download | meta-openembedded-0f149196c1de01bd557a0dfbba169d73c0d93ad3.tar.gz | |
systemd: Refresh format-replace-m-uclibc patch
This patch was not applying so we adjust it
to the new changes in uclibc sources.
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.patch | 67 |
1 files changed, 34 insertions, 33 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 48f870bec6..2bf57729c2 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,23 +9,22 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 9 | 9 | ||
| 10 | Index: git/src/mount-setup.c | 10 | Index: git/src/mount-setup.c |
| 11 | =================================================================== | 11 | =================================================================== |
| 12 | --- git.orig/src/mount-setup.c 2011-08-02 11:28:04.000000000 -0700 | 12 | --- git.orig/src/mount-setup.c 2011-09-18 19:16:53.000000000 -0700 |
| 13 | +++ git/src/mount-setup.c 2011-08-02 11:29:52.818915041 -0700 | 13 | +++ git/src/mount-setup.c 2011-09-18 19:40:14.635725954 -0700 |
| 14 | @@ -172,10 +172,11 @@ | 14 | @@ -182,10 +182,10 @@ |
| 15 | (void) fgets(buf, sizeof(buf), f); | ||
| 15 | 16 | ||
| 16 | for (;;) { | 17 | for (;;) { |
| 17 | MountPoint p; | 18 | - char *controller; |
| 18 | - char *controller, *where; | ||
| 19 | + char controller[30]; | 19 | + char controller[30]; |
| 20 | + char *where; | 20 | int enabled = 0; |
| 21 | int enabled = false; | ||
| 22 | 21 | ||
| 23 | - if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 2) { | 22 | - if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 2) { |
| 24 | + if (fscanf(f, "%29s %*i %*i %i", controller, &enabled) != 2) { | 23 | + if (fscanf(f, "%s %*i %*i %i", controller, &enabled) != 2) { |
| 25 | 24 | ||
| 26 | if (feof(f)) | 25 | if (feof(f)) |
| 27 | break; | 26 | break; |
| 28 | @@ -186,12 +187,10 @@ | 27 | @@ -196,14 +196,12 @@ |
| 29 | } | 28 | } |
| 30 | 29 | ||
| 31 | if (!enabled) { | 30 | if (!enabled) { |
| @@ -33,23 +32,25 @@ Index: git/src/mount-setup.c | |||
| 33 | continue; | 32 | continue; |
| 34 | } | 33 | } |
| 35 | 34 | ||
| 36 | if (asprintf(&where, "/sys/fs/cgroup/%s", controller) < 0) { | 35 | r = set_put(controllers, controller); |
| 36 | if (r < 0) { | ||
| 37 | log_error("Failed to add controller to set."); | ||
| 37 | - free(controller); | 38 | - free(controller); |
| 38 | r = -ENOMEM; | ||
| 39 | goto finish; | 39 | goto finish; |
| 40 | } | 40 | } |
| 41 | @@ -205,7 +204,6 @@ | 41 | } |
| 42 | @@ -273,7 +271,6 @@ | ||
| 42 | p.fatal = false; | 43 | p.fatal = false; |
| 43 | 44 | ||
| 44 | r = mount_one(&p, true); | 45 | r = mount_one(&p, true); |
| 45 | - free(controller); | 46 | - free(controller); |
| 46 | free(where); | 47 | free(where); |
| 47 | 48 | ||
| 48 | if (r < 0) | 49 | if (r < 0) { |
| 49 | Index: git/src/socket-util.c | 50 | Index: git/src/socket-util.c |
| 50 | =================================================================== | 51 | =================================================================== |
| 51 | --- git.orig/src/socket-util.c 2011-08-02 11:28:04.000000000 -0700 | 52 | --- git.orig/src/socket-util.c 2011-09-18 19:16:53.000000000 -0700 |
| 52 | +++ git/src/socket-util.c 2011-08-02 11:28:16.178773302 -0700 | 53 | +++ git/src/socket-util.c 2011-09-18 19:38:47.205597702 -0700 |
| 53 | @@ -192,7 +192,7 @@ | 54 | @@ -192,7 +192,7 @@ |
| 54 | int socket_address_parse_netlink(SocketAddress *a, const char *s) { | 55 | int socket_address_parse_netlink(SocketAddress *a, const char *s) { |
| 55 | int family; | 56 | int family; |
| @@ -80,9 +81,9 @@ Index: git/src/socket-util.c | |||
| 80 | 81 | ||
| 81 | Index: git/src/cryptsetup-generator.c | 82 | Index: git/src/cryptsetup-generator.c |
| 82 | =================================================================== | 83 | =================================================================== |
| 83 | --- git.orig/src/cryptsetup-generator.c 2011-08-02 11:28:04.000000000 -0700 | 84 | --- git.orig/src/cryptsetup-generator.c 2011-09-18 19:16:53.000000000 -0700 |
| 84 | +++ git/src/cryptsetup-generator.c 2011-08-02 11:28:16.458773716 -0700 | 85 | +++ git/src/cryptsetup-generator.c 2011-09-18 19:38:47.205597702 -0700 |
| 85 | @@ -260,7 +260,7 @@ | 86 | @@ -263,7 +263,7 @@ |
| 86 | 87 | ||
| 87 | for (;;) { | 88 | for (;;) { |
| 88 | char line[LINE_MAX], *l; | 89 | char line[LINE_MAX], *l; |
| @@ -91,7 +92,7 @@ Index: git/src/cryptsetup-generator.c | |||
| 91 | int k; | 92 | int k; |
| 92 | 93 | ||
| 93 | if (!(fgets(line, sizeof(line), f))) | 94 | if (!(fgets(line, sizeof(line), f))) |
| 94 | @@ -272,7 +272,7 @@ | 95 | @@ -275,7 +275,7 @@ |
| 95 | if (*l == '#' || *l == 0) | 96 | if (*l == '#' || *l == 0) |
| 96 | continue; | 97 | continue; |
| 97 | 98 | ||
| @@ -100,7 +101,7 @@ Index: git/src/cryptsetup-generator.c | |||
| 100 | log_error("Failed to parse /etc/crypttab:%u, ignoring.", n); | 101 | log_error("Failed to parse /etc/crypttab:%u, ignoring.", n); |
| 101 | r = EXIT_FAILURE; | 102 | r = EXIT_FAILURE; |
| 102 | goto next; | 103 | goto next; |
| 103 | @@ -281,11 +281,7 @@ | 104 | @@ -284,11 +284,7 @@ |
| 104 | if (create_disk(name, device, password, options) < 0) | 105 | if (create_disk(name, device, password, options) < 0) |
| 105 | r = EXIT_FAILURE; | 106 | r = EXIT_FAILURE; |
| 106 | 107 | ||
| @@ -115,9 +116,9 @@ Index: git/src/cryptsetup-generator.c | |||
| 115 | finish: | 116 | finish: |
| 116 | Index: git/src/swap.c | 117 | Index: git/src/swap.c |
| 117 | =================================================================== | 118 | =================================================================== |
| 118 | --- git.orig/src/swap.c 2011-08-02 11:28:04.000000000 -0700 | 119 | --- git.orig/src/swap.c 2011-09-18 19:16:53.000000000 -0700 |
| 119 | +++ git/src/swap.c 2011-08-02 11:28:16.488773760 -0700 | 120 | +++ git/src/swap.c 2011-09-18 19:38:47.205597702 -0700 |
| 120 | @@ -1043,11 +1043,12 @@ | 121 | @@ -1044,11 +1044,12 @@ |
| 121 | (void) fscanf(m->proc_swaps, "%*s %*s %*s %*s %*s\n"); | 122 | (void) fscanf(m->proc_swaps, "%*s %*s %*s %*s %*s\n"); |
| 122 | 123 | ||
| 123 | for (i = 1;; i++) { | 124 | for (i = 1;; i++) { |
| @@ -132,7 +133,7 @@ Index: git/src/swap.c | |||
| 132 | "%*s " /* type of swap */ | 133 | "%*s " /* type of swap */ |
| 133 | "%*s " /* swap size */ | 134 | "%*s " /* swap size */ |
| 134 | "%*s " /* used */ | 135 | "%*s " /* used */ |
| 135 | @@ -1058,12 +1059,10 @@ | 136 | @@ -1059,12 +1060,10 @@ |
| 136 | break; | 137 | break; |
| 137 | 138 | ||
| 138 | log_warning("Failed to parse /proc/swaps:%u.", i); | 139 | log_warning("Failed to parse /proc/swaps:%u.", i); |
| @@ -147,8 +148,8 @@ Index: git/src/swap.c | |||
| 147 | return -ENOMEM; | 148 | return -ENOMEM; |
| 148 | Index: git/src/tmpfiles.c | 149 | Index: git/src/tmpfiles.c |
| 149 | =================================================================== | 150 | =================================================================== |
| 150 | --- git.orig/src/tmpfiles.c 2011-08-02 11:28:04.000000000 -0700 | 151 | --- git.orig/src/tmpfiles.c 2011-09-18 19:16:53.000000000 -0700 |
| 151 | +++ git/src/tmpfiles.c 2011-08-02 11:28:16.488773760 -0700 | 152 | +++ git/src/tmpfiles.c 2011-09-18 19:38:47.205597702 -0700 |
| 152 | @@ -67,7 +67,7 @@ | 153 | @@ -67,7 +67,7 @@ |
| 153 | typedef struct Item { | 154 | typedef struct Item { |
| 154 | char type; | 155 | char type; |
| @@ -216,8 +217,8 @@ Index: git/src/tmpfiles.c | |||
| 216 | 217 | ||
| 217 | Index: git/src/mount.c | 218 | Index: git/src/mount.c |
| 218 | =================================================================== | 219 | =================================================================== |
| 219 | --- git.orig/src/mount.c 2011-08-02 11:28:04.000000000 -0700 | 220 | --- git.orig/src/mount.c 2011-09-18 19:16:53.000000000 -0700 |
| 220 | +++ git/src/mount.c 2011-08-02 11:28:16.488773760 -0700 | 221 | +++ git/src/mount.c 2011-09-18 19:38:47.215597732 -0700 |
| 221 | @@ -24,6 +24,7 @@ | 222 | @@ -24,6 +24,7 @@ |
| 222 | #include <mntent.h> | 223 | #include <mntent.h> |
| 223 | #include <sys/epoll.h> | 224 | #include <sys/epoll.h> |
| @@ -226,7 +227,7 @@ Index: git/src/mount.c | |||
| 226 | 227 | ||
| 227 | #include "unit.h" | 228 | #include "unit.h" |
| 228 | #include "mount.h" | 229 | #include "mount.h" |
| 229 | @@ -1555,7 +1556,13 @@ | 230 | @@ -1556,7 +1557,13 @@ |
| 230 | static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) { | 231 | static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) { |
| 231 | int r = 0; | 232 | int r = 0; |
| 232 | unsigned i; | 233 | unsigned i; |
| @@ -241,7 +242,7 @@ Index: git/src/mount.c | |||
| 241 | 242 | ||
| 242 | assert(m); | 243 | assert(m); |
| 243 | 244 | ||
| 244 | @@ -1564,26 +1571,26 @@ | 245 | @@ -1565,26 +1572,26 @@ |
| 245 | for (i = 1;; i++) { | 246 | for (i = 1;; i++) { |
| 246 | int k; | 247 | int k; |
| 247 | 248 | ||
| @@ -279,7 +280,7 @@ Index: git/src/mount.c | |||
| 279 | 280 | ||
| 280 | if (k == EOF) | 281 | if (k == EOF) |
| 281 | break; | 282 | break; |
| 282 | @@ -1607,22 +1614,12 @@ | 283 | @@ -1608,22 +1615,12 @@ |
| 283 | r = k; | 284 | r = k; |
| 284 | 285 | ||
| 285 | clean_up: | 286 | clean_up: |
| @@ -304,8 +305,8 @@ Index: git/src/mount.c | |||
| 304 | free(o); | 305 | free(o); |
| 305 | Index: git/src/umount.c | 306 | Index: git/src/umount.c |
| 306 | =================================================================== | 307 | =================================================================== |
| 307 | --- git.orig/src/umount.c 2011-08-02 11:28:04.000000000 -0700 | 308 | --- git.orig/src/umount.c 2011-09-18 19:16:53.000000000 -0700 |
| 308 | +++ git/src/umount.c 2011-08-02 11:28:16.498773772 -0700 | 309 | +++ git/src/umount.c 2011-09-18 19:38:47.215597732 -0700 |
| 309 | @@ -60,7 +60,9 @@ | 310 | @@ -60,7 +60,9 @@ |
| 310 | 311 | ||
| 311 | static int mount_points_list_get(MountPoint **head) { | 312 | static int mount_points_list_get(MountPoint **head) { |
