summaryrefslogtreecommitdiffstats
path: root/sbin/nvmecontrol/identify.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/nvmecontrol/identify.c')
-rw-r--r--sbin/nvmecontrol/identify.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/nvmecontrol/identify.c b/sbin/nvmecontrol/identify.c
index 6dcbebd..cd1d746 100644
--- a/sbin/nvmecontrol/identify.c
+++ b/sbin/nvmecontrol/identify.c
@@ -258,7 +258,7 @@ identify_ns(int argc, char *argv[])
* of the string. Don't search past 10 characters into the string,
* otherwise we know it is malformed.
*/
- nsloc = strnstr(argv[optind], "ns", 10);
+ nsloc = strnstr(argv[optind], NVME_NS_PREFIX, 10);
if (nsloc != NULL)
nsid = strtol(nsloc + 2, NULL, 10);
if (nsloc == NULL || (nsid == 0 && errno != 0)) {
@@ -314,7 +314,7 @@ identify(int argc, char *argv[])
* If device node contains "ns", we consider it a namespace,
* otherwise, consider it a controller.
*/
- if (strstr(target, "ns") == NULL)
+ if (strstr(target, NVME_NS_PREFIX) == NULL)
identify_ctrlr(argc, argv);
else
identify_ns(argc, argv);
OpenPOWER on IntegriCloud