aboutsummaryrefslogtreecommitdiffstats
path: root/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/0007-kexec.c-add-guard-around-ENOTSUP.patch
blob: 0ae90016d03efd6605f4e56a513f4f2aecadb9b6 (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
From 17e9da8d3c3c69f84e11c0457bd9fb8c4ee4274b Mon Sep 17 00:00:00 2001
From: Andrea Adami <andrea.adami@gmail.com>
Date: Tue, 17 Apr 2018 11:35:14 +0200
Subject: [PATCH] kexec.c: add guard around ENOTSUP

Fix

 kexec.c: In function 'main':
 kexec.c:1515:11: error: 'ENOTSUP' undeclared

Upstream-Status: Inappropriate [klibc specific]
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>

---
 kexec/kexec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kexec/kexec.c b/kexec/kexec.c
index 32ae56c..0764e85 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -1517,6 +1517,7 @@ int main(int argc, char *argv[])
 					 */
 				case -EINVAL:
 				case -ENOEXEC:
+#ifndef __KLIBC__
 					 /*
 					  * ENOTSUP can be unsupported image
 					  * type or unsupported PE signature
@@ -1529,6 +1530,7 @@ int main(int argc, char *argv[])
 					  * kernel bug
 					  */
 				case -ENOTSUP:
+#endif
 					do_kexec_file_syscall = 0;
 					break;
 			}