aboutsummaryrefslogtreecommitdiffstats
path: root/src/dump.c
blob: 5426e8c15f054bc68f7ac1be5fa16b9224f367aa (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
#include "project.h"


void
dump_out (DISK * d)
{
  GPT_headers h;
  int i;
  char name[1024];

  h = headers_get (d);

  for (i = 0; i < h.header.n_partition_entries; ++i)
    {
      GPT_entry e = entry_read (d, &h.header, i);
      if (!entry_empty (&e))
        {

          utf16_to_ascii (e.name, sizeof (e.name), name, sizeof (name));

          printf ("gpt -d ${DISK} -a %d \"%s\" \"%s\" %lld %lld\n",
                  i, name, guid_to_a_simple (e.type), e.start, e.end);

        }
    }


}