public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/nvme-cli] f43: * Tue Aug 18 2026 Tomas Bzatek <tbzatek@redhat.com> - 2.16-2
@ 2026-08-18 10:43 Tomas Bzatek
  0 siblings, 0 replies; only message in thread
From: Tomas Bzatek @ 2026-08-18 10:43 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/nvme-cli
            Branch : f43
            Commit : 2d991cd6947b2dc339ffa272c0c0b930e50515f1
            Author : Tomas Bzatek <tbzatek@redhat.com>
            Date   : 2026-08-18T12:40:18+02:00
            Stats  : +35/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/nvme-cli/c/2d991cd6947b2dc339ffa272c0c0b930e50515f1?branch=f43

            Log:
            * Tue Aug 18 2026 Tomas Bzatek <tbzatek@redhat.com> - 2.16-2
- Fix ignored interruption in format command (#2501829)

---
diff --git a/format-sigint.patch b/format-sigint.patch
new file mode 100644
index 0000000..cd65805
--- /dev/null
+++ b/format-sigint.patch
@@ -0,0 +1,28 @@
+From cb5a61895e7327827158ad32fc07e10722d8777e Mon Sep 17 00:00:00 2001
+From: g0l4 <g0l4@g0l4.top>
+Date: Wed, 24 Jun 2026 11:48:55 +0800
+Subject: [PATCH] nvme: fix ignored interruption in format command
+
+Add nvme_sigint_received wrapper around sleep, so it will exit instead
+of continue when a SIGINT is received.
+
+Signed-off-by: g0l4 <g0l4@g0l4.top>
+---
+ nvme.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/nvme.c b/nvme.c
+index cec40249fd..289f5257e3 100644
+--- a/nvme.c
++++ b/nvme.c
+@@ -7007,7 +7007,10 @@ static int format_cmd(int argc, char **argv, struct command *acmd, struct plugin
+ 			"WARNING: Format may irrevocably delete this device's data.\n"
+ 			"You have 10 seconds to press Ctrl-C to cancel this operation.\n\n"
+ 			"Use the force [--force] option to suppress this warning.\n");
++		nvme_sigint_received = false;
+ 		sleep(10);
++		if (nvme_sigint_received)
++			return -EINTR;
+ 		fprintf(stderr, "Sending format operation ...\n");
+ 	}
+ 

diff --git a/nvme-cli.spec b/nvme-cli.spec
index 5fa7a3a..1ab27e9 100644
--- a/nvme-cli.spec
+++ b/nvme-cli.spec
@@ -5,7 +5,7 @@
 
 Name:           nvme-cli
 Version:        2.16
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        NVMe management command line interface
 
 License:        GPL-2.0-only
@@ -14,6 +14,9 @@ Source0:        %{url}/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.
 Source1:        99-nvme-nbft-connect.sh
 Source2:        99-nvme-nbft-no-ignore-carrier.conf
 
+# https://bugzilla.redhat.com/show_bug.cgi?id=2501829
+Patch0:         format-sigint.patch
+
 BuildRequires:  meson >= 0.53
 BuildRequires:  gcc gcc-c++
 BuildRequires:  systemd-devel
@@ -119,6 +122,9 @@ fi
 
 
 %changelog
+* Tue Aug 18 2026 Tomas Bzatek <tbzatek@redhat.com> - 2.16-2
+- Fix ignored interruption in format command (#2501829)
+
 * Thu Dec 04 2025 Tomas Bzatek <tbzatek@redhat.com> - 2.16-1
 - Update to 2.16
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-18 10:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-18 10:43 [rpms/nvme-cli] f43: * Tue Aug 18 2026 Tomas Bzatek <tbzatek@redhat.com> - 2.16-2 Tomas Bzatek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox