Skip to contentSkip to conversation

user-cr: s390: Detect s390x arch too

PATCH In review Matt Helsley 2 participants 2 messages Sep 23, 2009 – Sep 24, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 user-cr: s390: Detect s390x arch too

---
 ckptinfo.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
ckptinfo.c +2 -2
index b2101e6..6859742 100644
@@ -63,7 +63,7 @@ static int image_parse_error(struct ckpt_hdr *h, int fd, struct args *args);
 #define __HAVE_image_parse_cpu
 #define image_parse_cpu   image_parse_cpu_X86
 static int image_parse_cpu_X86(struct ckpt_hdr *h, int fd, struct args *args);
-#elif defined(__s390__)
+#elif defined(__s390__) || defined(__s390x__)
 #define __HAVE_image_parse_cpu
 #define image_parse_cpu   image_parse_cpu_s390
 static int image_parse_cpu_s390(struct ckpt_hdr *h, int fd, struct args *args);
@@ -301,7 +301,7 @@ static int image_parse_cpu_X86(struct ckpt_hdr *h, int fd, struct args *args)
 }
 #endif
 
-#ifdef __s390__
+#if defined(__s390__) || defined(__s390x__)
 static int image_parse_cpu_s390(struct ckpt_hdr *h, int fd, struct args *args)
 {
 	struct ckpt_hdr_cpu *hh = (struct ckpt_hdr_cpu *) h;
Signature · 1 line
1.5.6.3

A message that is not in the archive (sent off-list or not yet received): 1253743418-10091-2-git-send-email-matthltc-r/[email protected]

#2 lore raw
Quoted 1 line · Matt Helsley

We don't actually support s390, but if/when we do it seems reasonable to assume it'll be handled the same as s390x, so

(Certainly the original code, checking only defined(__s390)) wasn't right)

Quoted 33 lines
---
 ckptinfo.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
ckptinfo.c +2 -2
index b2101e6..6859742 100644
@@ -63,7 +63,7 @@ static int image_parse_error(struct ckpt_hdr *h, int fd, struct args *args);
 #define __HAVE_image_parse_cpu
 #define image_parse_cpu   image_parse_cpu_X86
 static int image_parse_cpu_X86(struct ckpt_hdr *h, int fd, struct args *args);
-#elif defined(__s390__)
+#elif defined(__s390__) || defined(__s390x__)
 #define __HAVE_image_parse_cpu
 #define image_parse_cpu   image_parse_cpu_s390
 static int image_parse_cpu_s390(struct ckpt_hdr *h, int fd, struct args *args);
@@ -301,7 +301,7 @@ static int image_parse_cpu_X86(struct ckpt_hdr *h, int fd, struct args *args)
 }
 #endif
 
-#ifdef __s390__
+#if defined(__s390__) || defined(__s390x__)
 static int image_parse_cpu_s390(struct ckpt_hdr *h, int fd, struct args *args)
 {
 	struct ckpt_hdr_cpu *hh = (struct ckpt_hdr_cpu *) h;
Signature · 6 lines
1.5.6.3

_______________________________________________
Containers mailing list
Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linux-foundation.org/mailman/listinfo/containers