* [linux-lvm] [PATCH 1/3] dmsetup: return non-zero on stdio I/O error
@ 2022-04-04 21:54 Demi Marie Obenour
0 siblings, 0 replies; 2+ messages in thread
From: Demi Marie Obenour @ 2022-04-04 21:54 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Marek Marczykowski-Górecki
[-- Attachment #1.1: Type: text/plain, Size: 742 bytes --]
If there is an I/O error on stdout, return a non-zero status so that
udev can avoid trusting the values printed. Deeper changes to the
log code are out of scope for this patch.
---
libdm/dm-tools/dmsetup.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libdm/dm-tools/dmsetup.c b/libdm/dm-tools/dmsetup.c
index d01b8f2..0449e40 100644
--- a/libdm/dm-tools/dmsetup.c
+++ b/libdm/dm-tools/dmsetup.c
@@ -7491,5 +7491,7 @@ out:
if (_initial_timestamp)
dm_timestamp_destroy(_initial_timestamp);
+ if (fflush(stdout) || ferror(stdout))
+ return 1;
return (_switches[HELP_ARG] || _switches[VERSION_ARG]) ? 0 : ret;
}
--
Sincerely,
Demi Marie Obenour (she/her/hers)
Invisible Things Lab
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 202 bytes --]
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [linux-lvm] [PATCH 1/3] dmsetup: return non-zero on stdio I/O error
2022-04-04 21:51 [linux-lvm] [PATCH 0/3] Make udev rules more robust Demi Marie Obenour
@ 2022-04-04 21:58 ` Demi Marie Obenour
0 siblings, 0 replies; 2+ messages in thread
From: Demi Marie Obenour @ 2022-04-04 21:58 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Marek Marczykowski-Górecki
[-- Attachment #1.1: Type: text/plain, Size: 740 bytes --]
If there is an I/O error on stdout, return a non-zero status so that
udev can avoid trusting the values printed. Deeper changes to the
log code are out of scope for this patch.
---
libdm/dm-tools/dmsetup.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libdm/dm-tools/dmsetup.c b/libdm/dm-tools/dmsetup.c
index d01b8f2..0449e40 100644
--- a/libdm/dm-tools/dmsetup.c
+++ b/libdm/dm-tools/dmsetup.c
@@ -7491,5 +7491,7 @@ out:
if (_initial_timestamp)
dm_timestamp_destroy(_initial_timestamp);
+ if (fflush(stdout) || ferror(stdout))
+ return 1;
return (_switches[HELP_ARG] || _switches[VERSION_ARG]) ? 0 : ret;
}
--
Sincerely,
Demi Marie Obenour (she/her/hers)
Invisible Things Lab
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 202 bytes --]
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-04 21:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 21:54 [linux-lvm] [PATCH 1/3] dmsetup: return non-zero on stdio I/O error Demi Marie Obenour
-- strict thread matches above, loose matches on Subject: below --
2022-04-04 21:51 [linux-lvm] [PATCH 0/3] Make udev rules more robust Demi Marie Obenour
2022-04-04 21:58 ` [linux-lvm] [PATCH 1/3] dmsetup: return non-zero on stdio I/O error Demi Marie Obenour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).