[prev in list] [next in list] [prev in thread] [next in thread]
List: lvm2-commits
Subject: =?utf-8?q?=5Blvm2-commits=5D?= main - devices file: don't write in test mode
From: David Teigland <teigland () sourceware ! org>
Date: 2021-12-01 16:08:32
Message-ID: 20211201160832.D8C493858029 () sourceware ! org
[Download RAW message or body]
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d5402e55f6b9d3a5f407502ce5c7a8a5bfd12243
Commit: d5402e55f6b9d3a5f407502ce5c7a8a5bfd12243
Parent: 71e7ebb3e409be91b6c29e25ebfdd73c27f02902
Author: David Teigland <teigland@redhat.com>
AuthorDate: Wed Dec 1 10:08:08 2021 -0600
Committer: David Teigland <teigland@redhat.com>
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(+)
diff --git a/lib/device/device_id.c b/lib/device/device_id.c
index 06d64a494..bfee7d418 100644
--- a/lib/device/device_id.c
+++ b/lib/device/device_id.c
@@ -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 */
_______________________________________________
lvm2-commits mailing list -- lvm2-commits@lists.fedorahosted.org
To unsubscribe send an email to lvm2-commits-leave@lists.fedorahosted.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedorahosted.org/archives/list/lvm2-commits@lists.fedorahosted.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic