diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-03-31 20:38:24 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-04-01 11:40:02 -0400 |
commit | 4f05a9d066337a883d8d82b531ff8db5c989e5b9 (patch) | |
tree | 679015367ee1015161c371efcc9bd2e0a8ebe326 /firmware/export | |
parent | ca0c3dee0a23e683aee2cbabf1571067c00b2e49 (diff) | |
download | rockbox-4f05a9d066337a883d8d82b531ff8db5c989e5b9.tar.gz rockbox-4f05a9d066337a883d8d82b531ff8db5c989e5b9.zip |
Add path_strip_last_volume
This gets the volume that the path eventually refers to by parsing
the last volume specifier and returning the part of the path after
it (which does not contain any volume specifiers). The initial part
of the path therefore contains everything up to and including the
last volume specifier.
Change-Id: I9a935543256f8f22e0b8b1e3c88d4e47bd9dae8a
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/pathfuncs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/firmware/export/pathfuncs.h b/firmware/export/pathfuncs.h index 385d534714..d4fa4eb460 100644 --- a/firmware/export/pathfuncs.h +++ b/firmware/export/pathfuncs.h | |||
@@ -79,6 +79,7 @@ static inline bool name_is_dot_dot(const char *name) | |||
79 | 79 | ||
80 | #ifdef HAVE_MULTIVOLUME | 80 | #ifdef HAVE_MULTIVOLUME |
81 | int path_strip_volume(const char *name, const char **nameptr, bool greedy); | 81 | int path_strip_volume(const char *name, const char **nameptr, bool greedy); |
82 | int path_strip_last_volume(const char *name, const char **nameptr, bool greedy); | ||
82 | int get_volume_name(int volume, char *name); | 83 | int get_volume_name(int volume, char *name); |
83 | int make_volume_root(int volume, char *dst); | 84 | int make_volume_root(int volume, char *dst); |
84 | #endif | 85 | #endif |