svn commit: r285796 - head/sbin/nvmecontrol
Jim Harris
jimharris at FreeBSD.org
Wed Jul 22 16:10:30 UTC 2015
Author: jimharris
Date: Wed Jul 22 16:10:29 2015
New Revision: 285796
URL: https://svnweb.freebsd.org/changeset/base/285796
Log:
nvmecontrol: read controller identify data before any log page operations
MFC after: 3 days
Sponsored by: Intel
Modified:
head/sbin/nvmecontrol/logpage.c
Modified: head/sbin/nvmecontrol/logpage.c
==============================================================================
--- head/sbin/nvmecontrol/logpage.c Wed Jul 22 15:39:41 2015 (r285795)
+++ head/sbin/nvmecontrol/logpage.c Wed Jul 22 16:10:29 2015 (r285796)
@@ -298,6 +298,8 @@ logpage(int argc, char *argv[])
open_dev(argv[optind], &fd, 1, 1);
}
+ read_controller_data(fd, &cdata);
+
/*
* The log page attribtues indicate whether or not the controller
* supports the SMART/Health information log page on a per
@@ -307,7 +309,6 @@ logpage(int argc, char *argv[])
if (log_page != NVME_LOG_HEALTH_INFORMATION)
errx(1, "log page %d valid only at controller level",
log_page);
- read_controller_data(fd, &cdata);
if (cdata.lpa.ns_smart == 0)
errx(1,
"controller does not support per namespace "
More information about the svn-src-all
mailing list