diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-11-25 11:54:01 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-11-25 10:57:51 +0000 |
commit | aa84604b4657f1753c8ba1181d4ac709d8eb13b8 (patch) | |
tree | 9376ee01f74dcb5bf1a76afd4c4dadcb65adeb52 /nlplug-findfs.c | |
parent | ec0acf32171795ff6f108598dff76f9f46b7cf57 (diff) | |
download | mkinitfs-aa84604b4657f1753c8ba1181d4ac709d8eb13b8.tar.bz2 mkinitfs-aa84604b4657f1753c8ba1181d4ac709d8eb13b8.tar.xz |
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.
Diffstat (limited to 'nlplug-findfs.c')
-rw-r--r-- | nlplug-findfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |