Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144302832
D44649.id136612.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
605 B
Referenced Files
None
Subscribers
None
D44649.id136612.diff
View Options
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;
};
+/*
+ * Genericly convert little endian to host endian, based on the type of the thing
+ * being converted.
+ */
+#define LE2H(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
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 8, 6:05 PM (16 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28481218
Default Alt Text
D44649.id136612.diff (605 B)
Attached To
Mode
D44649: nvmecontrol: Create letoh generically convert to host order
Attached
Detach File
Event Timeline
Log In to Comment