Skip to content

Commit

Permalink
CCB 2019-09-04: Merge #1 #2
Browse files Browse the repository at this point in the history
Reviewed and approved at 2019-09-04 CCB
  • Loading branch information
skliper committed Sep 12, 2019
2 parents 1ab1c56 + 0bfcb66 commit cc6950b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
##
## If this subsystem needs include files from another app, add the path here.
##
INCLUDE_PATH = \
-I..
INCLUDE_PATH =

all:
gcc $(INCLUDE_PATH) -g -o cfe_ts_crc cfe_ts_crc.c

clean:
rm cfe_ts_crc
rm -f cfe_ts_crc

14 changes: 11 additions & 3 deletions cfe_ts_crc.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
#include <stdio.h>
#include <fcntl.h>
#include <string.h>

#include <stdlib.h>
#include <unistd.h>

#define CFE_ES_CRC_8 1 /**< \brief CRC ( 8 bit additive - returns 32 bit total) (Currently not implemented) */
#define CFE_ES_CRC_16 2 /**< \brief CRC (16 bit additive - returns 32 bit total) */
Expand Down Expand Up @@ -177,7 +178,14 @@ int main( int argc, char **argv )
if (readSize != 100) done=1;
}
/* print the size/CRC results */
printf("\nTable File Name: %s\nTable Size: %d Bytes\nExpected TS Validation CRC: 0x%08X\n\n", argv[1], fileSize, fileCRC);
printf("\nTable File Name: %s\nTable Size: %d Bytes\nExpected TS Validation CRC: 0x%08X\n\n", argv[1], fileSize, fileCRC);

/* Close file and check*/
if( close(fd) != 0 )
{
printf("\nerror: Cannot close file!\n");
exit(0);
}

return(fileCRC);
return(fileCRC);
}

0 comments on commit cc6950b

Please sign in to comment.