Merge pull request #2539 from chergert/main
lib/bootloader: use ot_journal_print() instead of sd-journal
This commit is contained in:
commit
d61fdc7123
|
|
@ -21,7 +21,6 @@
|
||||||
#include "ostree-bootloader-zipl.h"
|
#include "ostree-bootloader-zipl.h"
|
||||||
#include "ostree-deployment-private.h"
|
#include "ostree-deployment-private.h"
|
||||||
#include "otutil.h"
|
#include "otutil.h"
|
||||||
#include <systemd/sd-journal.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define SECURE_EXECUTION_BOOT_IMAGE "/boot/sd-boot"
|
#define SECURE_EXECUTION_BOOT_IMAGE "/boot/sd-boot"
|
||||||
|
|
@ -177,7 +176,7 @@ _ostree_secure_execution_enable_luks(const gchar *oldramfs,
|
||||||
return glnx_prefix_error(error, "s390x SE: `%s` failed", SECURE_EXECUTION_RAMDISK_TOOL);
|
return glnx_prefix_error(error, "s390x SE: `%s` failed", SECURE_EXECUTION_RAMDISK_TOOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
sd_journal_print(LOG_INFO, "s390x SE: luks key added to initrd");
|
ot_journal_print(LOG_INFO, "s390x SE: luks key added to initrd");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -189,9 +188,9 @@ _ostree_secure_execution_generate_sdboot (gchar *vmlinuz,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
g_assert (vmlinuz && initramfs && options && keys && keys->len);
|
g_assert (vmlinuz && initramfs && options && keys && keys->len);
|
||||||
sd_journal_print(LOG_INFO, "s390x SE: kernel: %s", vmlinuz);
|
ot_journal_print(LOG_INFO, "s390x SE: kernel: %s", vmlinuz);
|
||||||
sd_journal_print(LOG_INFO, "s390x SE: initrd: %s", initramfs);
|
ot_journal_print(LOG_INFO, "s390x SE: initrd: %s", initramfs);
|
||||||
sd_journal_print(LOG_INFO, "s390x SE: kargs: %s", options);
|
ot_journal_print(LOG_INFO, "s390x SE: kargs: %s", options);
|
||||||
|
|
||||||
pid_t self = getpid();
|
pid_t self = getpid();
|
||||||
|
|
||||||
|
|
@ -228,7 +227,7 @@ _ostree_secure_execution_generate_sdboot (gchar *vmlinuz,
|
||||||
gchar *key = g_ptr_array_index (keys, i);
|
gchar *key = g_ptr_array_index (keys, i);
|
||||||
g_ptr_array_add (argv, "-k");
|
g_ptr_array_add (argv, "-k");
|
||||||
g_ptr_array_add (argv, key);
|
g_ptr_array_add (argv, key);
|
||||||
sd_journal_print(LOG_INFO, "s390x SE: key[%d]: %s", i + 1, key);
|
ot_journal_print(LOG_INFO, "s390x SE: key[%d]: %s", i + 1, key);
|
||||||
}
|
}
|
||||||
g_ptr_array_add (argv, "--no-verify");
|
g_ptr_array_add (argv, "--no-verify");
|
||||||
g_ptr_array_add (argv, "-o");
|
g_ptr_array_add (argv, "-o");
|
||||||
|
|
@ -243,7 +242,7 @@ _ostree_secure_execution_generate_sdboot (gchar *vmlinuz,
|
||||||
if (!g_spawn_check_exit_status (status, error))
|
if (!g_spawn_check_exit_status (status, error))
|
||||||
return glnx_prefix_error(error, "s390x SE: `genprotimg` failed");
|
return glnx_prefix_error(error, "s390x SE: `genprotimg` failed");
|
||||||
|
|
||||||
sd_journal_print(LOG_INFO, "s390x SE: `%s` generated", SECURE_EXECUTION_BOOT_IMAGE);
|
ot_journal_print(LOG_INFO, "s390x SE: `%s` generated", SECURE_EXECUTION_BOOT_IMAGE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -259,7 +258,7 @@ _ostree_secure_execution_call_zipl (GError **error)
|
||||||
if (!g_spawn_check_exit_status (status, error))
|
if (!g_spawn_check_exit_status (status, error))
|
||||||
return glnx_prefix_error(error, "s390x SE: `zipl` failed");
|
return glnx_prefix_error(error, "s390x SE: `zipl` failed");
|
||||||
|
|
||||||
sd_journal_print(LOG_INFO, "s390x SE: `sd-boot` zipled");
|
ot_journal_print(LOG_INFO, "s390x SE: `sd-boot` zipled");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,13 @@
|
||||||
|
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#include <string.h> /* Yeah...let's just do that here. */
|
#include <string.h> /* Yeah...let's just do that here. */
|
||||||
|
#include <syslog.h>
|
||||||
#include <libglnx.h>
|
#include <libglnx.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBSYSTEMD
|
||||||
|
#include <systemd/sd-journal.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* https://bugzilla.gnome.org/show_bug.cgi?id=766370 */
|
/* https://bugzilla.gnome.org/show_bug.cgi?id=766370 */
|
||||||
#if !GLIB_CHECK_VERSION(2, 49, 3)
|
#if !GLIB_CHECK_VERSION(2, 49, 3)
|
||||||
#define OT_VARIANT_BUILDER_INITIALIZER {{0,}}
|
#define OT_VARIANT_BUILDER_INITIALIZER {{0,}}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue