From 4f05a9d066337a883d8d82b531ff8db5c989e5b9 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Thu, 31 Mar 2022 20:38:24 +0100 Subject: 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 --- firmware/export/pathfuncs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'firmware/export') 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) #ifdef HAVE_MULTIVOLUME int path_strip_volume(const char *name, const char **nameptr, bool greedy); +int path_strip_last_volume(const char *name, const char **nameptr, bool greedy); int get_volume_name(int volume, char *name); int make_volume_root(int volume, char *dst); #endif -- cgit v1.2.3