Skip to content

Commit

Permalink
sysroot: Reword comment and use gboolean over bool
Browse files Browse the repository at this point in the history
Be more explicit in the comment and use gboolean over bool. Less header
inclusions when we use gboolean. Although bool is used in some places.

Co-authored-by: Jonathan Lebon <jonathan@jlebon.com>
Signed-off-by: Eric Curtin <ecurtin@redhat.com>
  • Loading branch information
ericcurtin and jlebon committed Feb 22, 2024
1 parent e790e79 commit 1c0943c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/libostree/ostree-impl-system-generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,9 @@ _ostree_impl_system_generator (const char *normal_dir, const char *early_dir, co

g_autoptr (GError) otcore_get_ostree_target_error = NULL;
g_autofree char *ostree_target = NULL;
bool is_aboot = false;
/* This could happen in CoreOS live environments, where we hackily mock
gboolean is_aboot = false;
/* If no `ostree=` karg exists, gracefully no-op.
* This could happen in CoreOS live environments, where we hackily mock
* the `ostree=` karg for `ostree-prepare-root.service` specifically, but
* otherwise that karg doesn't exist on the real command-line. */
if (!otcore_get_ostree_target (cmdline, &is_aboot, &ostree_target,
Expand Down
4 changes: 1 addition & 3 deletions src/libostree/ostree-sysroot-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

#pragma once

#include <stdbool.h>

#include "libglnx.h"
#include "ostree-bootloader.h"
#include "ostree.h"
Expand Down Expand Up @@ -179,7 +177,7 @@ gboolean _ostree_sysroot_parse_bootdir_name (const char *name, char **out_osname
gboolean _ostree_sysroot_list_all_boot_directories (OstreeSysroot *self, char ***out_bootdirs,
GCancellable *cancellable, GError **error);

gboolean _ostree_sysroot_parse_bootlink (const char *bootlink, const bool is_aboot,
gboolean _ostree_sysroot_parse_bootlink (const char *bootlink, const gboolean is_aboot,
int *out_entry_bootversion, char **out_osname,
char **out_bootcsum, int *out_treebootserial,
GError **error);
Expand Down
2 changes: 1 addition & 1 deletion src/libostree/ostree-sysroot.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ load_origin (OstreeSysroot *self, OstreeDeployment *deployment, GCancellable *ca

// Parse the kernel argument ostree=
gboolean
_ostree_sysroot_parse_bootlink (const char *bootlink, const bool is_aboot,
_ostree_sysroot_parse_bootlink (const char *bootlink, const gboolean is_aboot,
int *out_entry_bootversion, char **out_osname, char **out_bootcsum,
int *out_treebootserial, GError **error)
{
Expand Down

0 comments on commit 1c0943c

Please sign in to comment.