| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cgpt.h" | 5 #include "cgpt.h" |
| 6 | 6 |
| 7 #define __STDC_FORMAT_MACROS | 7 #define __STDC_FORMAT_MACROS |
| 8 #include <getopt.h> | 8 #include <getopt.h> |
| 9 #include <inttypes.h> | 9 #include <inttypes.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 char buf[BUFFER_SIZE(sizeof(header->signature))]; | 88 char buf[BUFFER_SIZE(sizeof(header->signature))]; |
| 89 RawDump((uint8_t *)header->signature, sizeof(header->signature), buf, 1); | 89 RawDump((uint8_t *)header->signature, sizeof(header->signature), buf, 1); |
| 90 printf("%s", buf); | 90 printf("%s", buf); |
| 91 } | 91 } |
| 92 printf("\n"); | 92 printf("\n"); |
| 93 | 93 |
| 94 printf("%sRev: 0x%08x\n", indent, header->revision); | 94 printf("%sRev: 0x%08x\n", indent, header->revision); |
| 95 printf("%sSize: %d\n", indent, header->size); | 95 printf("%sSize: %d\n", indent, header->size); |
| 96 printf("%sHeader CRC: 0x%08x\n", indent, header->header_crc32); | 96 printf("%sHeader CRC: 0x%08x\n", indent, header->header_crc32); |
| 97 printf("%sMy LBA: %lld\n", indent, (long long)header->my_lba); | 97 printf("%sMy LBA: %lld\n", indent, (long long)header->my_lba); |
| 98 printf("%sAlternate LBA: %lld\n", indent, (long long)header->alternate_lba); |
| 98 printf("%sFirst LBA: %lld\n", indent, (long long)header->first_usable_lba); | 99 printf("%sFirst LBA: %lld\n", indent, (long long)header->first_usable_lba); |
| 99 printf("%sLast LBA: %lld\n", indent, (long long)header->last_usable_lba); | 100 printf("%sLast LBA: %lld\n", indent, (long long)header->last_usable_lba); |
| 100 | 101 |
| 101 { /* For disk guid */ | 102 { /* For disk guid */ |
| 102 char buf[GUID_STRLEN]; | 103 char buf[GUID_STRLEN]; |
| 103 GuidToStr(&header->disk_uuid, buf); | 104 GuidToStr(&header->disk_uuid, buf); |
| 104 printf("%sDisk UUID: %s\n", indent, buf); | 105 printf("%sDisk UUID: %s\n", indent, buf); |
| 105 } | 106 } |
| 106 | 107 |
| 107 printf("%sEntries LBA: %lld\n", indent, (long long)header->entries_lba); | 108 printf("%sEntries LBA: %lld\n", indent, (long long)header->entries_lba); |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 } | 405 } |
| 405 | 406 |
| 406 (void) CheckValid(&drive); | 407 (void) CheckValid(&drive); |
| 407 (void) DriveClose(&drive, 0); | 408 (void) DriveClose(&drive, 0); |
| 408 | 409 |
| 409 return CGPT_OK; | 410 return CGPT_OK; |
| 410 } | 411 } |
| 411 | 412 |
| 412 | 413 |
| 413 | 414 |
| OLD | NEW |