From 89853c290fd822a88c56150dde50aaa1421c0c8c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 19:43:00 +0200 Subject: Adding debian version 4.2-5. Signed-off-by: Daniel Baumann --- .../exit-gracefully-when-md-device-not-found.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 debian/patches/exit-gracefully-when-md-device-not-found.patch (limited to 'debian/patches/exit-gracefully-when-md-device-not-found.patch') diff --git a/debian/patches/exit-gracefully-when-md-device-not-found.patch b/debian/patches/exit-gracefully-when-md-device-not-found.patch new file mode 100644 index 0000000..c6a34d5 --- /dev/null +++ b/debian/patches/exit-gracefully-when-md-device-not-found.patch @@ -0,0 +1,25 @@ +Description: Exit gracefully when md device not found +Author: Felix Lechner +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, + if (fd < 0) + goto disappeared; + +- if (st->devnm[0] == 0) +- strcpy(st->devnm, fd2devnm(fd)); ++ if (st->devnm[0] == 0) { ++ char *found = fd2devnm(fd); ++ if (!found) { ++ alert("DeviceDisappeared", dev, NULL, ainfo); ++ goto out; ++ } ++ strcpy(st->devnm, found); ++ } + + for (mse2 = mdstat; mse2; mse2 = mse2->next) + if (strcmp(mse2->devnm, st->devnm) == 0) { -- cgit v1.2.3