summaryrefslogtreecommitdiffstats
path: root/discover/paths.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2008-12-16 15:33:59 +1100
committerJeremy Kerr <jk@ozlabs.org>2008-12-16 15:33:59 +1100
commit5eb7f7bcd3431cd8f634b02b71bd78f6162c2af3 (patch)
tree57df6d3f151466e7acc43e2d6264d9f08ba9b86f /discover/paths.h
parentaff253f850e7391afc82d339c0e51ce31e87f307 (diff)
downloadtalos-petitboot-5eb7f7bcd3431cd8f634b02b71bd78f6162c2af3.tar.gz
talos-petitboot-5eb7f7bcd3431cd8f634b02b71bd78f6162c2af3.zip
Initial device handler code
Mount discovered devices, and set up symlinks for UUID and LABELs Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/paths.h')
-rw-r--r--discover/paths.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/discover/paths.h b/discover/paths.h
index 26d4ce4..e7c23e5 100644
--- a/discover/paths.h
+++ b/discover/paths.h
@@ -11,7 +11,8 @@
*
* Returns a newly-allocated string.
*/
-char *parse_device_path(const char *dev_str, const char *current_device);
+char *parse_device_path(void *alloc_ctx,
+ const char *dev_str, const char *current_device);
/**
* Get the mountpoint for a device.
@@ -29,13 +30,8 @@ const char *mountpoint_for_device(const char *dev);
*
* Returns a newly-allocated string containing a full path to the file in path
*/
-char *resolve_path(const char *path, const char *current_device);
-
-
-/**
- * Set the base directory for newly-created mountpoints
- */
-void set_mount_base(const char *path);
+char *resolve_path(void *alloc_ctx,
+ const char *path, const char *current_device);
/**
* Utility function for joining two paths. Adds a / between a and b if
@@ -43,11 +39,16 @@ void set_mount_base(const char *path);
*
* Returns a newly-allocated string.
*/
-char *join_paths(const char *a, const char *b);
+char *join_paths(void *alloc_ctx, const char *a, const char *b);
/**
* encode a disk label (or uuid) for use in a symlink.
*/
-char *encode_label(const char *label);
+char *encode_label(void *alloc_ctx, const char *label);
+
+/**
+ * Returns the base path for mount points
+ */
+const char *mount_base(void);
#endif /* PATHS_H */
OpenPOWER on IntegriCloud