File 1001-Detail-accept-option-brief-with-export.patch of Package mdadm.openSUSE_Leap_42.3_Update
From d8f5c69ef626a85295763719ca97c3ee06b0a8dd Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 28 Jun 2018 09:52:21 +0200
Subject: [PATCH] Detail: accept option '--brief' with '--export'
When called from udev with '--export' mdadm will export details about
each attached device in addition to the MD Array.
As these values are being placed in the environment of the udev process
and udev later on uses these environment values to format the uevent
message we end up overflowing the uevent buffer for larger setups.
This patch allows the option '--export' to be combined with '--brief',
which will then avoid displaying information for the attached devices
and avoid this issue.
References: bsc#1095141, bsc#1100864, bsc#1112272
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
Detail.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Detail.c b/Detail.c
index f068bb5..c3225ea 100644
--- a/Detail.c
+++ b/Detail.c
@@ -281,7 +281,7 @@ int Detail(char *dev, struct context *c)
putchar('\n');
}
}
- if (sra) {
+ if (!c->brief && sra) {
struct mdinfo *mdi;
for (mdi = sra->devs; mdi; mdi = mdi->next) {
char *path =
--
2.13.7