From aa84604b4657f1753c8ba1181d4ac709d8eb13b8 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 25 Nov 2015 11:54:01 +0100 Subject: 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. --- nlplug-findfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nlplug-findfs.c') diff --git a/nlplug-findfs.c b/nlplug-findfs.c index acd8955..cccc359 100644 --- a/nlplug-findfs.c +++ b/nlplug-findfs.c @@ -713,7 +713,8 @@ static int dispatch_uevent(struct uevent *ev, struct ueventconf *conf) 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); } -- cgit v1.2.3