]> git.ozlabs.org Git - petitboot/blobdiff - discover/resource.h
discover: Add struct resource
[petitboot] / discover / resource.h
diff --git a/discover/resource.h b/discover/resource.h
new file mode 100644 (file)
index 0000000..b7e1a46
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef RESOURCE_H
+#define RESOURCE_H
+
+#include <stdbool.h>
+
+struct pb_url;
+
+/**
+ * Data for local/remote resources. Resources may be "unresolved", in that
+ * they refer to a device that is not yet present. Unresolved resources
+ * simply contain parser-specific data (generally a device string parsed from
+ * the config file), and may be resolved by the parser once new devices appear.
+ */
+struct resource {
+       bool resolved;
+       union {
+               struct pb_url   *url;
+               void            *info;
+       };
+};
+
+#endif /* RESOURCE_H */
+