| 46 | } |
| 47 | |
| 48 | static bool activation_test_read(const char *path, char out[ACTIVATION_TEST_CONTENT_CAP]) { |
| 49 | FILE *file = cbm_fopen(path, "rb"); |
| 50 | if (!file) { |
| 51 | return false; |
| 52 | } |
| 53 | size_t used = fread(out, 1, ACTIVATION_TEST_CONTENT_CAP - 1, file); |
| 54 | bool complete = !ferror(file) && feof(file); |
| 55 | out[used] = '\0'; |
| 56 | return fclose(file) == 0 && complete; |
| 57 | } |
| 58 | |
| 59 | static bool activation_test_write(const char *path, const char *contents) { |
| 60 | FILE *file = cbm_fopen(path, "wb"); |
no test coverage detected