int c, ret, bit, v;
uint32_t imm = 0x3f6df2ab;
- f = fopen(filename, "rb");
+ f = g_fopen(filename, "rb");
if (!f) {
- g_warning("fopen(\"%s\", \"rb\")", filename);
+ g_warning("g_fopen(\"%s\", \"rb\")", filename);
return -1;
}
unsigned char buf[4096];
g_message("Uploading firmware at %s", filename);
- if ((fw = fopen(filename, "rb")) == NULL) {
+ if ((fw = g_fopen(filename, "rb")) == NULL) {
g_warning("Unable to open firmware file %s for reading: %s",
filename, strerror(errno));
return 1;
if ((tmpfile = g_mkstemp(metafile)) == -1)
return SR_ERR;
close(tmpfile);
- meta = fopen(metafile, "wb");
+ meta = g_fopen(metafile, "wb");
fprintf(meta, "[global]\n");
fprintf(meta, "sigrok version = %s\n", PACKAGE_VERSION);
/* TODO: save protocol decoders used */