fprintf() expects a format string. Update the error string handling to
usual pattern.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
static int get_ns_id(int argc, char **argv, struct command *cmd, struct plugin *plugin)
{
- const char *desc = "Get namespce ID of a the block device.";
+ const char *desc = "Get namespace ID of a the block device.";
int err = 0, fd;
unsigned int nsid;
err = nvme_get_nsid(fd, &nsid);
if (err <= 0) {
- fprintf(stderr, devicename);
+ fprintf(stderr, "get namespace ID: %s\n", nvme_strerror(errno));
err = errno;
goto close_fd;
}