#include <stdio.h><stdlib.h><stdint.h><.h><unistd.h><fcntl.h> LOGICAL_BLOCK_SIZE 512 * * signature[ reserved1[ uint32_t crc32_tab[] = { , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , uint32_t __efi_crc32( *buf, unsigned *s == (i = ; i < len; i++= crc32_tab[(crc32val ^ s[i]) & ] ^ (crc32val >> *buf, (__efi_crc32(buf, len, ~) ^ ~*= (PSTR) malloc(= == *((uint32_t *+= sprintf(p, += = *((uint16_t *+= sprintf(p, += = *((uint16_t *+= sprintf(p, += (i = ; i < ; i++ (i == ) *p++ = *p++ = hex[data[i] >> *p++ = hex[data[i] & ] = *utf16_to_wchar(uint16_t *str, i = *buf = (wchar_t *) malloc((len + ) * (; i < len; i++== L print_legacy_mbr(&mbr, , (read(fd, &mbr, (legacy_mbr)) == -); -&empty, , * i = (; i < ; i++= & (!memcmp(p, &empty, (mbr_part_entry))) ->status, p->start_head, p->start_sector, p->->end_head, p->end_sector, p->-> print_gpt_header( fd, gpt_header *, (read(fd, gpt, (gpt_header)) == -); - sz[->signature, ] = , gpt->, gpt->, gpt->, gpt->, gpt->, gpt->, gpt->= uuid_to_str(gpt->, gpt->, gpt->, gpt->, gpt->= gpt->->crc_header = (crc32(gpt, gpt->header_size) !=->crc_header = print_gpt_partitions( fd, gpt_header * entries_size = gpt->entry_count * gpt->= (read(fd, buf, entries_size) == -); -**gentry = (partition_entry *&gentry_empty, , i = (; i < gpt->entry_count; i++ (!memcmp(gentry, &gentry_empty, = utf16_to_wchar(gentry->name, = uuid_to_str(gentry->= uuid_to_str(gentry->->lba_first, gentry->lba_last, gentry->++ (crc32(buf, entries_size) != gpt-> main( exitCode = isAlternate = (argc < = argv[ (argc > ) isAlternate = fd = (fd == -); (lseek(fd, - * LOGICAL_BLOCK_SIZE, SEEK_END) == -); exitCode = EXIT_FAILURE; = EXIT_FAILURE; (print_gpt_header(fd, &= EXIT_FAILURE; (lseek(fd, - * (header.entry_count * header.entry_size + LOGICAL_BLOCK_SIZE), SEEK_END) == -); exitCode = EXIT_FAILURE; (lseek(fd, LOGICAL_BLOCK_SIZE * header.lba_entry_start, SEEK_SET) == -); exitCode = EXIT_FAILURE; &