diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c index ac0994d1e..d5f995825 100644 --- a/libdm/libdm-common.c +++ b/libdm/libdm-common.c @@ -35,8 +35,16 @@ void _default_log(int level, const char *file, int line, { va_list ap; + if (level > _LOG_WARN) + return; + va_start(ap, f); - vfprintf(stderr, f, ap); + + if (level == _LOG_WARN) + vprintf(f, ap); + else + vfprintf(stderr, f, ap); + va_end(ap); fprintf(stderr, "\n"); diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 6d63cccaa..970d5747c 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -254,6 +254,8 @@ static int _info(int argc, char **argv) goto out; } + printf("Name: %s\n", argv[1]); + printf("State: %s\n", info.suspended ? "SUSPENDED" : "ACTIVE");