diff options
Diffstat (limited to 'meta/recipes-extended/mdadm')
-rw-r--r-- | meta/recipes-extended/mdadm/files/0001-Fix-parsing-of-r-in-monitor-manager-mode.patch | 74 | ||||
-rw-r--r-- | meta/recipes-extended/mdadm/mdadm_4.2.bb | 1 |
2 files changed, 75 insertions, 0 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-parsing-of-r-in-monitor-manager-mode.patch b/meta/recipes-extended/mdadm/files/0001-Fix-parsing-of-r-in-monitor-manager-mode.patch new file mode 100644 index 0000000000..3fb46cc60a --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-Fix-parsing-of-r-in-monitor-manager-mode.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From 969fbb35e40100f599d4a9781911251f21792698 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Thu, 27 Jan 2022 17:53:01 +0800 | ||
4 | Subject: [PATCH] Fix parsing of "-r" in monitor/manager mode | ||
5 | |||
6 | This revert commit 546047688e1 [mdadm: fix coredump of mdadm --monitor | ||
7 | -r], and fix the coredump issue of 'mdadm --monitor -r'. | ||
8 | |||
9 | commit 546047688e1 make -r not work in manager mode, and testcase | ||
10 | 00multipath failed. | ||
11 | |||
12 | Upstream-Status: Submitted [send to maintainer jsorensen@fb.com] | ||
13 | |||
14 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
15 | |||
16 | --- | ||
17 | ReadMe.c | 8 +++++--- | ||
18 | mdadm.c | 2 ++ | ||
19 | mdadm.h | 1 + | ||
20 | 3 files changed, 8 insertions(+), 3 deletions(-) | ||
21 | |||
22 | diff --git a/ReadMe.c b/ReadMe.c | ||
23 | index 8139976..070eea5 100644 | ||
24 | --- a/ReadMe.c | ||
25 | +++ b/ReadMe.c | ||
26 | @@ -81,11 +81,13 @@ char Version[] = "mdadm - v" VERSION " - " VERS_DATE EXTRAVERSION "\n"; | ||
27 | * found, it is started. | ||
28 | */ | ||
29 | |||
30 | -char short_options[]="-ABCDEFGIQhVXYWZ:vqbc:i:l:p:m:r:n:x:u:c:d:z:U:N:safRSow1tye:k"; | ||
31 | +char short_options[]="-ABCDEFGIQhVXYWZ:vqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:k:"; | ||
32 | char short_bitmap_options[]= | ||
33 | - "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:r:n:x:u:c:d:z:U:N:sarfRSow1tye:k:"; | ||
34 | + "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:k:"; | ||
35 | char short_bitmap_auto_options[]= | ||
36 | - "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:r:n:x:u:c:d:z:U:N:sa:rfRSow1tye:k:"; | ||
37 | + "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sa:rfRSow1tye:k:"; | ||
38 | +char short_increment_options[]= | ||
39 | + "-ABCDEFGIQhVXYWZ:vqbc:i:l:r:p:m:n:x:u:c:d:z:U:N:safRSow1tye:k:"; | ||
40 | |||
41 | struct option long_options[] = { | ||
42 | {"manage", 0, 0, ManageOpt}, | ||
43 | diff --git a/mdadm.c b/mdadm.c | ||
44 | index 26299b2..2a3b2ee 100644 | ||
45 | --- a/mdadm.c | ||
46 | +++ b/mdadm.c | ||
47 | @@ -227,6 +227,7 @@ int main(int argc, char *argv[]) | ||
48 | shortopt = short_bitmap_auto_options; | ||
49 | break; | ||
50 | case 'F': newmode = MONITOR; | ||
51 | + shortopt = short_increment_options; | ||
52 | break; | ||
53 | case 'G': newmode = GROW; | ||
54 | shortopt = short_bitmap_options; | ||
55 | @@ -268,6 +269,7 @@ int main(int argc, char *argv[]) | ||
56 | |||
57 | case NoSharing: | ||
58 | newmode = MONITOR; | ||
59 | + shortopt = short_increment_options; | ||
60 | break; | ||
61 | } | ||
62 | if (mode && newmode == mode) { | ||
63 | diff --git a/mdadm.h b/mdadm.h | ||
64 | index ecfc137..42148dd 100644 | ||
65 | --- a/mdadm.h | ||
66 | +++ b/mdadm.h | ||
67 | @@ -421,6 +421,7 @@ enum mode { | ||
68 | extern char short_options[]; | ||
69 | extern char short_bitmap_options[]; | ||
70 | extern char short_bitmap_auto_options[]; | ||
71 | +extern char short_increment_options[]; | ||
72 | extern struct option long_options[]; | ||
73 | extern char Version[], Usage[], Help[], OptionHelp[], | ||
74 | *mode_help[], | ||
diff --git a/meta/recipes-extended/mdadm/mdadm_4.2.bb b/meta/recipes-extended/mdadm/mdadm_4.2.bb index fa51364283..e3bbb4cf33 100644 --- a/meta/recipes-extended/mdadm/mdadm_4.2.bb +++ b/meta/recipes-extended/mdadm/mdadm_4.2.bb | |||
@@ -22,6 +22,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ | |||
22 | file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \ | 22 | file://0001-mdadm-add-option-y-for-use-syslog-to-recive-event-re.patch \ |
23 | file://include_sysmacros.patch \ | 23 | file://include_sysmacros.patch \ |
24 | file://0001-mdadm-skip-test-11spare-migration.patch \ | 24 | file://0001-mdadm-skip-test-11spare-migration.patch \ |
25 | file://0001-Fix-parsing-of-r-in-monitor-manager-mode.patch \ | ||
25 | " | 26 | " |
26 | 27 | ||
27 | SRC_URI[sha256sum] = "461c215670864bb74a4d1a3620684aa2b2f8296dffa06743f26dda5557acf01d" | 28 | SRC_URI[sha256sum] = "461c215670864bb74a4d1a3620684aa2b2f8296dffa06743f26dda5557acf01d" |