add an error message for wrong key length

This commit is contained in:
Klas Lindfors
2014-10-28 08:37:53 +01:00
parent 61b0284c6d
commit 146fa881f2
+2 -1
View File
@@ -1180,8 +1180,9 @@ int main(int argc, char *argv[]) {
printf("Successfully set new management key.\n"); printf("Successfully set new management key.\n");
} }
} else { } else {
fprintf(stderr, "The new management key has to be exactly %d character.\n", KEY_LEN * 2);
ret = EXIT_FAILURE; ret = EXIT_FAILURE;
} }
} else { } else {
fprintf(stderr, "The set-mgm-key action needs the new-key (-n) argument.\n"); fprintf(stderr, "The set-mgm-key action needs the new-key (-n) argument.\n");
ret = EXIT_FAILURE; ret = EXIT_FAILURE;