summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorŁukasz Stelmach <l.stelmach@samsung.com>2020-04-22 21:45:04 +0200
committerSimon Horman <horms@verge.net.au>2020-04-24 11:38:25 +0200
commit74c7c369f8c75c665605e117c14816bb060ed91c (patch)
treed5eac32860daa62fea53f1207511ba52aa9dc6c6
parent5dc72ded6050a5bb161e3b832867e660c9ca009e (diff)
downloadkexec-tools-74c7c369f8c75c665605e117c14816bb060ed91c.tar.gz
arm: redefine OPT_APPEND and OPT_RAMDISK
Redefine OPT_APPEND to avoid clash with OPT_KEXEC_SYSCALL_AUTO. Redefine OPT_RAMDISK to avoid such problems in the future Minor cleanup in HPPA too. Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/arm/include/arch/options.h6
-rw-r--r--kexec/arch/arm/kexec-zImage-arm.c2
-rw-r--r--kexec/arch/hppa/include/arch/options.h2
-rw-r--r--kexec/arch/hppa/kexec-elf-hppa.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/kexec/arch/arm/include/arch/options.h b/kexec/arch/arm/include/arch/options.h
index abbf349c..6fabfb7a 100644
--- a/kexec/arch/arm/include/arch/options.h
+++ b/kexec/arch/arm/include/arch/options.h
@@ -4,12 +4,12 @@
#define OPT_DT_NO_OLD_ROOT (OPT_MAX+0)
#define OPT_ARCH_MAX (OPT_MAX+1)
-#define OPT_APPEND 'a'
-#define OPT_RAMDISK 'r'
#define OPT_DTB (OPT_ARCH_MAX+0)
#define OPT_ATAGS (OPT_ARCH_MAX+1)
#define OPT_IMAGE_SIZE (OPT_ARCH_MAX+2)
#define OPT_PAGE_OFFSET (OPT_ARCH_MAX+3)
+#define OPT_APPEND (OPT_ARCH_MAX+4)
+#define OPT_RAMDISK (OPT_ARCH_MAX+5)
/* Options relevant to the architecture (excluding loader-specific ones),
* in this case none:
@@ -45,7 +45,7 @@
{ "image-size", 1, 0, OPT_IMAGE_SIZE }, \
{ "page-offset", 1, 0, OPT_PAGE_OFFSET },
-#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR "a:r:s:"
+#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR ""
extern unsigned int kexec_arm_image_size;
diff --git a/kexec/arch/arm/kexec-zImage-arm.c b/kexec/arch/arm/kexec-zImage-arm.c
index 98459251..ff609e2c 100644
--- a/kexec/arch/arm/kexec-zImage-arm.c
+++ b/kexec/arch/arm/kexec-zImage-arm.c
@@ -409,7 +409,7 @@ int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
{ "page-offset", 1, 0, OPT_PAGE_OFFSET },
{ 0, 0, 0, 0 },
};
- static const char short_options[] = KEXEC_ARCH_OPT_STR "a:r:";
+ static const char short_options[] = KEXEC_ARCH_OPT_STR "";
/*
* Parse the command line arguments
diff --git a/kexec/arch/hppa/include/arch/options.h b/kexec/arch/hppa/include/arch/options.h
index a9361406..e9deb510 100644
--- a/kexec/arch/hppa/include/arch/options.h
+++ b/kexec/arch/hppa/include/arch/options.h
@@ -17,7 +17,7 @@
{ "ramdisk", 1, 0, OPT_RAMDISK },
-#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR "a:r:s:"
+#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR ""
/* See the other architectures for details of these; HPPA has no
* loader-specific options yet.
diff --git a/kexec/arch/hppa/kexec-elf-hppa.c b/kexec/arch/hppa/kexec-elf-hppa.c
index d3ef0e94..474a9199 100644
--- a/kexec/arch/hppa/kexec-elf-hppa.c
+++ b/kexec/arch/hppa/kexec-elf-hppa.c
@@ -76,7 +76,7 @@ int elf_hppa_load(int argc, char **argv, const char *buf, off_t len,
{ 0, 0, NULL, 0 },
};
- static const char short_options[] = KEXEC_ALL_OPT_STR "d";
+ static const char short_options[] = KEXEC_ALL_OPT_STR;
while ((opt = getopt_long(argc, argv, short_options, options, 0)) !=
-1) {