aboutsummaryrefslogtreecommitdiff
path: root/meta/recipes-kernel/kexec/kexec-tools/0002-ppc-Fix-format-warning-with-die.patch
blob: 6a1c06df994cfd7bf283e16bd09391a869e95373 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 1c956fc8c6b6324d8d38bba5f9e60a018051c6f5 Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Thu, 16 Mar 2017 15:39:06 +0200
Subject: [PATCH 2/2] ppc: Fix format warning with die()

Enable compiling kexec-tools for ppc with -Werror=format-security.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Upstream-Status: Submitted [Mailing list]
---
 kexec/arch/ppc/kexec-elf-ppc.c    | 2 +-
 kexec/arch/ppc/kexec-uImage-ppc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kexec/arch/ppc/kexec-elf-ppc.c b/kexec/arch/ppc/kexec-elf-ppc.c
index 291f06d..ad43ad1 100644
--- a/kexec/arch/ppc/kexec-elf-ppc.c
+++ b/kexec/arch/ppc/kexec-elf-ppc.c
@@ -453,7 +453,7 @@ out:
 	if (!tmp_cmdline)
 		free(command_line);
 	if (error_msg)
-		die(error_msg);
+		die("%s", error_msg);
 
 	return result;
 }
diff --git a/kexec/arch/ppc/kexec-uImage-ppc.c b/kexec/arch/ppc/kexec-uImage-ppc.c
index 5eec6e4..e8f7adc 100644
--- a/kexec/arch/ppc/kexec-uImage-ppc.c
+++ b/kexec/arch/ppc/kexec-uImage-ppc.c
@@ -306,7 +306,7 @@ out:
 	if (!tmp_cmdline)
 		free(command_line);
 	if (error_msg)
-		die(error_msg);
+		die("%s", error_msg);
 	return ret;
 }
 
-- 
2.11.0