]> git.ipfire.org Git - thirdparty/systemd.git/commit
mkfs-util: deal with mmd name clashes gracefully 42839/head
authorLennart Poettering <lennart@amutable.com>
Wed, 1 Jul 2026 14:04:43 +0000 (16:04 +0200)
committerLennart Poettering <lennart@amutable.com>
Wed, 1 Jul 2026 14:10:39 +0000 (16:10 +0200)
commitd789af72801f6c24c63b62e1dd44b0896e5def9d
tree8486f6ae0f4ec4428023f428bff394d538a807e6
parentb4502c72c828842f530069cf10addb72da239a16
mkfs-util: deal with mmd name clashes gracefully

In various cases we'll touch the same directories multiple times with
mtools: for example the /loader/ dir itself. Unfortunately mtools' mmd
does not implement a graceful "-p" switch like mkdir, but will do some
interactive name clash thing instead. We can turn this off via "-Ds
-DS", so let's do that. But that's not enough since the tool will still
fail with a non-explanatory exit status of 1. This hence ignores that
failure and proceeds anyway, under the assumption that failures to
create a directory will sooner or later be detected anyway once the
directory is to be populated and turns out not be existing because the
creation failed.

This makes some integration test/mkosi invocations work
non-interactively again.

Follow-up for f191ca982ce9eac85207807a65489909308f7d8f
src/shared/mkfs-util.c