fix: reject unknown command-line arguments instead of silently ignoring them

This commit is contained in:
m1ngsama 2026-04-15 09:51:49 +08:00
parent 49674b75e8
commit 6c6c500134

View file

@ -45,6 +45,10 @@ int main(int argc, char **argv) {
printf(" -d DIR Store host key and logs in DIR\n");
printf(" -h Show this help\n");
return 0;
} else {
fprintf(stderr, "Unknown option: %s\n", argv[i]);
fprintf(stderr, "Usage: %s [-p PORT] [-d DIR] [-h]\n", argv[0]);
return 1;
}
}