From 165a0baa15843a1d96382ecdd75d4e632217645d Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 9 Jun 2021 15:53:32 +0100 Subject: [PATCH 1/2] gunixmounts: Document NULL return value for g_unix_mount_for() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It will return `NULL` if the path doesn’t exist. Signed-off-by: Philip Withnall --- gio/gunixmounts.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c index 819a44bed..3df3241ac 100644 --- a/gio/gunixmounts.c +++ b/gio/gunixmounts.c @@ -1636,6 +1636,9 @@ g_unix_mount_at (const char *mount_path, * If more mounts have the same mount path, the last matching mount * is returned. * + * This will return %NULL if looking up the mount entry fails, if + * @file_path doesn’t exist or there is an I/O error. + * * Returns: (transfer full) (nullable): a #GUnixMountEntry. * * Since: 2.52 From 0362bf5d64a4b1cb0b0ad0b49e230d4ba526cc69 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 9 Jun 2021 16:01:44 +0100 Subject: [PATCH 2/2] gunixmounts: Document when g_unix_mount_at() returns NULL Signed-off-by: Philip Withnall --- gio/gunixmounts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c index 3df3241ac..46a41fc41 100644 --- a/gio/gunixmounts.c +++ b/gio/gunixmounts.c @@ -1593,6 +1593,8 @@ g_unix_mounts_get (guint64 *time_read) * If more mounts have the same mount path, the last matching mount * is returned. * + * This will return %NULL if there is no mount point at @mount_path. + * * Returns: (transfer full) (nullable): a #GUnixMountEntry. **/ GUnixMountEntry *