main - devices file: don't write in test mode
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d5402e55f6b9d3a5f407502ce5c7a8a5bfd12243 Commit: d5402e55f6b9d3a5f407502ce5c7a8a5bfd12243 Parent: 71e7ebb3e409be91b6c29e25ebfdd73c27f02902 Author: David Teigland <[email protected]> AuthorDate: Wed Dec 1 10:08:08 2021 -0600 Committer: David Teigland <[email protected]> CommitterDate: Wed Dec 1 10:08:08 2021 -0600
devices file: don't write in test mode
--- lib/device/device_id.c | 3 +++ 1 file changed, 3 insertions(+)
lib/device/device_id.c +3 -0
@@ -678,6 +678,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 */