[ostree] core: Use g_io_error_from_errno() to ensure we have more useful error codes



commit c7235182a471bc33cdc45eafb135aece981d504e
Author: Colin Walters <walters verbum org>
Date:   Fri Dec 2 11:39:21 2011 -0500

    core: Use g_io_error_from_errno() to ensure we have more useful error codes

 src/libotutil/ot-unix-utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libotutil/ot-unix-utils.c b/src/libotutil/ot-unix-utils.c
index 2a2697f..7b709ff 100644
--- a/src/libotutil/ot-unix-utils.c
+++ b/src/libotutil/ot-unix-utils.c
@@ -233,7 +233,7 @@ ot_util_set_error_from_errno (GError **error,
 {
   g_set_error_literal (error,
                        G_IO_ERROR,
-                       0,
+                       g_io_error_from_errno (saved_errno),
                        g_strerror (saved_errno));
   errno = saved_errno;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]