Add linter mode
This commit is contained in:
parent
4fcef1c5b6
commit
97320eda4e
8
emu.c
8
emu.c
@ -426,6 +426,9 @@ next_event(struct ovni_emu *emu)
|
|||||||
{
|
{
|
||||||
err("warning: backwards jump in time %lu -> %lu for tid %d\n",
|
err("warning: backwards jump in time %lu -> %lu for tid %d\n",
|
||||||
emu->lastclock, stream->lastclock, stream->tid);
|
emu->lastclock, stream->lastclock, stream->tid);
|
||||||
|
|
||||||
|
if(emu->enable_linter)
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
emu->lastclock = stream->lastclock;
|
emu->lastclock = stream->lastclock;
|
||||||
@ -756,13 +759,16 @@ parse_args(struct ovni_emu *emu, int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
int opt;
|
int opt;
|
||||||
|
|
||||||
while((opt = getopt(argc, argv, "c:")) != -1)
|
while((opt = getopt(argc, argv, "c:l")) != -1)
|
||||||
{
|
{
|
||||||
switch(opt)
|
switch(opt)
|
||||||
{
|
{
|
||||||
case 'c':
|
case 'c':
|
||||||
emu->clock_offset_file = optarg;
|
emu->clock_offset_file = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'l':
|
||||||
|
emu->enable_linter = 1;
|
||||||
|
break;
|
||||||
default: /* '?' */
|
default: /* '?' */
|
||||||
usage(argc, argv);
|
usage(argc, argv);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user