tools/intel_dump_decode: make devid parsing more useful
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 17 Oct 2011 17:41:42 +0000 (19:41 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 17 Oct 2011 17:41:42 +0000 (19:41 +0200)
We use hex for these!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
tools/intel_dump_decode.c

index 39d8b4f..012c944 100644 (file)
@@ -159,7 +159,7 @@ main (int argc, char *argv[])
                               long_options, &option_index)) != -1) {
                switch(c) {
                case 'd':
-                       devid = atoi(optarg);
+                       devid = strtoul(optarg, NULL, 0);
                        break;
                case 'b':
                        binary = 1;
@@ -178,7 +178,6 @@ main (int argc, char *argv[])
                exit(-1);
        }
 
-
        for (i = optind; i < argc; i++) {
                if (binary == 1)
                        read_bin_file(devid, argv[i]);