]> git.wh0rd.org Git - patches.git/blob - elf2flt-stack-hex.patch
initial import
[patches.git] / elf2flt-stack-hex.patch
1 Index: flthdr.c
2 ===================================================================
3 RCS file: /var/cvs/elf2flt/flthdr.c,v
4 retrieving revision 1.10
5 diff -u -p -r1.10 flthdr.c
6 --- flthdr.c    3 Apr 2006 02:58:44 -0000       1.10
7 +++ flthdr.c    22 Sep 2007 09:50:23 -0000
8 @@ -351,7 +351,12 @@ main(int argc, char *argv[])
9                 case 'R': ramload = -1;             break;
10                 case 'k': ktrace = 1;               break;
11                 case 'K': ktrace = -1;              break;
12 -               case 's': stacksize = atoi(optarg); break;
13 +               case 's':
14 +                       if (optarg[1] == 'x' || optarg[1] == 'X')
15 +                               sscanf(optarg, "%x", &stacksize);
16 +                       else
17 +                               stacksize = atoi(optarg);
18 +                       break;
19                 case 'o': ofile = optarg;           break;
20                 default:
21                         usage("invalid option");