Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 1 | From 17e9da8d3c3c69f84e11c0457bd9fb8c4ee4274b Mon Sep 17 00:00:00 2001 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 2 | From: Andrea Adami <andrea.adami@gmail.com> |
| 3 | Date: Tue, 17 Apr 2018 11:35:14 +0200 |
| 4 | Subject: [PATCH] kexec.c: add guard around ENOTSUP |
| 5 | |
| 6 | Fix |
| 7 | |
| 8 | kexec.c: In function 'main': |
| 9 | kexec.c:1515:11: error: 'ENOTSUP' undeclared |
| 10 | |
| 11 | Upstream-Status: Inappropriate [klibc specific] |
| 12 | Signed-off-by: Andrea Adami <andrea.adami@gmail.com> |
| 13 | |
| 14 | --- |
| 15 | kexec/kexec.c | 2 ++ |
| 16 | 1 file changed, 2 insertions(+) |
| 17 | |
| 18 | diff --git a/kexec/kexec.c b/kexec/kexec.c |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 19 | index 32ae56c..0764e85 100644 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 20 | --- a/kexec/kexec.c |
| 21 | +++ b/kexec/kexec.c |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 22 | @@ -1517,6 +1517,7 @@ int main(int argc, char *argv[]) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 23 | */ |
| 24 | case -EINVAL: |
| 25 | case -ENOEXEC: |
| 26 | +#ifndef __KLIBC__ |
| 27 | /* |
| 28 | * ENOTSUP can be unsupported image |
| 29 | * type or unsupported PE signature |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 30 | @@ -1529,6 +1530,7 @@ int main(int argc, char *argv[]) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 31 | * kernel bug |
| 32 | */ |
| 33 | case -ENOTSUP: |
| 34 | +#endif |
| 35 | do_kexec_file_syscall = 0; |
| 36 | break; |
| 37 | } |