libfstools: use container_of for volume private data
[project/fstools.git] / libfstools / libfstools.h
index 1d41eea42feafa3aa8ffe92b79bf95210a7d9581..ec760f4a33b72ae8f861d1d04cf39bdb435f6cb9 100644 (file)
@@ -17,6 +17,7 @@
 #include <libubox/list.h>
 #include <libubox/blob.h>
 #include <libubox/ulog.h>
+#include <libubox/utils.h>
 
 struct volume;
 
@@ -28,6 +29,13 @@ enum {
        FS_UBIFS,
 };
 
+enum fs_state {
+       FS_STATE_UNKNOWN,
+       FS_STATE_PENDING,
+       FS_STATE_READY,
+       __FS_STATE_LAST = FS_STATE_READY,
+};
+
 extern char const *extroot_prefix;
 extern int mount_extroot(void);
 extern int mount_snapshot(struct volume *v);
@@ -50,4 +58,7 @@ extern void foreachdir(const char *dir, int (*cb)(const char*));
 
 extern void overlay_delete(const char *dir, bool keep_sysupgrade);
 
+enum fs_state fs_state_get(const char *dir);
+int fs_state_set(const char *dir, enum fs_state state);
+
 #endif