From fd6258fec630a8e9650e163dc0b3c121b8ad0da803104e1db97340ff4e7ae519 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 5 Jul 2012 03:15:54 +0000 Subject: [PATCH] - mdmon-arg.fix: fix arg parsing in mdmon so that "--all --takeover" works. (bnc#767150) OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=65 --- mdadm.changes | 6 ++++++ mdadm.spec | 3 ++- mdmon-arg.fix | 24 ++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 mdmon-arg.fix diff --git a/mdadm.changes b/mdadm.changes index 44020b0..a942580 100644 --- a/mdadm.changes +++ b/mdadm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 5 03:14:43 UTC 2012 - nfbrown@suse.com + +- mdmon-arg.fix: fix arg parsing in mdmon so that + "--all --takeover" works. (bnc#767150) + ------------------------------------------------------------------- Thu Jun 21 07:27:24 UTC 2012 - meissner@suse.com diff --git a/mdadm.spec b/mdadm.spec index d2a1167..58be9aa 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -16,7 +16,6 @@ # - Name: mdadm Version: 3.2.5 Release: 0 @@ -40,6 +39,7 @@ Source5: mkinitrd-setup.sh Source6: mkinitrd-boot.sh Source7: mdadm.cron Patch1: udev-rules.fix +Patch2: mdmon-arg.fix %description Mdadm is a program that can be used to control Linux md devices. It is @@ -49,6 +49,7 @@ programs but with a very different interface. %prep %setup -q -a1 %patch1 -p1 +%patch2 -p1 %build make %{?_smp_mflags} CC="%__cc" CXFLAGS="$RPM_OPT_FLAGS -Wno-error" diff --git a/mdmon-arg.fix b/mdmon-arg.fix new file mode 100644 index 0000000..9c28371 --- /dev/null +++ b/mdmon-arg.fix @@ -0,0 +1,24 @@ + +Fix parsing of mdmon args. +The conversion to use getopt_long added an incorrect assignment to +container_name. +This causes "mdmon --all --takeover" to fail. + +bnc#767150 + +Signed-off-by: NeilBrown + +--- + mdmon.c | 1 - + 1 file changed, 1 deletion(-) + +--- mdadm-3.2.5.orig/mdmon.c ++++ mdadm-3.2.5/mdmon.c +@@ -306,7 +306,6 @@ int main(int argc, char *argv[]) + all = 1; + break; + case 't': +- container_name = optarg; + takeover = 1; + break; + case OffRootOpt: