From: Louis Stagg Date: Tue, 3 Feb 2026 18:48:59 +0000 (+0000) Subject: portablectl: Strip .v or .raw.v when extracting prefix X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23c6ab3971eb22d9c656165e8c6314135df0ee6c;p=thirdparty%2Fsystemd.git portablectl: Strip .v or .raw.v when extracting prefix This allows a plain "portablectl attach foobar.raw.v" without needing to specify a prefix. --- diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c index b55eda79553..dfe6df3bf31 100644 --- a/src/portable/portablectl.c +++ b/src/portable/portablectl.c @@ -142,7 +142,7 @@ static int extract_prefix(const char *path, char **ret) { else { const char *e; - e = endswith(bn, ".raw"); + e = ENDSWITH_SET(bn, ".raw.v", ".raw", ".v"); if (!e) e = strchr(bn, 0);