mbpi: Improve mbpi_lookup() error reporting

This commit is contained in:
Oleg Zhurakivskyy 2011-10-05 16:18:28 +03:00 committed by Denis Kenzior
parent d02e0c42b6
commit 3501d76b94
1 changed files with 6 additions and 3 deletions

View File

@ -378,7 +378,8 @@ GSList *mbpi_lookup(const char *mcc, const char *mnc,
if (fd < 0) {
g_set_error(error, G_FILE_ERROR,
g_file_error_from_errno(errno),
"open failed: %s", g_strerror(errno));
"open(%s) failed: %s", MBPI_DATABASE,
g_strerror(errno));
return NULL;
}
@ -386,7 +387,8 @@ GSList *mbpi_lookup(const char *mcc, const char *mnc,
close(fd);
g_set_error(error, G_FILE_ERROR,
g_file_error_from_errno(errno),
"fstat failed: %s", g_strerror(errno));
"fstat(%s) failed: %s", MBPI_DATABASE,
g_strerror(errno));
return NULL;
}
@ -395,7 +397,8 @@ GSList *mbpi_lookup(const char *mcc, const char *mnc,
close(fd);
g_set_error(error, G_FILE_ERROR,
g_file_error_from_errno(errno),
"mmap failed: %s", g_strerror(errno));
"mmap(%s) failed: %s", MBPI_DATABASE,
g_strerror(errno));
return NULL;
}