Fix status of device if path argument is used. Fix double path prefix for non-existent device path.

This commit is contained in:
Milan Broz
2012-12-30 11:33:24 +01:00
parent 90853cc3ab
commit 0946c704bf
3 changed files with 11 additions and 2 deletions

View File

@@ -374,13 +374,12 @@ static int action_status(void)
crypt_status_info ci;
struct crypt_active_device cad;
struct crypt_device *cd = NULL;
struct stat st;
char *backing_file;
const char *device;
int path = 0, r = 0;
/* perhaps a path, not a dm device name */
if (strchr(action_argv[0], '/') && !stat(action_argv[0], &st))
if (strchr(action_argv[0], '/'))
path = 1;
ci = crypt_status(NULL, action_argv[0]);