Page MenuHomeFreeBSD

D44649.id.diff
No OneTemporary

D44649.id.diff

diff --git a/sbin/nvmecontrol/nvmecontrol.h b/sbin/nvmecontrol/nvmecontrol.h
--- a/sbin/nvmecontrol/nvmecontrol.h
+++ b/sbin/nvmecontrol/nvmecontrol.h
@@ -60,6 +60,17 @@
const char *name;
};
+/*
+ * Generically convert little endian to host endian, based on the type of the thing
+ * being converted. Use the proposed name for future changes to endian.h.
+ */
+#define letoh(x) \
+ _Generic(x, \
+ uint8_t: (x), \
+ uint16_t: le16toh(x), \
+ uint32_t: le32toh(x), \
+ uint64_t: le64toh(x))
+
const char *kv_lookup(const struct kv_name *kv, size_t kv_count, uint32_t key);
void logpage_register(struct logpage_function *p);

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 15, 8:09 PM (20 m, 33 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31553580
Default Alt Text
D44649.id.diff (661 B)

Event Timeline