m5.c (3038:a20a6f060dd7) | m5.c (3125:febd811bccc6) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 155 unchanged lines hidden (view full) --- 164 m5_dumpreset_stats(arg1, arg2); 165 return 0; 166 167 default: 168 usage(); 169 } 170 } 171 | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 155 unchanged lines hidden (view full) --- 164 m5_dumpreset_stats(arg1, arg2); 165 return 0; 166 167 default: 168 usage(); 169 } 170 } 171 |
172 if (COMPARE("readfile")) { 173 char buf[256*1024]; 174 int offset = 0; 175 int len; 176 177 if (argc != 2) 178 usage(); 179 180 while ((len = m5_readfile(buf, sizeof(buf), offset)) > 0) { 181 write(STDOUT_FILENO, buf, len); 182 offset += len; 183 } 184 185 return 0; 186 } 187 |
|
172 if (COMPARE("checkpoint")) { 173 switch (argc) { 174 case 4: 175 arg2 = strtoul(argv[3], NULL, 0); 176 case 3: 177 arg1 = strtoul(argv[2], NULL, 0); 178 case 2: 179 m5_checkpoint(arg1, arg2); 180 return 0; 181 182 default: 183 usage(); 184 } 185 186 return 0; 187 } 188 | 188 if (COMPARE("checkpoint")) { 189 switch (argc) { 190 case 4: 191 arg2 = strtoul(argv[3], NULL, 0); 192 case 3: 193 arg1 = strtoul(argv[2], NULL, 0); 194 case 2: 195 m5_checkpoint(arg1, arg2); 196 return 0; 197 198 default: 199 usage(); 200 } 201 202 return 0; 203 } 204 |
205 if (COMPARE("loadsymbol")) { 206 m5_loadsymbol(arg1); 207 return 0; |
|
189 if (COMPARE("readfile")) { 190 char buf[256*1024]; 191 int offset = 0; 192 int len; 193 194 if (argc != 2) 195 usage(); 196 197 while ((len = m5_readfile(buf, sizeof(buf), offset)) > 0) { 198 write(STDOUT_FILENO, buf, len); 199 offset += len; 200 } 201 202 return 0; 203 } 204 205 usage(); 206} | 208 if (COMPARE("readfile")) { 209 char buf[256*1024]; 210 int offset = 0; 211 int len; 212 213 if (argc != 2) 214 usage(); 215 216 while ((len = m5_readfile(buf, sizeof(buf), offset)) > 0) { 217 write(STDOUT_FILENO, buf, len); 218 offset += len; 219 } 220 221 return 0; 222 } 223 224 usage(); 225} |