Print the list of models in the emulator
This commit is contained in:
parent
927837df25
commit
effdf36f7e
@ -6,6 +6,7 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "ovni.h"
|
#include "ovni.h"
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
|
#include "models.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -37,6 +38,9 @@ usage(void)
|
|||||||
rerr(" tracedir The output trace dir generated by ovni.\n");
|
rerr(" tracedir The output trace dir generated by ovni.\n");
|
||||||
rerr("\n");
|
rerr("\n");
|
||||||
rerr("The output PRV files are placed in the tracedir directory.\n");
|
rerr("The output PRV files are placed in the tracedir directory.\n");
|
||||||
|
rerr("\n");
|
||||||
|
rerr("Available emulation models:\n");
|
||||||
|
models_print();
|
||||||
|
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
@ -50,3 +50,12 @@ models_get_version(const char *name)
|
|||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
models_print(void)
|
||||||
|
{
|
||||||
|
for (int i = 0; models[i] != NULL; i++) {
|
||||||
|
struct model_spec *spec = models[i];
|
||||||
|
rerr(" %c %-8s %s\n", spec->model, spec->name, spec->version);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -9,5 +9,6 @@ struct model;
|
|||||||
|
|
||||||
USE_RET int models_register(struct model *model);
|
USE_RET int models_register(struct model *model);
|
||||||
USE_RET const char *models_get_version(const char *name);
|
USE_RET const char *models_get_version(const char *name);
|
||||||
|
void models_print(void);
|
||||||
|
|
||||||
#endif /* MODELS_H */
|
#endif /* MODELS_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user