]> git.ozlabs.org Git - petitboot/blob - devices/paths.h
Move path maniuplation functions to devices/paths.c
[petitboot] / devices / paths.h
1 #ifndef PATHS_H
2 #define PATHS_H
3
4 /**
5  * Get the mountpoint for a device
6  */
7 const char *mountpoint_for_device(const char *dev_path);
8
9 /**
10  * Resolve a path given in a config file, to a path in the local filesystem.
11  * Paths may be of the form:
12  *  device:path (eg /dev/sda:/boot/vmlinux)
13  *
14  * or just a path:
15  *  /boot/vmlinux
16  * - in this case, the current mountpoint is used.
17  *
18  * Returns a newly-allocated string containing a full path to the file in path
19  */
20 char *resolve_path(const char *path, const char *current_mountpoint);
21
22 /**
23  * Set the base directory for newly-created mountpoints
24  */
25 void set_mount_base(const char *path);
26
27 #endif /* PATHS_H */