Changeset View
Changeset View
Standalone View
Standalone View
sbin/nvmecontrol/nsid.c
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | |||||
static void | static void | ||||
gnsid(const struct cmd *f, int argc, char *argv[]) | gnsid(const struct cmd *f, int argc, char *argv[]) | ||||
{ | { | ||||
char *path; | char *path; | ||||
int fd; | int fd; | ||||
uint32_t nsid; | uint32_t nsid; | ||||
arg_parse(argc, argv, f); | if (arg_parse(argc, argv, f)) | ||||
return; | |||||
open_dev(nsid_opt.dev, &fd, 1, 1); | open_dev(nsid_opt.dev, &fd, 1, 1); | ||||
get_nsid(fd, &path, &nsid); | get_nsid(fd, &path, &nsid); | ||||
close(fd); | close(fd); | ||||
printf("%s\t%u\n", path, nsid); | printf("%s\t%u\n", path, nsid); | ||||
free(path); | free(path); | ||||
} | } |