summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index 943be6f09..df00ea213 100644
--- a/file.c
+++ b/file.c
@@ -22,7 +22,7 @@ static int readfile(const char *filename, struct memblock *mem)
mem->buffer = NULL;
mem->size = 0;
- fd = open(filename, O_RDONLY | O_BINARY);
+ fd = g_open(filename, O_RDONLY | O_BINARY, 0);
if (fd < 0)
return fd;
ret = fstat(fd, &st);
@@ -257,7 +257,7 @@ void parse_file(const char *filename, GError **error)
if (default_filename && ! strcmp(filename, default_filename))
return;
- fprintf(stderr, "Failed to read '%s'.\n", filename);
+ g_warning("Failed to read '%s'.\n", filename);
if (error) {
*error = g_error_new(g_quark_from_string("subsurface"),
DIVE_ERROR_PARSE,