Page Menu
Home
ClusterLabs Projects
Search
Configure Global Search
Log In
Files
F3153172
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
949 B
Referenced Files
None
Subscribers
None
View Options
diff --git a/include/static_map.h b/include/static_map.h
new file mode 100644
index 00000000..36600186
--- /dev/null
+++ b/include/static_map.h
@@ -0,0 +1,32 @@
+#ifndef _STATIC_MAP_H
+#define _STATIC_MAP_H
+
+typedef int (*map_load_t)(void *config, void **perm_info);
+typedef int (*map_check_t)(void *info, const char *src, const char *tgt);
+typedef void (*map_cleanup_t)(void **info);
+
+typedef struct {
+ map_load_t load;
+ map_check_t check;
+ map_cleanup_t cleanup;
+ void *info;
+} map_object_t;
+
+/*
+ * These macros may be called from within a loadable module
+ */
+#define map_load(obj, config) \
+ obj->load(config, &obj->info)
+#define map_check(obj, src, tgt) \
+ obj->check(obj->info, src, tgt)
+#define map_free(obj) \
+ obj->cleanup(obj->info)
+
+/* Returns a copy of our simple config object */
+void *map_init(void);
+
+/* Frees a previously-allocated copy of our simple config object */
+void map_release(void *c);
+
+
+#endif
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Feb 25, 12:31 PM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1464824
Default Alt Text
(949 B)
Attached To
Mode
rF Fence Agents
Attached
Detach File
Event Timeline
Log In to Comment