From: David Teigland <teigland@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - devices file: don't write in test mode
Date: Wed, 1 Dec 2021 16:08:31 +0000 (GMT) [thread overview]
Message-ID: <20211201160831.B736E3858034@sourceware.org> (raw)
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 */
reply other threads:[~2021-12-01 16:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211201160831.B736E3858034@sourceware.org \
--to=teigland@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.