summaryrefslogtreecommitdiff
path: root/kexec/arch/mips/kexec-mips.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexec/arch/mips/kexec-mips.c')
-rw-r--r--kexec/arch/mips/kexec-mips.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/kexec/arch/mips/kexec-mips.c b/kexec/arch/mips/kexec-mips.c
index b17a20b..e4ec71b 100644
--- a/kexec/arch/mips/kexec-mips.c
+++ b/kexec/arch/mips/kexec-mips.c
@@ -16,7 +16,6 @@
#include <stdint.h>
#include <string.h>
#include <getopt.h>
-#include <sys/utsname.h>
#include "../../kexec.h"
#include "../../kexec-syscall.h"
#include "kexec-mips.h"
@@ -122,28 +121,16 @@ int arch_process_options(int argc, char **argv)
return 0;
}
+const struct arch_map_entry arches[] = {
+ /* For compatibility with older patches
+ * use KEXEC_ARCH_DEFAULT instead of KEXEC_ARCH_MIPS here.
+ */
+ { "mips", KEXEC_ARCH_DEFAULT },
+ { 0 },
+};
+
int arch_compat_trampoline(struct kexec_info *info)
{
- int result;
- struct utsname utsname;
- result = uname(&utsname);
- if (result < 0) {
- fprintf(stderr, "uname failed: %s\n",
- strerror(errno));
- return -1;
- }
- if (strcmp(utsname.machine, "mips") == 0)
- {
- /* For compatibility with older patches
- * use KEXEC_ARCH_DEFAULT instead of KEXEC_ARCH_MIPS here.
- */
- info->kexec_flags |= KEXEC_ARCH_DEFAULT;
- }
- else {
- fprintf(stderr, "Unsupported machine type: %s\n",
- utsname.machine);
- return -1;
- }
return 0;
}