[ostree] ostadmin: Use g_spawn_check_exit_status()
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] ostadmin: Use g_spawn_check_exit_status()
- Date: Sun, 5 Aug 2012 20:40:49 +0000 (UTC)
commit 36b6ad41cb709a87428b326abb71b570ab5cc177
Author: Colin Walters <walters verbum org>
Date: Fri Aug 3 08:49:22 2012 -0400
ostadmin: Use g_spawn_check_exit_status()
Just code cleanup.
src/libostree/ostree-sysroot.c | 17 ++---------------
1 files changed, 2 insertions(+), 15 deletions(-)
---
diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c
index cd1d686..188e4be 100644
--- a/src/libostree/ostree-sysroot.c
+++ b/src/libostree/ostree-sysroot.c
@@ -95,21 +95,8 @@ ostree_run_triggers_in_root (GFile *root,
NULL, NULL, NULL, NULL, &estatus, error))
goto out;
- if (WIFEXITED (estatus))
- {
- if (WEXITSTATUS (estatus) != 0)
- {
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- "Trigger process exited with code %d", (int)WEXITSTATUS (estatus));
- goto out;
- }
- }
- else
- {
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- "Trigger process failed due to signal");
- goto out;
- }
+ if (!g_spawn_check_exit_status (estatus, error))
+ goto out;
}
ret = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]