Deleted Added
sdiff udiff text old ( 204431 ) new ( 204433 )
full compact
1/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.

--- 16 unchanged lines hidden (view full) ---

25
26/*
27 * Command line options
28 */
29int quiet; /* Level of quietness */
30int reservenum; /* Number of memory reservation slots */
31int minsize; /* Minimum blob size */
32int padsize; /* Additional padding to blob */
33
34char *join_path(const char *path, const char *name)
35{
36 int lenp = strlen(path);
37 int lenn = strlen(name);
38 int len;
39 int needslash = 1;
40 char *str;

--- 60 unchanged lines hidden (view full) ---

101 fprintf(stderr, "\t-p <bytes>\n");
102 fprintf(stderr, "\t\tAdd padding to the blob of <bytes> long (extra space)\n");
103 fprintf(stderr, "\t-b <number>\n");
104 fprintf(stderr, "\t\tSet the physical boot cpu\n");
105 fprintf(stderr, "\t-f\n");
106 fprintf(stderr, "\t\tForce - try to produce output even if the input tree has errors\n");
107 fprintf(stderr, "\t-v\n");
108 fprintf(stderr, "\t\tPrint DTC version and exit\n");
109 exit(3);
110}
111
112int main(int argc, char *argv[])
113{
114 struct boot_info *bi;
115 const char *inform = "dts";
116 const char *outform = "dts";

--- 5 unchanged lines hidden (view full) ---

122 int outversion = DEFAULT_FDT_VERSION;
123 long long cmdline_boot_cpuid = -1;
124
125 quiet = 0;
126 reservenum = 0;
127 minsize = 0;
128 padsize = 0;
129
130 while ((opt = getopt(argc, argv, "hI:O:o:V:R:S:p:fcqb:v")) != EOF) {
131 switch (opt) {
132 case 'I':
133 inform = optarg;
134 break;
135 case 'O':
136 outform = optarg;
137 break;
138 case 'o':

--- 21 unchanged lines hidden (view full) ---

160 quiet++;
161 break;
162 case 'b':
163 cmdline_boot_cpuid = strtoll(optarg, NULL, 0);
164 break;
165 case 'v':
166 printf("Version: %s\n", DTC_VERSION);
167 exit(0);
168 case 'h':
169 default:
170 usage();
171 }
172 }
173
174 if (argc > (optind+1))
175 usage();
176 else if (argc < (optind+1))
177 arg = "-";
178 else
179 arg = argv[optind];
180
181 /* minsize and padsize are mutually exclusive */
182 if (minsize && padsize)
183 die("Can't set both -p and -S\n");
184
185 fprintf(stderr, "DTC: %s->%s on file \"%s\"\n",
186 inform, outform, arg);
187
188 if (streq(inform, "dts"))
189 bi = dt_from_source(arg);
190 else if (streq(inform, "fs"))
191 bi = dt_from_fs(arg);
192 else if(streq(inform, "dtb"))

--- 34 unchanged lines hidden ---