New feature list with record validation

This commit is contained in:
Fabio Scotto di Santolo
2026-08-06 23:34:56 +02:00
parent b542113252
commit 60d2af64e2
3 changed files with 166 additions and 251 deletions

View File

@@ -46,10 +46,13 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}
const char *snapshot = argv[2];
if (list(snapshot) == -1) {
int ret = list(snapshot);
if (ret == -1) {
const int err = errno;
fprintf(stderr, "list failed: %s\n", strerror(err));
return EXIT_FAILURE;
} else if (ret > 0) {
return EXIT_FAILURE;
}
} else {
fprintf(stderr, "command %s is not valid\n", cmd);