-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previous version even with patches segfaulted with musl 1.2.5. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
- Loading branch information
Showing
12 changed files
with
157 additions
and
745 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 11 additions & 13 deletions
24
storage/mdadm/patches/exit-gracefully-when-md-device-not-found.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
Description: Exit gracefully when md device not found | ||
Author: Felix Lechner <felix.lechner@lease-up.com> | ||
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970329 | ||
Forwarded: no | ||
--- | ||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | ||
--- a/Monitor.c | ||
+++ b/Monitor.c | ||
@@ -539,8 +539,14 @@ static int check_array(struct state *st, | ||
Description: Exit gracefully when md device not found (Closes: #970329). | ||
|
||
diff -Naurp mdadm.orig/Monitor.c mdadm/Monitor.c | ||
--- mdadm.orig/Monitor.c | ||
+++ mdadm/Monitor.c | ||
@@ -554,8 +554,14 @@ static int check_array(struct state *st, | ||
if (fd < 0) | ||
goto disappeared; | ||
|
||
- if (st->devnm[0] == 0) | ||
- strcpy(st->devnm, fd2devnm(fd)); | ||
- snprintf(st->devnm, MD_NAME_MAX, "%s", fd2devnm(fd)); | ||
+ if (st->devnm[0] == 0) { | ||
+ char *found = fd2devnm(fd); | ||
+ if (!found) { | ||
+ alert("DeviceDisappeared", dev, NULL, ainfo); | ||
+ alert(EVENT_DEVICE_DISAPPEARED, NULL, 0, dev, NULL); | ||
+ goto out; | ||
+ } | ||
+ strcpy(st->devnm, found); | ||
+ snprintf(st->devnm, MD_NAME_MAX, "%s", found); | ||
+ } | ||
|
||
for (mse2 = mdstat; mse2; mse2 = mse2->next) | ||
if (strcmp(mse2->devnm, st->devnm) == 0) { |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.