sim/ppc: Fix check for --sysroot= option

Fixes an error reported by Tristan and which can be evidenced by
doing:

        % powerpc-elf-gdb
        (gdb) target sim --sysroot=var
        Invalid option: --sysroot=/var
        [...]

sim/ppc/ChangeLog:

        * psim.c (psim_options): Fix length of comparison when checking
        for --sysroot= option.
This commit is contained in:
Joel Brobecker 2011-06-09 14:21:43 +00:00
parent 807b48afa0
commit 94e4274dc0
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-06-09 Joel Brobecker <brobecker@adacore.com>
* psim.c (psim_options): Fix length of comparison when checking
for --sysroot= option.
2011-06-08 Joel Brobecker <brobecker@adacore.com>
* psim.c (psim_options): Add option that cause the error

View File

@ -359,7 +359,7 @@ psim_options(device *root,
else if (strcmp (argv[argp], "--help") == 0)
psim_usage (0, 1);
else if (strncmp (argv[argp], "--sysroot=",
sizeof ("--sysroot=")) == 0)
sizeof ("--sysroot=") - 1) == 0)
/* Ignore this option. */
p = argv[argp] + strlen(argv[argp]) - 1;
else if (strcmp (argv[argp], "--version") == 0)