From: Keith Busch Date: Thu, 3 Mar 2016 20:20:16 +0000 (-0700) Subject: Simplify show-regs X-Git-Tag: v0.5~9 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c89645fe4136564bc90f668c3940e967caab1b94;p=users%2Fsagi%2Fnvme-cli.git Simplify show-regs You only need to specify the name of the device. The character or block device was never necessary to show the registers since we're opening the sysfs resource entry. This is backwards compatibles with the old way as the basename was stripped from the path before. Signed-off-by: Keith Busch --- diff --git a/nvme.c b/nvme.c index fbf5ada3..560b9200 100644 --- a/nvme.c +++ b/nvme.c @@ -1239,7 +1239,7 @@ static int show_registers(int argc, char **argv) while ((opt = getopt_long(argc, (char **)argv, "", NULL, &long_index)) != -1); - get_dev(argc, argv); + devicename = basename(argv[optind]); get_registers(&bar); printf("cap : ");