Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175404440
D60199.id188691.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D60199.id188691.diff
View Options
Index: sys/compat/linuxkpi/common/include/linux/uuid.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/uuid.h
+++ sys/compat/linuxkpi/common/include/linux/uuid.h
@@ -60,6 +60,12 @@
char x[16];
} guid_t;
+/* Renamed to stay clear of the other uuid_t types in the tree. */
+typedef struct {
+ uint8_t b[UUID_SIZE];
+} linux_uuid_t;
+#define uuid_t linux_uuid_t
+
extern const guid_t guid_null;
static inline void
@@ -101,4 +107,28 @@
return (guid_equal(guid, &guid_null));
}
+static inline bool
+uuid_equal(const uuid_t *u1, const uuid_t *u2)
+{
+ return (memcmp(u1, u2, sizeof(uuid_t)) == 0);
+}
+
+static inline void
+uuid_copy(uuid_t *dst, const uuid_t *src)
+{
+ memcpy(dst, src, sizeof(uuid_t));
+}
+
+static inline void
+import_uuid(uuid_t *dst, const uint8_t *src)
+{
+ memcpy(dst, src, sizeof(uuid_t));
+}
+
+static inline void
+export_uuid(uint8_t *dst, const uuid_t *src)
+{
+ memcpy(dst, src, sizeof(uuid_t));
+}
+
#endif /* _LINUXKPI_LINUX_UUID_H */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 11, 3:11 PM (17 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40482388
Default Alt Text
D60199.id188691.diff (1 KB)
Attached To
Mode
D60199: linuxkpi: add uuid_t and helpers
Attached
Detach File
Event Timeline
Log In to Comment