1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +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 71e7ebb3e4
commit d5402e55f6

View File

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