Skip to content

Commit 0b3eff3

Browse files
committed
nvme: return earlier when we have bdev-ns for smart-log command
Signed-off-by: Yi Zhang <[email protected]>
1 parent cba763f commit 0b3eff3

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

nvme.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,11 @@ static int get_smart_log(int argc, char **argv, struct command *cmd, struct plug
564564
if (err)
565565
return err;
566566

567+
if (is_blkdev(dev)) {
568+
nvme_show_error("Only character device is allowed");
569+
return -EINVAL;
570+
}
571+
567572
err = validate_output_format(nvme_cfg.output_format, &flags);
568573
if (err < 0) {
569574
nvme_show_error("Invalid output format");

0 commit comments

Comments
 (0)