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

Side by Side Diff: utility/dump_fmap.c

Issue 6621003: Don't prepend 'fmap.' to section names. It will break the Cr-48 installer. (Closed) Base URL: http://git.chromium.org/git/vboot_reference.git@master
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « utility/dev_debug_vboot ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 #include <errno.h> 6 #include <errno.h>
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <inttypes.h> 8 #include <inttypes.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 char* s; 50 char* s;
51 for (s=buf;* s; s++) 51 for (s=buf;* s; s++)
52 if (*s == ' ') 52 if (*s == ' ')
53 *s = '_'; 53 *s = '_';
54 FILE* fp = fopen(buf,"wb"); 54 FILE* fp = fopen(buf,"wb");
55 if (!fp) { 55 if (!fp) {
56 fprintf(stderr, "%s: can't open %s: %s\n", 56 fprintf(stderr, "%s: can't open %s: %s\n",
57 progname, buf, strerror(errno)); 57 progname, buf, strerror(errno));
58 retval = 1; 58 retval = 1;
59 } else { 59 } else {
60 if (1 != fwrite(base_of_rom + ah->area_offset, ah->area_size, 1, fp)) { 60 if (ah->area_size &&
61 1 != fwrite(base_of_rom + ah->area_offset, ah->area_size, 1, fp)) {
61 fprintf(stderr, "%s: can't write %s: %s\n", 62 fprintf(stderr, "%s: can't write %s: %s\n",
62 progname, buf, strerror(errno)); 63 progname, buf, strerror(errno));
63 retval = 1; 64 retval = 1;
64 } else { 65 } else {
65 printf("saved as \"%s\"\n", buf); 66 printf("saved as \"%s\"\n", buf);
66 } 67 }
67 fclose(fp); 68 fclose(fp);
68 } 69 }
69 } 70 }
70 71
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 if (0 != munmap(base_of_rom, sb.st_size)) { 160 if (0 != munmap(base_of_rom, sb.st_size)) {
160 fprintf(stderr, "%s: can't munmap %s: %s\n", 161 fprintf(stderr, "%s: can't munmap %s: %s\n",
161 progname, 162 progname,
162 argv[optind], 163 argv[optind],
163 strerror(errno)); 164 strerror(errno));
164 return 1; 165 return 1;
165 } 166 }
166 167
167 return retval; 168 return retval;
168 } 169 }
OLDNEW
« no previous file with comments | « utility/dev_debug_vboot ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698