diff --git a/luks.c b/luks.c index 466b6d5..6cdad10 100644 --- a/luks.c +++ b/luks.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "exec.h" #include "luks.h" @@ -52,10 +53,13 @@ bool isLuks(const char *aBlockDevice) { /* Returns if the given device mapper name is available (i.e. not active at the * moment) */ bool isLuksMapperAvailable(const char *aMapperName) { + char *bname; + bname = basename(aMapperName); + const char *arguments[] = { "cryptsetup", "status", - aMapperName, + bname, NULL };