[ostree: 7/7] libostree: Make OstreeBootloader private
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree: 7/7] libostree: Make OstreeBootloader private
- Date: Mon, 16 Sep 2013 00:27:38 +0000 (UTC)
commit ac0154713dade0d7755cc9d841023273dbe9119d
Author: Colin Walters <walters verbum org>
Date: Sun Sep 15 20:26:13 2013 -0400
libostree: Make OstreeBootloader private
It was only temporarily public while functionality was being merged
down; that's done now.
Makefile-libostree-defines.am | 1 -
Makefile-libostree.am | 1 +
src/libostree/ostree-bootloader-syslinux.c | 32 ++++++++++++++--------------
src/libostree/ostree-bootloader-syslinux.h | 6 ++--
src/libostree/ostree-bootloader-uboot.c | 32 ++++++++++++++--------------
src/libostree/ostree-bootloader-uboot.h | 6 ++--
src/libostree/ostree-bootloader.c | 12 +++++-----
src/libostree/ostree-bootloader.h | 16 +++++++-------
src/libostree/ostree-sysroot-deploy.c | 8 +++---
src/libostree/ostree-sysroot-private.h | 2 +
src/libostree/ostree-sysroot.c | 10 ++++----
src/libostree/ostree-sysroot.h | 2 -
12 files changed, 64 insertions(+), 64 deletions(-)
---
diff --git a/Makefile-libostree-defines.am b/Makefile-libostree-defines.am
index da4507f..4be0eec 100644
--- a/Makefile-libostree-defines.am
+++ b/Makefile-libostree-defines.am
@@ -27,7 +27,6 @@ libostree_public_headers = \
src/libostree/ostree-repo-file.h \
src/libostree/ostree-diff.h \
src/libostree/ostree-sysroot.h \
- src/libostree/ostree-bootloader.h \
src/libostree/ostree-deployment.h \
src/libostree/ostree-bootconfig-parser.h \
$(NULL)
diff --git a/Makefile-libostree.am b/Makefile-libostree.am
index d9ee1f1..7925a26 100644
--- a/Makefile-libostree.am
+++ b/Makefile-libostree.am
@@ -49,6 +49,7 @@ libostree_1_la_SOURCES = \
src/libostree/ostree-sysroot-deploy.c \
src/libostree/ostree-bootconfig-parser.c \
src/libostree/ostree-deployment.c \
+ src/libostree/ostree-bootloader.h \
src/libostree/ostree-bootloader.c \
src/libostree/ostree-bootloader-syslinux.h \
src/libostree/ostree-bootloader-syslinux.c \
diff --git a/src/libostree/ostree-bootloader-syslinux.c b/src/libostree/ostree-bootloader-syslinux.c
index 9c6b221..de9983b 100644
--- a/src/libostree/ostree-bootloader-syslinux.c
+++ b/src/libostree/ostree-bootloader-syslinux.c
@@ -37,12 +37,12 @@ struct _OstreeBootloaderSyslinux
typedef GObjectClass OstreeBootloaderSyslinuxClass;
-static void ostree_bootloader_syslinux_bootloader_iface_init (OstreeBootloaderInterface *iface);
-G_DEFINE_TYPE_WITH_CODE (OstreeBootloaderSyslinux, ostree_bootloader_syslinux, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (OSTREE_TYPE_BOOTLOADER,
ostree_bootloader_syslinux_bootloader_iface_init));
+static void _ostree_bootloader_syslinux_bootloader_iface_init (OstreeBootloaderInterface *iface);
+G_DEFINE_TYPE_WITH_CODE (OstreeBootloaderSyslinux, _ostree_bootloader_syslinux, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (OSTREE_TYPE_BOOTLOADER,
_ostree_bootloader_syslinux_bootloader_iface_init));
static gboolean
-ostree_bootloader_syslinux_query (OstreeBootloader *bootloader)
+_ostree_bootloader_syslinux_query (OstreeBootloader *bootloader)
{
OstreeBootloaderSyslinux *self = OSTREE_BOOTLOADER_SYSLINUX (bootloader);
@@ -50,7 +50,7 @@ ostree_bootloader_syslinux_query (OstreeBootloader *bootloader)
}
static const char *
-ostree_bootloader_syslinux_get_name (OstreeBootloader *bootloader)
+_ostree_bootloader_syslinux_get_name (OstreeBootloader *bootloader)
{
return "syslinux";
}
@@ -111,7 +111,7 @@ append_config_from_boostree_loader_entries (OstreeBootloaderSyslinux *self,
}
static gboolean
-ostree_bootloader_syslinux_write_config (OstreeBootloader *bootloader,
+_ostree_bootloader_syslinux_write_config (OstreeBootloader *bootloader,
int bootversion,
GCancellable *cancellable,
GError **error)
@@ -254,39 +254,39 @@ ostree_bootloader_syslinux_write_config (OstreeBootloader *bootloader,
}
static void
-ostree_bootloader_syslinux_finalize (GObject *object)
+_ostree_bootloader_syslinux_finalize (GObject *object)
{
OstreeBootloaderSyslinux *self = OSTREE_BOOTLOADER_SYSLINUX (object);
g_clear_object (&self->sysroot);
g_clear_object (&self->config_path);
- G_OBJECT_CLASS (ostree_bootloader_syslinux_parent_class)->finalize (object);
+ G_OBJECT_CLASS (_ostree_bootloader_syslinux_parent_class)->finalize (object);
}
void
-ostree_bootloader_syslinux_init (OstreeBootloaderSyslinux *self)
+_ostree_bootloader_syslinux_init (OstreeBootloaderSyslinux *self)
{
}
static void
-ostree_bootloader_syslinux_bootloader_iface_init (OstreeBootloaderInterface *iface)
+_ostree_bootloader_syslinux_bootloader_iface_init (OstreeBootloaderInterface *iface)
{
- iface->query = ostree_bootloader_syslinux_query;
- iface->get_name = ostree_bootloader_syslinux_get_name;
- iface->write_config = ostree_bootloader_syslinux_write_config;
+ iface->query = _ostree_bootloader_syslinux_query;
+ iface->get_name = _ostree_bootloader_syslinux_get_name;
+ iface->write_config = _ostree_bootloader_syslinux_write_config;
}
void
-ostree_bootloader_syslinux_class_init (OstreeBootloaderSyslinuxClass *class)
+_ostree_bootloader_syslinux_class_init (OstreeBootloaderSyslinuxClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
- object_class->finalize = ostree_bootloader_syslinux_finalize;
+ object_class->finalize = _ostree_bootloader_syslinux_finalize;
}
OstreeBootloaderSyslinux *
-ostree_bootloader_syslinux_new (OstreeSysroot *sysroot)
+_ostree_bootloader_syslinux_new (OstreeSysroot *sysroot)
{
OstreeBootloaderSyslinux *self = g_object_new (OSTREE_TYPE_BOOTLOADER_SYSLINUX, NULL);
self->sysroot = g_object_ref (sysroot);
diff --git a/src/libostree/ostree-bootloader-syslinux.h b/src/libostree/ostree-bootloader-syslinux.h
index 7f44816..1023bbe 100644
--- a/src/libostree/ostree-bootloader-syslinux.h
+++ b/src/libostree/ostree-bootloader-syslinux.h
@@ -24,15 +24,15 @@
G_BEGIN_DECLS
-#define OSTREE_TYPE_BOOTLOADER_SYSLINUX (ostree_bootloader_syslinux_get_type ())
+#define OSTREE_TYPE_BOOTLOADER_SYSLINUX (_ostree_bootloader_syslinux_get_type ())
#define OSTREE_BOOTLOADER_SYSLINUX(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst),
OSTREE_TYPE_BOOTLOADER_SYSLINUX, OstreeBootloaderSyslinux))
#define OSTREE_IS_BOOTLOADER_SYSLINUX(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst),
OSTREE_TYPE_BOOTLOADER_SYSLINUX))
typedef struct _OstreeBootloaderSyslinux OstreeBootloaderSyslinux;
-GType ostree_bootloader_syslinux_get_type (void) G_GNUC_CONST;
+GType _ostree_bootloader_syslinux_get_type (void) G_GNUC_CONST;
-OstreeBootloaderSyslinux * ostree_bootloader_syslinux_new (OstreeSysroot *sysroot);
+OstreeBootloaderSyslinux * _ostree_bootloader_syslinux_new (OstreeSysroot *sysroot);
G_END_DECLS
diff --git a/src/libostree/ostree-bootloader-uboot.c b/src/libostree/ostree-bootloader-uboot.c
index 5d711ef..2eb4eb6 100644
--- a/src/libostree/ostree-bootloader-uboot.c
+++ b/src/libostree/ostree-bootloader-uboot.c
@@ -41,12 +41,12 @@ struct _OstreeBootloaderUboot
typedef GObjectClass OstreeBootloaderUbootClass;
-static void ostree_bootloader_uboot_bootloader_iface_init (OstreeBootloaderInterface *iface);
-G_DEFINE_TYPE_WITH_CODE (OstreeBootloaderUboot, ostree_bootloader_uboot, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (OSTREE_TYPE_BOOTLOADER,
ostree_bootloader_uboot_bootloader_iface_init));
+static void _ostree_bootloader_uboot_bootloader_iface_init (OstreeBootloaderInterface *iface);
+G_DEFINE_TYPE_WITH_CODE (OstreeBootloaderUboot, _ostree_bootloader_uboot, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (OSTREE_TYPE_BOOTLOADER,
_ostree_bootloader_uboot_bootloader_iface_init));
static gboolean
-ostree_bootloader_uboot_query (OstreeBootloader *bootloader)
+_ostree_bootloader_uboot_query (OstreeBootloader *bootloader)
{
OstreeBootloaderUboot *self = OSTREE_BOOTLOADER_UBOOT (bootloader);
@@ -54,7 +54,7 @@ ostree_bootloader_uboot_query (OstreeBootloader *bootloader)
}
static const char *
-ostree_bootloader_uboot_get_name (OstreeBootloader *bootloader)
+_ostree_bootloader_uboot_get_name (OstreeBootloader *bootloader)
{
return "U-Boot";
}
@@ -98,7 +98,7 @@ create_config_from_boot_loader_entries (OstreeBootloaderUboot *self,
}
static gboolean
-ostree_bootloader_uboot_write_config (OstreeBootloader *bootloader,
+_ostree_bootloader_uboot_write_config (OstreeBootloader *bootloader,
int bootversion,
GCancellable *cancellable,
GError **error)
@@ -139,39 +139,39 @@ ostree_bootloader_uboot_write_config (OstreeBootloader *bootloader,
}
static void
-ostree_bootloader_uboot_finalize (GObject *object)
+_ostree_bootloader_uboot_finalize (GObject *object)
{
OstreeBootloaderUboot *self = OSTREE_BOOTLOADER_UBOOT (object);
g_clear_object (&self->sysroot);
g_clear_object (&self->config_path);
- G_OBJECT_CLASS (ostree_bootloader_uboot_parent_class)->finalize (object);
+ G_OBJECT_CLASS (_ostree_bootloader_uboot_parent_class)->finalize (object);
}
void
-ostree_bootloader_uboot_init (OstreeBootloaderUboot *self)
+_ostree_bootloader_uboot_init (OstreeBootloaderUboot *self)
{
}
static void
-ostree_bootloader_uboot_bootloader_iface_init (OstreeBootloaderInterface *iface)
+_ostree_bootloader_uboot_bootloader_iface_init (OstreeBootloaderInterface *iface)
{
- iface->query = ostree_bootloader_uboot_query;
- iface->get_name = ostree_bootloader_uboot_get_name;
- iface->write_config = ostree_bootloader_uboot_write_config;
+ iface->query = _ostree_bootloader_uboot_query;
+ iface->get_name = _ostree_bootloader_uboot_get_name;
+ iface->write_config = _ostree_bootloader_uboot_write_config;
}
void
-ostree_bootloader_uboot_class_init (OstreeBootloaderUbootClass *class)
+_ostree_bootloader_uboot_class_init (OstreeBootloaderUbootClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
- object_class->finalize = ostree_bootloader_uboot_finalize;
+ object_class->finalize = _ostree_bootloader_uboot_finalize;
}
OstreeBootloaderUboot *
-ostree_bootloader_uboot_new (OstreeSysroot *sysroot)
+_ostree_bootloader_uboot_new (OstreeSysroot *sysroot)
{
OstreeBootloaderUboot *self = g_object_new (OSTREE_TYPE_BOOTLOADER_UBOOT, NULL);
self->sysroot = g_object_ref (sysroot);
diff --git a/src/libostree/ostree-bootloader-uboot.h b/src/libostree/ostree-bootloader-uboot.h
index 4b19608..da81189 100644
--- a/src/libostree/ostree-bootloader-uboot.h
+++ b/src/libostree/ostree-bootloader-uboot.h
@@ -28,14 +28,14 @@
G_BEGIN_DECLS
-#define OSTREE_TYPE_BOOTLOADER_UBOOT (ostree_bootloader_uboot_get_type ())
+#define OSTREE_TYPE_BOOTLOADER_UBOOT (_ostree_bootloader_uboot_get_type ())
#define OSTREE_BOOTLOADER_UBOOT(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), OSTREE_TYPE_BOOTLOADER_UBOOT,
OstreeBootloaderUboot))
#define OSTREE_IS_BOOTLOADER_UBOOT(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), OSTREE_TYPE_BOOTLOADER_UBOOT))
typedef struct _OstreeBootloaderUboot OstreeBootloaderUboot;
-GType ostree_bootloader_uboot_get_type (void) G_GNUC_CONST;
+GType _ostree_bootloader_uboot_get_type (void) G_GNUC_CONST;
-OstreeBootloaderUboot * ostree_bootloader_uboot_new (OstreeSysroot *sysroot);
+OstreeBootloaderUboot * _ostree_bootloader_uboot_new (OstreeSysroot *sysroot);
G_END_DECLS
diff --git a/src/libostree/ostree-bootloader.c b/src/libostree/ostree-bootloader.c
index 2438013..5cb7c5e 100644
--- a/src/libostree/ostree-bootloader.c
+++ b/src/libostree/ostree-bootloader.c
@@ -22,15 +22,15 @@
#include "ostree-bootloader.h"
#include "libgsystem.h"
-G_DEFINE_INTERFACE (OstreeBootloader, ostree_bootloader, G_TYPE_OBJECT)
+G_DEFINE_INTERFACE (OstreeBootloader, _ostree_bootloader, G_TYPE_OBJECT)
static void
-ostree_bootloader_default_init (OstreeBootloaderInterface *iface)
+_ostree_bootloader_default_init (OstreeBootloaderInterface *iface)
{
}
gboolean
-ostree_bootloader_query (OstreeBootloader *self)
+_ostree_bootloader_query (OstreeBootloader *self)
{
g_return_val_if_fail (OSTREE_IS_BOOTLOADER (self), FALSE);
@@ -38,12 +38,12 @@ ostree_bootloader_query (OstreeBootloader *self)
}
/**
- * ostree_bootloader_get_name:
+ * _ostree_bootloader_get_name:
*
* Returns: (transfer none): Name of this bootloader
*/
const char *
-ostree_bootloader_get_name (OstreeBootloader *self)
+_ostree_bootloader_get_name (OstreeBootloader *self)
{
g_return_val_if_fail (OSTREE_IS_BOOTLOADER (self), NULL);
@@ -51,7 +51,7 @@ ostree_bootloader_get_name (OstreeBootloader *self)
}
gboolean
-ostree_bootloader_write_config (OstreeBootloader *self,
+_ostree_bootloader_write_config (OstreeBootloader *self,
int bootversion,
GCancellable *cancellable,
GError **error)
diff --git a/src/libostree/ostree-bootloader.h b/src/libostree/ostree-bootloader.h
index 6784409..0d07fdb 100644
--- a/src/libostree/ostree-bootloader.h
+++ b/src/libostree/ostree-bootloader.h
@@ -24,7 +24,7 @@
G_BEGIN_DECLS
-#define OSTREE_TYPE_BOOTLOADER (ostree_bootloader_get_type ())
+#define OSTREE_TYPE_BOOTLOADER (_ostree_bootloader_get_type ())
#define OSTREE_BOOTLOADER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), OSTREE_TYPE_BOOTLOADER,
OstreeBootloader))
#define OSTREE_IS_BOOTLOADER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), OSTREE_TYPE_BOOTLOADER))
#define OSTREE_BOOTLOADER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), OSTREE_TYPE_BOOTLOADER,
OstreeBootloaderInterface))
@@ -45,16 +45,16 @@ struct _OstreeBootloaderInterface
GError **error);
};
-GType ostree_bootloader_get_type (void) G_GNUC_CONST;
+GType _ostree_bootloader_get_type (void) G_GNUC_CONST;
-gboolean ostree_bootloader_query (OstreeBootloader *self);
+gboolean _ostree_bootloader_query (OstreeBootloader *self);
-const char *ostree_bootloader_get_name (OstreeBootloader *self);
+const char *_ostree_bootloader_get_name (OstreeBootloader *self);
-gboolean ostree_bootloader_write_config (OstreeBootloader *self,
- int bootversion,
- GCancellable *cancellable,
- GError **error);
+gboolean _ostree_bootloader_write_config (OstreeBootloader *self,
+ int bootversion,
+ GCancellable *cancellable,
+ GError **error);
G_END_DECLS
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c
index 2b3e853..38e182c 100644
--- a/src/libostree/ostree-sysroot-deploy.c
+++ b/src/libostree/ostree-sysroot-deploy.c
@@ -992,10 +992,10 @@ ostree_sysroot_write_deployments (OstreeSysroot *sysroot,
{
gboolean ret = FALSE;
guint i;
- gs_unref_object OstreeBootloader *bootloader = ostree_sysroot_query_bootloader (sysroot);
+ gs_unref_object OstreeBootloader *bootloader = _ostree_sysroot_query_bootloader (sysroot);
if (bootloader)
- g_print ("Detected bootloader: %s\n", ostree_bootloader_get_name (bootloader));
+ g_print ("Detected bootloader: %s\n", _ostree_bootloader_get_name (bootloader));
else
g_print ("Detected bootloader: (unknown)\n");
@@ -1043,8 +1043,8 @@ ostree_sysroot_write_deployments (OstreeSysroot *sysroot,
goto out;
}
- if (bootloader && !ostree_bootloader_write_config (bootloader, new_bootversion,
- cancellable, error))
+ if (bootloader && !_ostree_bootloader_write_config (bootloader, new_bootversion,
+ cancellable, error))
{
g_prefix_error (error, "Bootloader write config: ");
goto out;
diff --git a/src/libostree/ostree-sysroot-private.h b/src/libostree/ostree-sysroot-private.h
index f8b6d10..f51b2bb 100644
--- a/src/libostree/ostree-sysroot-private.h
+++ b/src/libostree/ostree-sysroot-private.h
@@ -60,5 +60,7 @@ OstreeOrderedHash *_ostree_sysroot_parse_kernel_args (const char *options);
char * _ostree_sysroot_kernel_arg_string_serialize (OstreeOrderedHash *ohash);
+OstreeBootloader *_ostree_sysroot_query_bootloader (OstreeSysroot *sysroot);
+
G_END_DECLS
diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c
index 464a42d..20b266d 100644
--- a/src/libostree/ostree-sysroot.c
+++ b/src/libostree/ostree-sysroot.c
@@ -800,17 +800,17 @@ ostree_sysroot_get_repo (OstreeSysroot *self,
* Returns: (transfer full): Currently active bootloader in @sysroot
*/
OstreeBootloader *
-ostree_sysroot_query_bootloader (OstreeSysroot *self)
+_ostree_sysroot_query_bootloader (OstreeSysroot *self)
{
OstreeBootloaderSyslinux *syslinux;
OstreeBootloaderUboot *uboot;
- syslinux = ostree_bootloader_syslinux_new (self);
- if (ostree_bootloader_query ((OstreeBootloader*)syslinux))
+ syslinux = _ostree_bootloader_syslinux_new (self);
+ if (_ostree_bootloader_query ((OstreeBootloader*)syslinux))
return (OstreeBootloader*) (syslinux);
- uboot = ostree_bootloader_uboot_new (self);
- if (ostree_bootloader_query ((OstreeBootloader*)uboot))
+ uboot = _ostree_bootloader_uboot_new (self);
+ if (_ostree_bootloader_query ((OstreeBootloader*)uboot))
return (OstreeBootloader*) (uboot);
return NULL;
diff --git a/src/libostree/ostree-sysroot.h b/src/libostree/ostree-sysroot.h
index 2227a63..09db378 100644
--- a/src/libostree/ostree-sysroot.h
+++ b/src/libostree/ostree-sysroot.h
@@ -70,8 +70,6 @@ gboolean ostree_sysroot_get_repo (OstreeSysroot *self,
GCancellable *cancellable,
GError **error);
-OstreeBootloader *ostree_sysroot_query_bootloader (OstreeSysroot *sysroot);
-
gboolean ostree_sysroot_find_booted_deployment (OstreeSysroot *sysroot,
GPtrArray *deployments,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]