Author: mav Date: Mon Aug 12 17:38:48 2019 New Revision: 350906 URL: https://svnweb.freebsd.org/changeset/base/350906
Log: MFC r341409 (by imp): Move common logpage routines into nvmecontrol.h For the upcoming move of vendor specific code into vendor specific files, make the common logpage routines global and move them to nvmecontrol.h. Modified: stable/12/sbin/nvmecontrol/logpage.c stable/12/sbin/nvmecontrol/nvmecontrol.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/nvmecontrol/logpage.c ============================================================================== --- stable/12/sbin/nvmecontrol/logpage.c Mon Aug 12 17:38:08 2019 (r350905) +++ stable/12/sbin/nvmecontrol/logpage.c Mon Aug 12 17:38:48 2019 (r350906) @@ -53,16 +53,9 @@ SET_DECLARE(logpage, struct logpage_function); #define LOGPAGE_USAGE \ " nvmecontrol logpage <-p page_id> [-b] [-v vendor] [-x] <controller id|namespace id>\n" \ -#define DEFAULT_SIZE (4096) #define MAX_FW_SLOTS (7) -struct kv_name -{ - uint32_t key; - const char *name; -}; - -static const char * +const char * kv_lookup(const struct kv_name *kv, size_t kv_count, uint32_t key) { static char bad[32]; Modified: stable/12/sbin/nvmecontrol/nvmecontrol.h ============================================================================== --- stable/12/sbin/nvmecontrol/nvmecontrol.h Mon Aug 12 17:38:08 2019 (r350905) +++ stable/12/sbin/nvmecontrol/nvmecontrol.h Mon Aug 12 17:38:48 2019 (r350906) @@ -69,6 +69,14 @@ struct logpage_function { } ; \ NVME_LOGPAGESET(unique ## _lpf) +#define DEFAULT_SIZE (4096) +struct kv_name { + uint32_t key; + const char *name; +}; + +const char *kv_lookup(const struct kv_name *kv, size_t kv_count, uint32_t key); + #define NVME_CTRLR_PREFIX "nvme" #define NVME_NS_PREFIX "ns" _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"