- if (!g_file_test(filename, G_FILE_TEST_EXISTS)) {
- sr_err("%s: input file '%s' does not exist",
- __func__, filename);
- // return SR_ERR; /* FIXME */
- return FALSE;
- }
-
- if (!g_file_test(filename, G_FILE_TEST_IS_REGULAR)) {
- sr_err("%s: input file '%s' not a regular file",
- __func__, filename);
- // return SR_ERR; /* FIXME */
- return FALSE;
- }
-
- /* Only accept files of length 8MB + 5 bytes. */
- ret = stat(filename, &stat_buf);
- if (ret != 0) {
- sr_err("%s: Error getting file size of '%s'",
- __func__, filename);
- return FALSE;
- }
- if (stat_buf.st_size != (8 * 1024 * 1024 + 5)) {
- sr_dbg("%s: File size must be exactly 8388613 bytes ("
- "it actually is %d bytes in size), so this is not a "
- "ChronoVu LA8 file.", __func__, stat_buf.st_size);
- return FALSE;
- }
-
- /* TODO: Check for divcount != 0xff. */
-
- return TRUE;