]> git.ozlabs.org Git - petitboot/blob - discover/paths.h
93788e9d863fb7331535fcbec97df3ae72edb192
[petitboot] / discover / paths.h
1 #ifndef PATHS_H
2 #define PATHS_H
3
4 #include <url/url.h>
5
6 /**
7  * Utility function for joining two paths. Adds a / between a and b if
8  * required.
9  *
10  * Returns a newly-allocated string.
11  */
12 char *join_paths(void *alloc_ctx, const char *a, const char *b);
13
14 /**
15  * Returns the base path for mount points
16  */
17 const char *mount_base(void);
18
19 typedef void (*load_url_callback)(void *data, int *status);
20
21 /* Load a (potentially remote) file, and return a guaranteed-local name */
22 char *load_url_async(void *ctx, struct pb_url *url, unsigned int *tempfile,
23                 load_url_callback url_cb);
24
25 char *load_url(void *ctx, struct pb_url *url, unsigned int *tempfile);
26
27 #endif /* PATHS_H */