From fe3fdf96756384a3f01711633c079fadae85d4b0 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 18 Oct 2013 17:10:55 +0200 Subject: the parser patch is broken for eglibc builds, libmount subpackage missing --- .../patches/patch-libmount_src_tab_parse_c | 82 ---------------------- 1 file changed, 82 deletions(-) delete mode 100644 package/util-linux/patches/patch-libmount_src_tab_parse_c (limited to 'package/util-linux/patches/patch-libmount_src_tab_parse_c') diff --git a/package/util-linux/patches/patch-libmount_src_tab_parse_c b/package/util-linux/patches/patch-libmount_src_tab_parse_c deleted file mode 100644 index 9abf59d71..000000000 --- a/package/util-linux/patches/patch-libmount_src_tab_parse_c +++ /dev/null @@ -1,82 +0,0 @@ ---- util-linux-2.23.2.orig/libmount/src/tab_parse.c 2013-07-30 10:39:26.000000000 +0200 -+++ util-linux-2.23.2/libmount/src/tab_parse.c 2013-08-14 11:39:26.000000000 +0200 -@@ -16,6 +16,8 @@ - #include - #include - -+#define UL_SCNsA "%ms" -+ - #include "at.h" - #include "mangle.h" - #include "mountP.h" -@@ -59,18 +61,21 @@ static int next_number(char **s, int *nu - static int mnt_parse_table_line(struct libmnt_fs *fs, char *s) - { - int rc, n = 0, xrc; -- char *src = NULL, *fstype = NULL, *optstr = NULL; -+ int len = strlen (s) + 1; -+ char *fstype = malloc (sizeof *fstype * len); -+ char *optstr = malloc (sizeof *optstr * len); -+ char *src = malloc (sizeof *src * len); - -- rc = sscanf(s, UL_SCNsA" " /* (1) source */ -- UL_SCNsA" " /* (2) target */ -- UL_SCNsA" " /* (3) FS type */ -- UL_SCNsA" " /* (4) options */ -+ rc = sscanf(s, "%s"" " /* (1) source */ -+ "%s"" " /* (2) target */ -+ "%s"" " /* (3) FS type */ -+ "%s"" " /* (4) options */ - "%n", /* byte count */ - -- &src, -- &fs->target, -- &fstype, -- &optstr, -+ src, -+ fs->target, -+ fstype, -+ optstr, - &n); - xrc = rc; - -@@ -135,13 +140,18 @@ static int mnt_parse_mountinfo_line(stru - int rc, end = 0; - unsigned int maj, min; - char *fstype = NULL, *src = NULL, *p; -+ int len = strlen (s) + 1; -+ -+ fs->root = malloc (sizeof *fs->root * len); -+ fs->target = malloc (sizeof *fs->target * len); -+ fs->vfs_optstr = malloc (sizeof *fs->vfs_optstr * len); - - rc = sscanf(s, "%u " /* (1) id */ - "%u " /* (2) parent */ - "%u:%u " /* (3) maj:min */ -- UL_SCNsA" " /* (4) mountroot */ -- UL_SCNsA" " /* (5) target */ -- UL_SCNsA /* (6) vfs options (fs-independent) */ -+ "%s"" " /* (4) mountroot */ -+ "%s"" " /* (5) target */ -+ "%s" /* (6) vfs options (fs-independent) */ - "%n", /* number of read bytes */ - - &fs->id, -@@ -164,10 +174,14 @@ static int mnt_parse_mountinfo_line(stru - if (p > s + 1) - fs->opt_fields = strndup(s + 1, p - s - 1); - s = p + 3; -+ len = strlen (s) + 1; -+ fstype = malloc (sizeof *fstype * len); -+ src = malloc (sizeof *src * len); -+ fs->fs_optstr = malloc (sizeof *fs->fs_optstr * len); - -- rc += sscanf(s, UL_SCNsA" " /* (8) FS type */ -- UL_SCNsA" " /* (9) source */ -- UL_SCNsA, /* (10) fs options (fs specific) */ -+ rc += sscanf(s, "%s"" " /* (8) FS type */ -+ "%s"" " /* (9) source */ -+ "%s", /* (10) fs options (fs specific) */ - - &fstype, - &src, -- cgit v1.2.3