5 * Given a string (eg /dev/sda1, sda1 or UUID=B8E53381CA9EA0E3), parse the
6 * device path (eg /dev/sda1). Any device descriptions read from config files
7 * should be parsed into the path first.
9 * The cur_dev is provided for some remapping situations. If NULL is provided,
10 * no remapping will be done.
12 * Returns a newly-allocated string.
14 char *parse_device_path(const char *dev_str, const char *current_device);
17 * Get the mountpoint for a device.
19 const char *mountpoint_for_device(const char *dev);
22 * Resolve a path given in a config file, to a path in the local filesystem.
23 * Paths may be of the form:
24 * device:path (eg /dev/sda:/boot/vmlinux)
28 * - in this case, the current mountpoint is used.
30 * Returns a newly-allocated string containing a full path to the file in path
32 char *resolve_path(const char *path, const char *current_device);
36 * Set the base directory for newly-created mountpoints
38 void set_mount_base(const char *path);
41 * Utility function for joining two paths. Adds a / between a and b if
44 * Returns a newly-allocated string.
46 char *join_paths(const char *a, const char *b);
49 * encode a disk label (or uuid) for use in a symlink.
51 char *encode_label(const char *label);