#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); } } }