]>
git.ipfire.org Git - thirdparty/systemd.git/commit
udevadm-info: handle missing data db cleanup
udevadm info --cleanup-db cleaned links and tags by comparing them
against /run/udev/data, but asserted when that data directory was
missing.
Treat a missing data directory as an empty database, so stale link
and tag entries can be removed without aborting.
Add a database test that runs cleanup-db with links and tags present
but no data directory.
Reproducer:
$ sudo unshare --mount --propagation private sh -c '
mount -t tmpfs tmpfs /run/udev
mkdir -p /run/udev/links/foo
udevadm info --cleanup-db
'
Assertion 'datadir' failed at src/udev/udevadm-info.c:676, function cleanup_dirs_after_db_cleanup(). Aborting.
Aborted (core dumped)
The command should handle a missing /run/udev/data directory instead
of aborting.