[BACK]Return to remove.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sbin / gpt

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sbin/gpt/remove.c between version 1.6 and 1.6.8.1

version 1.6, 2011/08/27 17:38:16 version 1.6.8.1, 2013/06/23 06:28:51
Line 112  rem(int fd)
Line 112  rem(int fd)
                 hdr = gpt->map_data;                  hdr = gpt->map_data;
                 ent = (void*)((char*)tbl->map_data + i *                  ent = (void*)((char*)tbl->map_data + i *
                     le32toh(hdr->hdr_entsz));                      le32toh(hdr->hdr_entsz));
                 le_uuid_dec(&ent->ent_type, &uuid);                  le_uuid_dec(ent->ent_type, &uuid);
                 if (!uuid_is_nil(&type, NULL) &&                  if (!uuid_is_nil(&type, NULL) &&
                     !uuid_equal(&type, &uuid, NULL))                      !uuid_equal(&type, &uuid, NULL))
                         continue;                          continue;
   
                 /* Remove the primary entry by clearing the partition type. */                  /* 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,                  hdr->hdr_crc_table = htole32(crc32(tbl->map_data,
                     le32toh(hdr->hdr_entries) * le32toh(hdr->hdr_entsz)));                      le32toh(hdr->hdr_entries) * le32toh(hdr->hdr_entsz)));
Line 132  rem(int fd)
Line 133  rem(int fd)
                 ent = (void*)((char*)lbt->map_data + i *                  ent = (void*)((char*)lbt->map_data + i *
                     le32toh(hdr->hdr_entsz));                      le32toh(hdr->hdr_entsz));
   
                 /* Remove the secundary entry. */                  /* Remove the secondary entry. */
                 uuid_create_nil((uuid_t *)&ent->ent_type, NULL);                  le_uuid_enc(ent->ent_type, &uuid);
   
                 hdr->hdr_crc_table = htole32(crc32(lbt->map_data,                  hdr->hdr_crc_table = htole32(crc32(lbt->map_data,
                     le32toh(hdr->hdr_entries) * le32toh(hdr->hdr_entsz)));                      le32toh(hdr->hdr_entries) * le32toh(hdr->hdr_entsz)));

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.6.8.1

CVSweb <webmaster@jp.NetBSD.org>