[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.1 and 1.2

version 1.1, 2006/10/15 22:34:15 version 1.2, 2006/10/15 22:36:29
Line 25 
Line 25 
  */   */
   
 #include <sys/cdefs.h>  #include <sys/cdefs.h>
   #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/sbin/gpt/remove.c,v 1.10 2006/10/04 18:20:25 marcel Exp $");  __FBSDID("$FreeBSD: src/sbin/gpt/remove.c,v 1.10 2006/10/04 18:20:25 marcel Exp $");
   #endif
   #ifdef __RCSID
   __RCSID("$NetBSD$");
   #endif
   
 #include <sys/types.h>  #include <sys/types.h>
   
Line 109  rem(int fd)
Line 114  rem(int fd)
                         continue;                          continue;
   
                 /* Remove the primary entry by clearing the partition type. */                  /* Remove the primary entry by clearing the partition type. */
                 uuid_create_nil(&ent->ent_type, NULL);                  uuid_create_nil((uuid_t *)&ent->ent_type, NULL);
   
                 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 124  rem(int fd)
Line 129  rem(int fd)
                     le32toh(hdr->hdr_entsz));                      le32toh(hdr->hdr_entsz));
   
                 /* Remove the secundary entry. */                  /* Remove the secundary entry. */
                 uuid_create_nil(&ent->ent_type, NULL);                  uuid_create_nil((uuid_t *)&ent->ent_type, NULL);
   
                 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)));
Line 133  rem(int fd)
Line 138  rem(int fd)
   
                 gpt_write(fd, lbt);                  gpt_write(fd, lbt);
                 gpt_write(fd, tpg);                  gpt_write(fd, tpg);
   #ifdef __FreeBSD__
                 printf("%sp%u removed\n", device_name, m->map_index);                  printf("%sp%u removed\n", device_name, m->map_index);
   #endif
   #ifdef __NetBSD__
                   printf("partition %d removed from %s\n", m->map_index,
                       device_name);
   #endif
         }          }
 }  }
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

CVSweb <webmaster@jp.NetBSD.org>