void _rpmostree_set_prefix_error_from_errno (GError **error, gint errsv, const char *format, ...) { gs_free char *formatted = NULL; va_list args; va_start (args, format); formatted = g_strdup_vprintf (format, args); va_end (args); _rpmostree_set_error_from_errno (error, errsv); g_prefix_error (error, "%s", formatted); errno = errsv; }
static gboolean run_sync_in_root (GFile *yumroot, const char *binpath, char **child_argv, GError **error) { gboolean ret = FALSE; const char *yumroot_path = gs_file_get_path_cached (yumroot); pid_t child = glnx_libcontainer_run_chroot_private (yumroot_path, binpath, child_argv); if (child == -1) { _rpmostree_set_error_from_errno (error, errno); goto out; } if (!_rpmostree_sync_wait_on_pid (child, error)) goto out; ret = TRUE; out: return ret; }