Module Name: src
Committed By: martin
Date: Wed Mar 22 19:59:16 UTC 2017
Modified Files:
src/sbin/gpt: recover.c
Log Message:
Add missing endianes swap to make the "recover" command work on big endian
machines.
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sbin/gpt/recover.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/gpt/recover.c
diff -u src/sbin/gpt/recover.c:1.16 src/sbin/gpt/recover.c:1.17
--- src/sbin/gpt/recover.c:1.16 Sun Jun 12 12:48:32 2016
+++ src/sbin/gpt/recover.c Wed Mar 22 19:59:16 2017
@@ -33,7 +33,7 @@
__FBSDID("$FreeBSD: src/sbin/gpt/recover.c,v 1.8 2005/08/31 01:47:19 marcel Exp $");
#endif
#ifdef __RCSID
-__RCSID("$NetBSD: recover.c,v 1.16 2016/06/12 12:48:32 jnemeth Exp $");
+__RCSID("$NetBSD: recover.c,v 1.17 2017/03/22 19:59:16 martin Exp $");
#endif
#include <sys/types.h>
@@ -177,7 +177,7 @@ recover(gpt_t gpt, int recoverable)
}
if (gpt->gpt != NULL &&
- ((struct gpt_hdr *)(gpt->gpt->map_data))->hdr_lba_alt !=
+ le64toh(((struct gpt_hdr *)(gpt->gpt->map_data))->hdr_lba_alt) !=
(uint64_t)last) {
gpt_warnx(gpt, "Media size has changed, please use "
"'%s resizedisk'", getprogname());