1
0
mirror of https://github.com/preble/libpinproc synced 2026-02-24 18:25:23 +01:00

Changed some error message formatting.

This commit is contained in:
Gerry Stellenberg
2011-06-29 00:53:50 -05:00
parent 23a0d02803
commit 95b9cb8193

View File

@@ -1965,13 +1965,13 @@ int checkPROCFile() {
(board_rev & 0x10) >> 1; (board_rev & 0x10) >> 1;
if (proc_file_version != 0) { if (proc_file_version != 0) {
fprintf(stderr, "\nERROR: Invalid .p-roc file."); fprintf(stderr, "\nERROR: Unsupported .p-roc file version. Check for an updated version of this tool.\n\n");
return 0; return 0;
} }
// Check for valid board ID and rev // Check for valid board ID and rev
if (board_id != file_board_id) { if (board_id != file_board_id) {
fprintf(stderr, "\nERROR: This image is not compatible with the P-ROC board (ID: %x)", board_id); fprintf(stderr, "\nERROR: This image is not compatible with the P-ROC board (ID: %x)\n\n", board_id);
return 0; return 0;
} }
else fprintf(stderr, "\nBoard ID verified"); else fprintf(stderr, "\nBoard ID verified");
@@ -1996,7 +1996,7 @@ int checkPROCFile() {
if ((i != file_i) || if ((i != file_i) ||
(checksum != file_checksum) || (checksum != file_checksum) ||
(header_checksum != new_header_checksum)) { (header_checksum != new_header_checksum)) {
fprintf(stderr, "\nFPGA data verification failure!"); fprintf(stderr, "\nFPGA data verification failure!\n\n");
return 0; return 0;
} }
@@ -2090,10 +2090,7 @@ int main( int argc, char** argv )
if (openPROC()) { if (openPROC()) {
fprintf(stderr, "\nVerifying file contents and board compatibility..."); fprintf(stderr, "\nVerifying file contents and board compatibility...");
if (!checkPROCFile()) { if (checkPROCFile()) {
fprintf(stderr, "\nERROR: File %s is corrupt.\n\n", pzXsvfFileName);
}
else {
rewind(in); rewind(in);
preparePROCFile(); preparePROCFile();
processFile(); processFile();