1dad67a5af
Update Source to upstream version 0.8.5 plus post tag commits * Patches 0001-0102 are from https://github.com/openSUSE/multipath-tools/tree/queue and are already queued for upstream. Rename files * Previous patches 0059-0068 are now patches 0103-0111
33 lines
911 B
Diff
33 lines
911 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martin Wilck <mwilck@suse.com>
|
|
Date: Wed, 23 Sep 2020 00:32:48 +0200
|
|
Subject: [PATCH] mpathpersist: use atexit() for cleanup handlers
|
|
|
|
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
mpathpersist/main.c | 5 ++---
|
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/mpathpersist/main.c b/mpathpersist/main.c
|
|
index 3c2e6576..14245cc3 100644
|
|
--- a/mpathpersist/main.c
|
|
+++ b/mpathpersist/main.c
|
|
@@ -641,11 +641,10 @@ int main(int argc, char *argv[])
|
|
if (libmpathpersist_init()) {
|
|
exit(1);
|
|
}
|
|
+ if (atexit((void(*)(void))libmpathpersist_exit))
|
|
+ fprintf(stderr, "failed to register cleanup handler for libmpathpersist: %m");
|
|
|
|
ret = handle_args(argc, argv, 0);
|
|
-
|
|
- libmpathpersist_exit();
|
|
-
|
|
return (ret >= 0) ? ret : MPATH_PR_OTHER;
|
|
}
|
|
|
|
--
|
|
2.17.2
|
|
|