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 * Utility for ChromeOS-specific GPT partitions, Please see corresponding .c | 5 * Utility for ChromeOS-specific GPT partitions, Please see corresponding .c |
6 * files for more details. | 6 * files for more details. |
7 */ | 7 */ |
8 /* To compile on host without compatility to BSD, we include | 8 /* To compile on host without compatility to BSD, we include |
9 * endian.h under chroot. */ | 9 * endian.h under chroot. */ |
10 #define _BSD_SOURCE | 10 #define _BSD_SOURCE |
11 #include "endian.h" | 11 #include "endian.h" |
12 | 12 |
13 #define __USE_LARGEFILE64 | 13 #define __USE_LARGEFILE64 |
14 #define __USE_FILE_OFFSET64 | 14 #define __USE_FILE_OFFSET64 |
15 #define _LARGEFILE64_SOURCE | 15 #define _LARGEFILE64_SOURCE |
16 #include "cgpt.h" | 16 #include "cgpt.h" |
| 17 #include "cgpt_tofix.h" |
17 #include <errno.h> | 18 #include <errno.h> |
18 #include <fcntl.h> | 19 #include <fcntl.h> |
19 #include <getopt.h> | 20 #include <getopt.h> |
20 #include <stdint.h> | 21 #include <stdint.h> |
21 #include <stdio.h> | 22 #include <stdio.h> |
22 #include <stdlib.h> | 23 #include <stdlib.h> |
23 #include <string.h> | 24 #include <string.h> |
24 #include <sys/ioctl.h> | 25 #include <sys/ioctl.h> |
25 #include <sys/mount.h> | 26 #include <sys/mount.h> |
26 #include <sys/stat.h> | 27 #include <sys/stat.h> |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 printf("Copyright (c) 2010 The Chromium OS Authors. All rights reserved.\n"); | 447 printf("Copyright (c) 2010 The Chromium OS Authors. All rights reserved.\n"); |
447 cmd = argv[optind++]; | 448 cmd = argv[optind++]; |
448 for (i = 0; i < sizeof(cmds)/sizeof(cmds[0]); ++i) { | 449 for (i = 0; i < sizeof(cmds)/sizeof(cmds[0]); ++i) { |
449 if (cmd && !strcmp(cmds[i].name, cmd)) | 450 if (cmd && !strcmp(cmds[i].name, cmd)) |
450 return cmds[i].fp(argc, argv); | 451 return cmds[i].fp(argc, argv); |
451 } | 452 } |
452 | 453 |
453 Usage(0); | 454 Usage(0); |
454 return CGPT_FAILED; | 455 return CGPT_FAILED; |
455 } | 456 } |
OLD | NEW |