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 * Header file for cgpt. | 5 * Header file for cgpt. |
6 */ | 6 */ |
7 #ifndef VBOOT_REFERENCE_UTILITY_CGPT_CGPT_H_ | 7 #ifndef VBOOT_REFERENCE_UTILITY_CGPT_CGPT_H_ |
8 #define VBOOT_REFERENCE_UTILITY_CGPT_CGPT_H_ | 8 #define VBOOT_REFERENCE_UTILITY_CGPT_CGPT_H_ |
9 | 9 |
10 #include <getopt.h> | 10 #include <getopt.h> |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 * Caller must prepare enough space for UTF16. The conservative estimation is: | 113 * Caller must prepare enough space for UTF16. The conservative estimation is: |
114 * | 114 * |
115 * utf16 bytecount = bytecount(utf8) / 3 * 4 | 115 * utf16 bytecount = bytecount(utf8) / 3 * 4 |
116 */ | 116 */ |
117 void UTF8ToUTF16(const uint8_t *utf8, uint16_t *utf16); | 117 void UTF8ToUTF16(const uint8_t *utf8, uint16_t *utf16); |
118 | 118 |
119 /* Helper functions for supported GPT types. */ | 119 /* Helper functions for supported GPT types. */ |
120 int ResolveType(const Guid *type, char *buf); | 120 int ResolveType(const Guid *type, char *buf); |
121 int SupportedType(const char *name, Guid *type); | 121 int SupportedType(const char *name, Guid *type); |
122 void PrintTypes(void); | 122 void PrintTypes(void); |
| 123 void EntryDetails(GptEntry *entry, int index, int raw); |
123 | 124 |
124 /* Describes the drive storing the GPT. */ | 125 /* Describes the drive storing the GPT. */ |
125 struct drive { | 126 struct drive { |
126 int inited; /* indicated if this structure is valid */ | 127 int inited; /* indicated if this structure is valid */ |
127 int fd; /* file descriptor */ | 128 int fd; /* file descriptor */ |
128 uint64_t size; /* total size (in bytes) */ | 129 uint64_t size; /* total size (in bytes) */ |
129 GptData gpt; | 130 GptData gpt; |
130 }; | 131 }; |
131 | 132 |
132 extern const char* progname; | 133 extern const char* progname; |
(...skipping 15 matching lines...) Expand all Loading... |
148 | 149 |
149 /* Function declarations for commands. | 150 /* Function declarations for commands. |
150 * The return value of these functions is passed to main()'s exit value. */ | 151 * The return value of these functions is passed to main()'s exit value. */ |
151 int CgptAdm(int argc, char *argv[]); | 152 int CgptAdm(int argc, char *argv[]); |
152 int CgptAttribute(int argc, char *argv[]); | 153 int CgptAttribute(int argc, char *argv[]); |
153 int CgptDev(int argc, char *argv[]); | 154 int CgptDev(int argc, char *argv[]); |
154 int CgptRepair(int argc, char *argv[]); | 155 int CgptRepair(int argc, char *argv[]); |
155 int CgptShow(int argc, char *argv[]); | 156 int CgptShow(int argc, char *argv[]); |
156 | 157 |
157 #endif /* VBOOT_REFERENCE_UTILITY_CGPT_CGPT_H_ */ | 158 #endif /* VBOOT_REFERENCE_UTILITY_CGPT_CGPT_H_ */ |
OLD | NEW |