Module Name: othersrc
Committed By: agc
Date: Thu Oct 13 16:00:48 UTC 2011
Modified Files:
othersrc/external/bsd/circa/dist: circa.c
Log Message:
treat a sector size of 0 during circa initialisation as being the default
CIRCA_SECTOR_SIZE
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/circa/dist/circa.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/external/bsd/circa/dist/circa.c
diff -u othersrc/external/bsd/circa/dist/circa.c:1.4 othersrc/external/bsd/circa/dist/circa.c:1.5
--- othersrc/external/bsd/circa/dist/circa.c:1.4 Wed Aug 3 05:52:19 2011
+++ othersrc/external/bsd/circa/dist/circa.c Thu Oct 13 16:00:48 2011
@@ -96,8 +96,10 @@ circa_init(circa_t *circa, size_t sector
(void) memset(&circa->c2, 0x0, sizeof(circa->c2));
rs_init(&circa->c2, RS_DEFAULT_POLYNOMIAL, C3_FRAME_SIZE, Q_PARITY_SIZE);
rs_init(&circa->c1, RS_DEFAULT_POLYNOMIAL, C2_FRAME_SIZE, P_PARITY_SIZE);
- if ((circa->header.sectorsize = (uint32_t)sectorsize) == 0 ||
- sectorsize % C1_FRAME_SIZE != 0) {
+ if ((circa->header.sectorsize = (uint32_t)sectorsize) == 0) {
+ circa->header.sectorsize = CIRCA_SECTOR_SIZE;
+ }
+ if (circa->header.sectorsize % C1_FRAME_SIZE != 0) {
(void) fprintf(stderr, "Bad sector size %zu\n", sectorsize);
return 0;
}