Module Name: src Committed By: jnemeth Date: Wed Dec 18 03:20:10 UTC 2013
Modified Files: src/sbin/gpt: show.c Log Message: If we want to GUIDs to display with correct endian, it helps to decode it first. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sbin/gpt/show.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/show.c diff -u src/sbin/gpt/show.c:1.14 src/sbin/gpt/show.c:1.15 --- src/sbin/gpt/show.c:1.14 Mon Dec 9 01:35:02 2013 +++ src/sbin/gpt/show.c Wed Dec 18 03:20:09 2013 @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/show.c,v 1.14 2006/06/22 22:22:32 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: show.c,v 1.14 2013/12/09 01:35:02 jnemeth Exp $"); +__RCSID("$NetBSD: show.c,v 1.15 2013/12/18 03:20:09 jnemeth Exp $"); #endif #include <sys/types.h> @@ -134,7 +134,7 @@ unfriendly: static void show(void) { - uuid_t type; + uuid_t guid, type; off_t start; map_t *m, *p; struct mbr *mbr; @@ -198,8 +198,8 @@ show(void) printf("- \"%s\"", utf16_to_utf8(ent->ent_name)); } else if (show_guid) { - uuid_to_string((uuid_t *)ent->ent_guid, - &s, NULL); + le_uuid_dec(ent->ent_guid, &guid); + uuid_to_string(&guid, &s, NULL); printf("- %s", s); free(s); } else { @@ -219,7 +219,7 @@ show(void) static void show_one(void) { - uuid_t type; + uuid_t guid, type; map_t *m; struct gpt_ent *ent; const char *s1; @@ -260,7 +260,8 @@ show_one(void) printf("Type: %s (%s)\n", s1, s2); free(s2); - uuid_to_string((uuid_t *)ent->ent_guid, &s2, NULL); + le_uuid_dec(ent->ent_guid, &guid); + uuid_to_string(&guid, &s2, NULL); printf("GUID: %s\n", s2); free(s2);