Re: [PATCH 08/23] sim/erc32: added -v and -vv command line switches for verbose output

Mike Frysinger
2015-02-17T09:13:39Z

[-- Attachment #1: Type: text/plain, Size: 790 bytes --]

On 17 Feb 2015 08:44, Jiri Gaisler wrote:
> --- a/sim/erc32/sis.c
> +++ b/sim/erc32/sis.c
>
> - printf(" %8u ", ebase.simtime);
> + printf(" %8llu ", ebase.simtime);

if i'm reading things correctly, simtime is a uint64, which means you should
include inttypes.h and use PRIu64 here instead of hardcoding llu.

same goes for the other changes you're making like this below.

> @@ -214,6 +214,10 @@ main(argc, argv)
> #endif
> } else if (strcmp(argv[stat], "-dumbio") == 0) {
> dumbio = 1;
> + } else if (strcmp(argv[stat], "-v") == 0) {
> + sis_verbose = 1;
> + } else if (strcmp(argv[stat], "-vv") == 0) {
> + sis_verbose = 2;

what about -v -v ? maybe the -v handler should increment sim_verbose instead
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]