aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpt.c
blob: 1b93dc12ebc77c47ece3ea845f2863509cc462a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
 * gpt.c:
 *
 * Copyright (c) 2007 James McKenzie <james@fishsoup.dhs.org>,
 * All rights reserved.
 *
 */

static char rcsid[] = "$Id: gpt.c,v 1.5 2007/09/10 09:53:07 root Exp $";

/*
 * $Log: gpt.c,v $
 * Revision 1.5  2007/09/10 09:53:07  root
 * *** empty log message ***
 *
 * Revision 1.4  2007/09/09 22:30:05  root
 * *** empty log message ***
 *
 * Revision 1.3  2007/09/09 22:29:50  root
 * *** empty log message ***
 *
 * Revision 1.2  2007/09/08 18:21:23  root
 * *** empty log message ***
 *
 * Revision 1.1  2007/09/08 16:49:37  root
 * *** empty log message ***
 *
 */



#include "project.h"

void usage(void)
{
fprintf(stderr,
"Usage:\n"
"gpt disk-device [-l] [-e n] [-m n 



int
main (int argc, char *argv[])
{
  DISK *d;


  d = disk_open ("/dev/sda");


  new(d);
  add (d, 1, "linux-boot","linux-ext3", 10 * 1024 * 2, 30 * 1024 * 2);
  show (d);

#if 0


  printf ("hecrc=%08x\n", header_calc_ent_crc (d, h));


  return 0;

//hexdump(stderr,buf,0,512);
  for (j = 0; j < 4; ++j)
    {
      e = (GPT_entry *) buf;
      e += j;
      printf ("%d,%d: %s\n", i, j, guid_to_a (e->type));
    }
}


#endif
return 0;
}