From 61c1751407b35ed4fe98d5e1e39608c7940349d2 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 9 Sep 2007 22:29:50 +0000 Subject: *** empty log message *** --- src/new.c | 57 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) (limited to 'src/new.c') diff --git a/src/new.c b/src/new.c index d8c177f..2d603ff 100644 --- a/src/new.c +++ b/src/new.c @@ -3,45 +3,46 @@ -void new(DISK *d) +void +new (DISK * d) { -uint8_t buf[SECTOR_SIZE]; + uint8_t buf[SECTOR_SIZE]; -MBR m; -GPT_header h,alt_h; -GPT_entry e={0}; -GUID disk_guid; -uint64_t lbas; -int n; + MBR m; + GPT_header h, alt_h; + GPT_entry e = { 0 }; + GUID disk_guid; + uint64_t lbas; + int n; -lbas=disk_lbas(d); + lbas = disk_lbas (d); -disk_guid=guid_random(); + disk_guid = guid_random (); -m=mbr_new(lbas); -memcpy(buf,&m,sizeof(m)); -disk_write(d,buf,0,1); + m = mbr_new (lbas); + memcpy (buf, &m, sizeof (m)); + disk_write (d, buf, 0, 1); -h=header_new ( disk_guid, lbas,0); -alt_h=header_new(disk_guid,lbas,1); + h = header_new (disk_guid, lbas, 0); + alt_h = header_new (disk_guid, lbas, 1); -for (n=0;n