From 452885a387b3a1613defa378cee79eb97e7b4fc8 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Tue, 18 May 2021 14:45:50 +0200 Subject: seperated modelname and solidname handling --- service/src/main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'service/src/main.c') 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; -- cgit v1.2.3-71-gd317