Deleted Added
sdiff udiff text old ( 9457:a4739b6f799d ) new ( 9898:2935441b0870 )
full compact
1/*
2 * Copyright (c) 2011 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

46#endif
47
48#include <err.h>
49#include <fcntl.h>
50#include <inttypes.h>
51#include <stdio.h>
52#include <stdlib.h>
53#include <string.h>
54#include <unistd.h>
55
56#include "m5op.h"
57
58char *progname;
59char *command = "unspecified";
60void usage();
61
62void
63parse_int_args(int argc, char *argv[], uint64_t ints[], int len)
64{
65 if (argc > len)

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

310 header, progname, mainfuncs[i].name, mainfuncs[i].usage);
311 }
312 fprintf(stderr, "\n");
313 fprintf(stderr, "All times in nanoseconds!\n");
314
315 exit(1);
316}
317
318int
319main(int argc, char *argv[])
320{
321 progname = argv[0];
322 if (argc < 2)
323 usage(1);
324
325 command = argv[1];
326
327 argv += 2;
328 argc -= 2;
329
330 int i;
331 for (i = 0; i < numfuncs; ++i) {
332 if (strcmp(command, mainfuncs[i].name) != 0)
333 continue;
334
335 mainfuncs[i].func(argc, argv);
336 exit(0);
337 }
338
339 usage(1);
340}