summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2018-08-13 14:27:46 +0100
committerPhilip Withnall <withnall@endlessm.com>2018-08-13 14:34:19 +0100
commit57962aac85a41f554e14da14906a3ba0bd8f9156 (patch)
treeda0887918cd9878dc81b389e148459419f7e425b
parentd2f0461ec0e548ab659d247599846d16741a1e5d (diff)
downloadgvdb-57962aac85a41f554e14da14906a3ba0bd8f9156.tar.gz
docs: Clarify error values for empty files when loading
Signed-off-by: Philip Withnall <withnall@endlessm.com>
-rw-r--r--gvdb-reader.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gvdb-reader.c b/gvdb-reader.c
index 1ec6633..aa3154f 100644
--- a/gvdb-reader.c
+++ b/gvdb-reader.c
@@ -128,7 +128,8 @@ gvdb_table_setup_root (GvdbTable *file,
*
* Creates a new #GvdbTable from the contents of @bytes.
*
- * This call can fail if the header contained in @bytes is invalid.
+ * This call can fail if the header contained in @bytes is invalid or if @bytes
+ * is empty; if so, %G_FILE_ERROR_INVAL will be returned.
*
* You should call gvdb_table_free() on the return result when you no
* longer require it.
@@ -189,6 +190,12 @@ invalid:
* Creates a new #GvdbTable using the #GMappedFile for @filename as the
* #GBytes.
*
+ * This function will fail if the file cannot be opened.
+ * In that case, the #GError that is returned will be an error from
+ * g_mapped_file_new().
+ *
+ * An empty or corrupt file will result in %G_FILE_ERROR_INVAL.
+ *
* Returns: a new #GvdbTable
**/
GvdbTable *