From fb1e05080b0662f50da7e551b4f8823b9fd10387 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 22 Oct 2015 14:27:02 +0000 Subject: nlplug-findfs: support search for /dev/ this is so we also can specify cryptroot=/dev/sdaX at boot prompt --- nlplug-findfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nlplug-findfs.c b/nlplug-findfs.c index 547fb76..f1a58fd 100644 --- a/nlplug-findfs.c +++ b/nlplug-findfs.c @@ -430,14 +430,15 @@ int searchdev(char *devname, const char *searchdev, char *bootrepos, if (searchdev == NULL && bootrepos == NULL && apkovls == NULL) return 0; - if (searchdev && strcmp(devname, searchdev) == 0) { + snprintf(devnode, sizeof(devnode), "/dev/%s", devname); + if (searchdev && (strcmp(devname, searchdev) == 0 + || strcmp(devnode, searchdev) == 0)) { return FOUND_DEVICE; } if (cache == NULL) blkid_get_cache(&cache, NULL); - snprintf(devnode, sizeof(devnode), "/dev/%s", devname); type = blkid_get_tag_value(cache, "TYPE", devnode); if (searchdev != NULL) { -- cgit v1.2.3