6591f980b1
- SLE15 continues to use mdadm-4.0, synchronize mdadm package from SLE12-SP3 to SLE15, re-order all patches. - Rename the following patches, they are deleted and re-add in next part of patches 0001-Generic-support-for-consistency-policy-and-PPL.patch 0002-Detail-show-consistency-policy.patch 0002-The-mdcheck-script-now-adds-messages-to-the-system.patch 0003-imsm-PPL-support.patch 0004-super1-PPL-support.patch 0005-Add-ppl-and-no-ppl-options-for-update.patch 0006-Grow-support-consistency-policy-change.patch 0007-udev-md-raid-assembly.rules-Skip-non-ready-devices.patch 0008-Retry-HOT_REMOVE_DISK-a-few-times.patch 0009-Introduce-sys_hot_remove_disk.patch 0010-Add-force-flag-to-hot_remove_disk.patch 0011-Detail-handle-non-existent-arrays-better.patch - Synchronize patches from mdadm of SLE12-SP3, the above renamed patches are re-add here, 0001-Makefile-Fix-date-to-be-output-in-ISO-format.patch 0002-imsm-fix-missing-error-message-during-migration.patch 0003-Fix-oddity-where-mdadm-did-not-recognise-a-relative-.patch 0004-mdadm-check-the-nodes-when-operate-clustered-array.patch 0005-examine-tidy-up-some-code.patch 0006-mdadm-add-man-page-for-symlinks.patch 0007-mdadm-add-checking-clustered-bitmap-in-assemble-mode.patch 0008-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch 0009-mdadm-Specify-enough-length-when-write-to-buffer.patch 0010-mdadm-it-doesn-t-make-sense-to-set-bitmap-twice.patch 0011-mdadm-Monitor-Fix-NULL-pointer-dereference-when-stat.patch 0012-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch OBS-URL: https://build.opensuse.org/request/show/517978 OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=150
197 lines
5.7 KiB
Diff
197 lines
5.7 KiB
Diff
From 8ea982179af73f5b1d3fc937676ec7c969a190ac Mon Sep 17 00:00:00 2001
|
|
From: Jes Sorensen <Jes.Sorensen@gmail.com>
|
|
Date: Wed, 29 Mar 2017 12:02:14 -0400
|
|
Subject: [PATCH] mdadm: Fixup a number of whitespace inconsistency cases
|
|
|
|
Lots of code lacked whitespaces in assignments, and in other places
|
|
had them in the wrong place.
|
|
|
|
Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
|
|
---
|
|
mdadm.c | 51 +++++++++++++++++++++++++--------------------------
|
|
1 file changed, 25 insertions(+), 26 deletions(-)
|
|
|
|
diff --git a/mdadm.c b/mdadm.c
|
|
index 502e721..0f32773 100644
|
|
--- a/mdadm.c
|
|
+++ b/mdadm.c
|
|
@@ -106,11 +106,11 @@ int main(int argc, char *argv[])
|
|
|
|
srandom(time(0) ^ getpid());
|
|
|
|
- ident.uuid_set=0;
|
|
+ ident.uuid_set = 0;
|
|
ident.level = UnSet;
|
|
ident.raid_disks = UnSet;
|
|
- ident.super_minor= UnSet;
|
|
- ident.devices=0;
|
|
+ ident.super_minor = UnSet;
|
|
+ ident.devices = 0;
|
|
ident.spare_group = NULL;
|
|
ident.autof = 0;
|
|
ident.st = NULL;
|
|
@@ -120,10 +120,9 @@ int main(int argc, char *argv[])
|
|
ident.container = NULL;
|
|
ident.member = NULL;
|
|
|
|
- while ((option_index = -1) ,
|
|
- (opt=getopt_long(argc, argv,
|
|
- shortopt, long_options,
|
|
- &option_index)) != -1) {
|
|
+ while ((option_index = -1),
|
|
+ (opt = getopt_long(argc, argv, shortopt, long_options,
|
|
+ &option_index)) != -1) {
|
|
int newmode = mode;
|
|
/* firstly, some mode-independent options */
|
|
switch(opt) {
|
|
@@ -397,7 +396,7 @@ int main(int argc, char *argv[])
|
|
pr_err("metadata information already given\n");
|
|
exit(2);
|
|
}
|
|
- for(i=0; !ss && superlist[i]; i++)
|
|
+ for(i = 0; !ss && superlist[i]; i++)
|
|
ss = superlist[i]->match_metadata_desc(optarg);
|
|
|
|
if (!ss) {
|
|
@@ -542,7 +541,7 @@ int main(int argc, char *argv[])
|
|
|
|
case 5:
|
|
s.layout = map_name(r5layout, optarg);
|
|
- if (s.layout==UnSet) {
|
|
+ if (s.layout == UnSet) {
|
|
pr_err("layout %s not understood for raid5.\n",
|
|
optarg);
|
|
exit(2);
|
|
@@ -550,7 +549,7 @@ int main(int argc, char *argv[])
|
|
break;
|
|
case 6:
|
|
s.layout = map_name(r6layout, optarg);
|
|
- if (s.layout==UnSet) {
|
|
+ if (s.layout == UnSet) {
|
|
pr_err("layout %s not understood for raid6.\n",
|
|
optarg);
|
|
exit(2);
|
|
@@ -665,7 +664,7 @@ int main(int argc, char *argv[])
|
|
case O(MISC,'f'): /* force zero */
|
|
case O(MISC,Force): /* force zero */
|
|
case O(MANAGE,Force): /* add device which is too large */
|
|
- c.force=1;
|
|
+ c.force = 1;
|
|
continue;
|
|
/* now for the Assemble options */
|
|
case O(ASSEMBLE, FreezeReshape): /* Freeze reshape during
|
|
@@ -777,12 +776,12 @@ int main(int argc, char *argv[])
|
|
continue;
|
|
if (strcmp(c.update, "revert-reshape") == 0)
|
|
continue;
|
|
- if (strcmp(c.update, "byteorder")==0) {
|
|
+ if (strcmp(c.update, "byteorder") == 0) {
|
|
if (ss) {
|
|
pr_err("must not set metadata type with --update=byteorder.\n");
|
|
exit(2);
|
|
}
|
|
- for(i=0; !ss && superlist[i]; i++)
|
|
+ for(i = 0; !ss && superlist[i]; i++)
|
|
ss = superlist[i]->match_metadata_desc(
|
|
"0.swap");
|
|
if (!ss) {
|
|
@@ -1476,7 +1475,7 @@ int main(int argc, char *argv[])
|
|
pr_err("can only assemble a single array when providing a backup file.\n");
|
|
exit(1);
|
|
}
|
|
- for (dv = devlist ; dv ; dv=dv->next) {
|
|
+ for (dv = devlist; dv; dv = dv->next) {
|
|
struct mddev_ident *array_ident = conf_get_ident(dv->devname);
|
|
if (array_ident == NULL) {
|
|
pr_err("%s not identified in config file.\n",
|
|
@@ -1611,10 +1610,10 @@ int main(int argc, char *argv[])
|
|
else
|
|
c.delay = 60;
|
|
}
|
|
- rv= Monitor(devlist, mailaddr, program,
|
|
- &c, daemonise, oneshot,
|
|
- dosyslog, pidfile, increments,
|
|
- spare_sharing);
|
|
+ rv = Monitor(devlist, mailaddr, program,
|
|
+ &c, daemonise, oneshot,
|
|
+ dosyslog, pidfile, increments,
|
|
+ spare_sharing);
|
|
break;
|
|
|
|
case GROW:
|
|
@@ -1654,7 +1653,7 @@ int main(int argc, char *argv[])
|
|
rv = 1;
|
|
break;
|
|
}
|
|
- for (dv=devlist->next; dv ; dv=dv->next) {
|
|
+ for (dv = devlist->next; dv; dv = dv->next) {
|
|
rv = Grow_Add_device(devlist->devname, mdfd,
|
|
dv->devname);
|
|
if (rv)
|
|
@@ -1749,7 +1748,7 @@ static int scan_assemble(struct supertype *ss,
|
|
pr_err("No devices listed in conf file were found.\n");
|
|
return 1;
|
|
}
|
|
- for (a = array_list; a ; a = a->next) {
|
|
+ for (a = array_list; a; a = a->next) {
|
|
a->assembled = 0;
|
|
if (a->autof == 0)
|
|
a->autof = c->autof;
|
|
@@ -1760,7 +1759,7 @@ static int scan_assemble(struct supertype *ss,
|
|
failures = 0;
|
|
successes = 0;
|
|
rv = 0;
|
|
- for (a = array_list; a ; a = a->next) {
|
|
+ for (a = array_list; a; a = a->next) {
|
|
int r;
|
|
if (a->assembled)
|
|
continue;
|
|
@@ -1826,7 +1825,7 @@ static int misc_scan(char devmode, struct context *c)
|
|
int rv = 0;
|
|
|
|
for (members = 0; members <= 1; members++) {
|
|
- for (e=ms ; e ; e=e->next) {
|
|
+ for (e = ms; e; e = e->next) {
|
|
char *name = NULL;
|
|
struct map_ent *me;
|
|
struct stat stb;
|
|
@@ -1864,7 +1863,7 @@ static int stop_scan(int verbose)
|
|
/* Due to possible stacking of devices, repeat until
|
|
* nothing more can be stopped
|
|
*/
|
|
- int progress=1, err;
|
|
+ int progress = 1, err;
|
|
int last = 0;
|
|
int rv = 0;
|
|
do {
|
|
@@ -1873,7 +1872,7 @@ static int stop_scan(int verbose)
|
|
|
|
if (!progress) last = 1;
|
|
progress = 0; err = 0;
|
|
- for (e=ms ; e ; e=e->next) {
|
|
+ for (e = ms; e; e = e->next) {
|
|
char *name = get_md_name(e->devnm);
|
|
int mdfd;
|
|
|
|
@@ -1908,7 +1907,7 @@ static int misc_list(struct mddev_dev *devlist,
|
|
struct mddev_dev *dv;
|
|
int rv = 0;
|
|
|
|
- for (dv=devlist ; dv; dv=(rv & 16) ? NULL : dv->next) {
|
|
+ for (dv = devlist; dv; dv = (rv & 16) ? NULL : dv->next) {
|
|
int mdfd;
|
|
|
|
switch(dv->disposition) {
|
|
@@ -1974,7 +1973,7 @@ static int misc_list(struct mddev_dev *devlist,
|
|
case 1:
|
|
mdfd = open_mddev(dv->devname, 1);
|
|
}
|
|
- if (mdfd>=0) {
|
|
+ if (mdfd >= 0) {
|
|
switch(dv->disposition) {
|
|
case 'R':
|
|
c->runstop = 1;
|
|
--
|
|
2.10.2
|
|
|