1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-16 10:50:46 +03:00

devices file: don't write in test mode

This commit is contained in:
David Teigland 2021-12-01 10:08:08 -06:00
parent 10a4478e9b
commit 04770589b4

View File

@ -673,6 +673,9 @@ int device_ids_write(struct cmd_context *cmd)
cmd->enable_devices_file = 1;
}
if (test_mode())
return 1;
if (_devices_file_version[0]) {
if (sscanf(_devices_file_version, "%u.%u.%u", &df_major, &df_minor, &df_counter) != 3) {
/* don't update a file we can't parse */