Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: src/platform/vboot_reference/utility/cgpt/cgpt.c

Issue 2438005: Much rearranging of cgptlib. Passes all its (new) unit tests. (Closed) Base URL: ssh://gitrw.chromium.org/chromiumos
Patch Set: Pre commit Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/utility/cgpt/cgpt.h ('k') | src/platform/vboot_reference/utility/cgpt/cgpt_add_modify_delete.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698