home: hub: mkinitfs

Download patch

ref: aa84604b4657f1753c8ba1181d4ac709d8eb13b8
parent: ec0acf32171795ff6f108598dff76f9f46b7cf57
author: Natanael Copa <ncopa@alpinelinux.org>
date: Wed Nov 25 05:54:01 CST 2015

nlplug-findfs: print device name user expects

we want print the device name that user is looking for when we prompt
for cryptsetup password instead of the devname from kernel uevent.

If user specified UUID, then we print kernel provided name.

--- a/nlplug-findfs.c
+++ b/nlplug-findfs.c
@@ -713,7 +713,8 @@
 				return rc;
 
 			if (searchdev(ev, conf->crypt_device, NULL, NULL)) {
-				strncpy(conf->crypt_devnode, ev->devnode,
+				strncpy(conf->crypt_devnode,
+					conf->crypt_device[0] == '/' ? conf->crypt_device : ev->devnode,
 					sizeof(conf->crypt_devnode));
 				start_cryptsetup(conf);
 			}