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(void *alloc_ctx,
15 const char *dev_str, const char *current_device);
18 * Get the mountpoint for a device.
20 const char *mountpoint_for_device(const char *dev);
23 * Resolve a path given in a config file, to a path in the local filesystem.
24 * Paths may be of the form:
25 * device:path (eg /dev/sda:/boot/vmlinux)
29 * - in this case, the current mountpoint is used.
31 * Returns a newly-allocated string containing a full path to the file in path
33 char *resolve_path(void *alloc_ctx,
34 const char *path, const char *current_device);
37 * Utility function for joining two paths. Adds a / between a and b if
40 * Returns a newly-allocated string.
42 char *join_paths(void *alloc_ctx, const char *a, const char *b);
45 * encode a disk label (or uuid) for use in a symlink.
47 char *encode_label(void *alloc_ctx, const char *label);
50 * Returns the base path for mount points
52 const char *mount_base(void);