[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] include/qemu: Add documentation to functions in inc
From: |
Veronia Bahaa |
Subject: |
[Qemu-devel] [PATCH] include/qemu: Add documentation to functions in include/qemu/id.h |
Date: |
Sun, 16 Oct 2016 23:03:47 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Add documentation to the functions id_generate and id_wellformed in
include/qemu/id.h
Signed-off-by: Veronia Bahaa <address@hidden>
---
include/qemu/id.h | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/include/qemu/id.h b/include/qemu/id.h
index 40c7010..7bbcdc0 100644
--- a/include/qemu/id.h
+++ b/include/qemu/id.h
@@ -7,7 +7,30 @@ typedef enum IdSubSystems {
ID_MAX /* last element, used as array size */
} IdSubSystems;
+/**
+ * id_generate: Generates an ID of the form PREFIX SUBSYSTEM NUMBER
+ * where:
+ *
+ * - PREFIX is the reserved character '#'
+ * - SUBSYSTEM identifies the subsystem creating the ID
+ * - NUMBER is a decimal number unique within SUBSYSTEM.
+ *
+ * Example: "#block146"
+ *
+ * Returns the generated id string for the subsystem
+ *
+ * @id: the subsystem to generate an id for
+ */
char *id_generate(IdSubSystems id);
+
+/**
+ * id_wellformed: checks that an id starts with a letter
+ * followed by numbers, digits, '-','.', or '_'
+ *
+ * Returns %true if the id is well-formed
+ *
+ * @id: the id to be checked
+ */
bool id_wellformed(const char *id);
#endif
--
1.7.9.5
- [Qemu-devel] [PATCH] include/qemu: Add documentation to functions in include/qemu/id.h,
Veronia Bahaa <=