Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/gpt Add missing endianes swap to make the "recover" com...
details: https://anonhg.NetBSD.org/src/rev/7924931b62b6
branches: trunk
changeset: 352242:7924931b62b6
user: martin <martin%NetBSD.org@localhost>
date: Wed Mar 22 19:59:16 2017 +0000
description:
Add missing endianes swap to make the "recover" command work on big endian
machines.
diffstat:
sbin/gpt/recover.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 677fa1f19bbc -r 7924931b62b6 sbin/gpt/recover.c
--- a/sbin/gpt/recover.c Wed Mar 22 19:36:04 2017 +0000
+++ b/sbin/gpt/recover.c Wed Mar 22 19:59:16 2017 +0000
@@ -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 @@
}
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());
Home |
Main Index |
Thread Index |
Old Index