Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/gpt correctly print the gpt header revision as a "float"
details: https://anonhg.NetBSD.org/src/rev/a30940b54a7c
branches: trunk
changeset: 341662:a30940b54a7c
user: jnemeth <jnemeth%NetBSD.org@localhost>
date: Mon Nov 16 12:24:13 2015 +0000
description:
correctly print the gpt header revision as a "float"
diffstat:
sbin/gpt/header.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 5b0f6e655505 -r a30940b54a7c sbin/gpt/header.c
--- a/sbin/gpt/header.c Mon Nov 16 09:10:58 2015 +0000
+++ b/sbin/gpt/header.c Mon Nov 16 12:24:13 2015 +0000
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifdef __RCSID
-__RCSID("$NetBSD: header.c,v 1.1 2015/11/03 02:19:24 jnemeth Exp $");
+__RCSID("$NetBSD: header.c,v 1.2 2015/11/16 12:24:13 jnemeth Exp $");
#endif
#include <sys/types.h>
@@ -62,6 +62,7 @@
static void
header(void)
{
+ unsigned int revision;
map_t *gpt;
struct gpt_hdr *hdr;
char buf[128];
@@ -103,7 +104,9 @@
}
hdr = gpt->map_data;
- printf("- GPT Revision: %u\n", hdr->hdr_revision);
+ revision = le32toh(hdr->hdr_revision);
+ printf("- GPT Header Revision: %u.%u\n", revision >> 16,
+ revision & 0xffff);
printf("- First Data Sector: %llu\n",
(long long unsigned)hdr->hdr_lba_start);
#ifdef HN_AUTOSCALE
Home |
Main Index |
Thread Index |
Old Index