summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/util-linux
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2013-06-10 15:15:55 +1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-13 17:38:04 +0100
commit70cf6ee7c3ef5069b577253d0d4edf6190ea36d2 (patch)
treec801ff07e31e7ce037ddae33f572a0554fca71e6 /meta/recipes-core/util-linux
parent35447ea72a1a2141a9bf88181876cb7efc84aa48 (diff)
downloadpoky-70cf6ee7c3ef5069b577253d0d4edf6190ea36d2.tar.gz
util-linux: update to 2.23.1
Removed patches integrated upstream. (From OE-Core rev: 4f7c228c841ce1244e92bceeef363e29748adadd) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/util-linux')
-rw-r--r--meta/recipes-core/util-linux/util-linux/0001-lib-loopdev-fix-loopcxt_check_size-to-work-with-blkd.patch60
-rw-r--r--meta/recipes-core/util-linux/util-linux/0001-losetup-use-warn_size-for-regular-files-only.patch29
-rw-r--r--meta/recipes-core/util-linux/util-linux_2.23.1.bb (renamed from meta/recipes-core/util-linux/util-linux_2.23.bb)7
3 files changed, 2 insertions, 94 deletions
diff --git a/meta/recipes-core/util-linux/util-linux/0001-lib-loopdev-fix-loopcxt_check_size-to-work-with-blkd.patch b/meta/recipes-core/util-linux/util-linux/0001-lib-loopdev-fix-loopcxt_check_size-to-work-with-blkd.patch
deleted file mode 100644
index d1093f21ef..0000000000
--- a/meta/recipes-core/util-linux/util-linux/0001-lib-loopdev-fix-loopcxt_check_size-to-work-with-blkd.patch
+++ /dev/null
@@ -1,60 +0,0 @@
1Upstream-Status: Backport
2Signed-off-by: Jonathan Liu <net147@gmail.com>
3
4From e3b6cb87e0ba1304fa07ec316784de1c6243b28e Mon Sep 17 00:00:00 2001
5From: Karel Zak <kzak@redhat.com>
6Date: Mon, 13 May 2013 10:54:41 +0200
7Subject: [PATCH] lib/loopdev: fix loopcxt_check_size() to work with blkdevs
8
9The loopcxt_check_size() is workaround for kernels < v3.9, kernel has
10been fixed by commit 541c742a7559eb65f0e36d3e2338c2ca532a3e61.
11
12The function sets loopdev size according to backing file size. The
13problem is that the backing file could be a block device where
14stat.st_size is zero, so we have to use blkdev_get_size() for block
15devices.
16
17Addresses: https://bugs.archlinux.org/task/35193
18Reported-by: Dave Reisner <d@falconindy.com>
19Signed-off-by: Karel Zak <kzak@redhat.com>
20---
21 lib/loopdev.c | 16 +++++++++++++++-
22 1 file changed, 15 insertions(+), 1 deletion(-)
23
24diff --git a/lib/loopdev.c b/lib/loopdev.c
25index c35e306..3b65b5d 100644
26--- a/lib/loopdev.c
27+++ b/lib/loopdev.c
28@@ -1097,7 +1097,17 @@ static int loopcxt_check_size(struct loopdev_cxt *lc, int file_fd)
29 if (fstat(file_fd, &st))
30 return -errno;
31
32- expected_size = st.st_size;
33+ if (S_ISBLK(st.st_mode)) {
34+ if (blkdev_get_size(file_fd,
35+ (unsigned long long *) &expected_size))
36+ return -errno;
37+ } else
38+ expected_size = st.st_size;
39+
40+ if (expected_size == 0 || expected_size <= lc->info.lo_offset) {
41+ DBG(lc, loopdev_debug("failed to determine expected size"));
42+ return 0; /* ignore this error */
43+ }
44
45 if (lc->info.lo_offset > 0)
46 expected_size -= lc->info.lo_offset;
47@@ -1113,6 +1123,10 @@ static int loopcxt_check_size(struct loopdev_cxt *lc, int file_fd)
48 return -errno;
49
50 if (expected_size != size) {
51+ DBG(lc, loopdev_debug("warning: loopdev and expected "
52+ "size dismatch (%ju/%ju)",
53+ size, expected_size));
54+
55 if (loopcxt_set_capacity(lc)) {
56 /* ioctl not available */
57 if (errno == ENOTTY || errno == EINVAL)
58--
591.8.2.3
60
diff --git a/meta/recipes-core/util-linux/util-linux/0001-losetup-use-warn_size-for-regular-files-only.patch b/meta/recipes-core/util-linux/util-linux/0001-losetup-use-warn_size-for-regular-files-only.patch
deleted file mode 100644
index 3382e7fc1d..0000000000
--- a/meta/recipes-core/util-linux/util-linux/0001-losetup-use-warn_size-for-regular-files-only.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1Upstream-Status: Backport
2Signed-off-by: Jonathan Liu <net147@gmail.com>
3
4From b048b8af3a5568c90f6e0c2d56f6cb399dedb0d1 Mon Sep 17 00:00:00 2001
5From: Karel Zak <kzak@redhat.com>
6Date: Mon, 13 May 2013 11:00:47 +0200
7Subject: [PATCH] losetup: use warn_size() for regular files only
8
9Signed-off-by: Karel Zak <kzak@redhat.com>
10---
11 sys-utils/losetup.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c
15index ccf120e..b44c9e5 100644
16--- a/sys-utils/losetup.c
17+++ b/sys-utils/losetup.c
18@@ -380,7 +380,7 @@ static void warn_size(const char *filename, uint64_t size)
19 struct stat st;
20
21 if (!size) {
22- if (stat(filename, &st))
23+ if (stat(filename, &st) || S_ISBLK(st.st_mode))
24 return;
25 size = st.st_size;
26 }
27--
281.8.2.3
29
diff --git a/meta/recipes-core/util-linux/util-linux_2.23.bb b/meta/recipes-core/util-linux/util-linux_2.23.1.bb
index b85df21d00..12f50212f2 100644
--- a/meta/recipes-core/util-linux/util-linux_2.23.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.23.1.bb
@@ -1,5 +1,4 @@
1MAJOR_VERSION = "2.23" 1MAJOR_VERSION = "2.23"
2PR = "r0"
3require util-linux.inc 2require util-linux.inc
4 3
5# To support older hosts, we need to patch and/or revert 4# To support older hosts, we need to patch and/or revert
@@ -12,13 +11,11 @@ SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \
12 file://uclibc-__progname-conflict.patch \ 11 file://uclibc-__progname-conflict.patch \
13 file://configure-sbindir.patch \ 12 file://configure-sbindir.patch \
14 file://fix-configure.patch \ 13 file://fix-configure.patch \
15 file://0001-lib-loopdev-fix-loopcxt_check_size-to-work-with-blkd.patch \
16 file://0001-losetup-use-warn_size-for-regular-files-only.patch \
17 ${OLDHOST} \ 14 ${OLDHOST} \
18" 15"
19 16
20SRC_URI[md5sum] = "7bd10387f1aa00efaa4b07dfa13215bc" 17SRC_URI[md5sum] = "6741eeaff93ff5a6bacdd3816bdd87c4"
21SRC_URI[sha256sum] = "19ee024b4c6678eaa928d38edc011c332b088e0ff06239575f6b7e00a1855959" 18SRC_URI[sha256sum] = "ad4a7831d7b27d0172996fd343e809716c2403b32a94e15194d8ea797223c4af"
22 19
23CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=as" 20CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=as"
24EXTRA_OECONF_class-native += "--disable-fallocate --disable-use-tty-group" 21EXTRA_OECONF_class-native += "--disable-fallocate --disable-use-tty-group"