aports/main/busybox/0011-fsck-resolve-LABEL-.-UUID-.-spec-to-device.patch
Sören Tempel b376b515fe main/busybox: upgrade to 1.36.0
Notable new features:

* HW acceleration for SHA1 and SHA256
	* Supported upstream for x86 and x86_64
	* Broken on x86 musl: http://lists.busybox.net/pipermail/busybox/2023-January/090078.html
* sleep(1) is an ash builtin now
* Custom helper script can now be supplied for udhcpc6
	* We still use /usr/share/udhcpc/default.script for both udhcpc and udhcpc6
	* It seems our default.script is not designed for IPv6 support
	* It may also be worthwhile to move udhcpc6 to -extra in the future
* Various bug fixes

New upstream applets:

* seedrng disabled in Alpine as it is provided by OpenRC already
* tsort (topological sort) disabled in Alpine
* tree (directory listings) enabled in Alpine
2023-01-12 15:07:31 +00:00

60 lines
1.9 KiB
Diff

From df153459261ed2683ebb7ab766eaee6b741426ae Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 28 Nov 2017 16:30:23 +0100
Subject: [PATCH] fsck: resolve LABEL=.../UUID=... spec to device
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
e2fsprogs/fsck.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index 028f8a803..7a0921979 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -60,6 +60,7 @@
//usage: "\n -t TYPE List of filesystem types to check"
#include "libbb.h"
+#include "volume_id.h"
#include "common_bufsiz.h"
/* "progress indicator" code is somewhat buggy and ext[23] specific.
@@ -524,12 +525,13 @@ static int wait_many(int flags)
* Execute a particular fsck program, and link it into the list of
* child processes we are waiting for.
*/
-static void execute(const char *type, const char *device,
+static void execute(const char *type, const char *spec,
const char *mntpt /*, int interactive */)
{
int i;
struct fsck_instance *inst;
pid_t pid;
+ char *device = (char *)spec;
G.args[0] = xasprintf("fsck.%s", type);
@@ -544,7 +546,8 @@ static void execute(const char *type, const char *device,
}
#endif
- G.args[G.num_args - 2] = (char*)device;
+ resolve_mount_spec(&device);
+ G.args[G.num_args - 2] = device;
/* G.args[G.num_args - 1] = NULL; - already is */
if (G.verbose || G.noexecute) {
@@ -973,9 +976,6 @@ int fsck_main(int argc UNUSED_PARAM, char **argv)
/* "/dev/blk" or "/path" or "UUID=xxx" or "LABEL=xxx" */
if ((arg[0] == '/' && !opts_for_fsck) || strchr(arg, '=')) {
-// FIXME: must check that arg is a blkdev, or resolve
-// "/path", "UUID=xxx" or "LABEL=xxx" into block device name
-// ("UUID=xxx"/"LABEL=xxx" can probably shifted to fsck.auto duties)
devices = xrealloc_vector(devices, 2, num_devices);
devices[num_devices++] = arg;
continue;