Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sbin/gpt/remove.c,v rcsdiff: /ftp/cvs/cvsroot/src/sbin/gpt/remove.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.3.4.1 retrieving revision 1.6.8.1 diff -u -p -r1.3.4.1 -r1.6.8.1 --- src/sbin/gpt/remove.c 2008/01/09 01:38:07 1.3.4.1 +++ src/sbin/gpt/remove.c 2013/06/23 06:28:51 1.6.8.1 @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/remove.c,v 1.10 2006/10/04 18:20:25 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: remove.c,v 1.3.4.1 2008/01/09 01:38:07 matt Exp $"); +__RCSID("$NetBSD: remove.c,v 1.6.8.1 2013/06/23 06:28:51 tls Exp $"); #endif #include @@ -51,9 +51,9 @@ static unsigned int entry; const char removemsg1[] = "remove -a device ..."; const char removemsg2[] = "remove [-b lba] [-i index] [-s lba] " - "[-t uuid] device ..."; + "[-t type] device ..."; -static void +__dead static void usage_remove(void) { @@ -112,13 +112,14 @@ rem(int fd) hdr = gpt->map_data; ent = (void*)((char*)tbl->map_data + i * le32toh(hdr->hdr_entsz)); - le_uuid_dec(&ent->ent_type, &uuid); + le_uuid_dec(ent->ent_type, &uuid); if (!uuid_is_nil(&type, NULL) && !uuid_equal(&type, &uuid, NULL)) continue; /* Remove the primary entry by clearing the partition type. */ - uuid_create_nil((uuid_t *)&ent->ent_type, NULL); + uuid_create_nil(&uuid, NULL); + le_uuid_enc(ent->ent_type, &uuid); hdr->hdr_crc_table = htole32(crc32(tbl->map_data, le32toh(hdr->hdr_entries) * le32toh(hdr->hdr_entsz))); @@ -132,8 +133,8 @@ rem(int fd) ent = (void*)((char*)lbt->map_data + i * le32toh(hdr->hdr_entsz)); - /* Remove the secundary entry. */ - uuid_create_nil((uuid_t *)&ent->ent_type, NULL); + /* Remove the secondary entry. */ + le_uuid_enc(ent->ent_type, &uuid); hdr->hdr_crc_table = htole32(crc32(lbt->map_data, le32toh(hdr->hdr_entries) * le32toh(hdr->hdr_entsz)));