diff options
Diffstat (limited to 'service/src/main.c')
| -rw-r--r-- | service/src/main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/service/src/main.c b/service/src/main.c index 1e549c9..095eb7d 100644 --- a/service/src/main.c +++ b/service/src/main.c @@ -154,10 +154,15 @@ query_cmd(char *arg) FILE *f = NULL; size_t size; - if (cached.valid) + if (arg && !strcmp(arg, "last")) { + if (!cached.valid) { + fprintf(stderr, "No cached info report available\n"); + return; + } hash = cached.hash; - else - hash = mhash(ask("> What is the model name? "), -1); + } else { + hash = mhash(ask("> Model name: "), -1); + } if (!(d = opendir(resultdir))) return; |
