#include "hw/acpi/aml-build.h"
#include "qemu/bswap.h"
-GArray *build_alloc_array(void)
+static GArray *build_alloc_array(void)
{
return g_array_new(false, true /* clear */, 1);
}
-void build_free_array(GArray *array)
+static void build_free_array(GArray *array)
{
g_array_free(array, true);
}
-void build_prepend_byte(GArray *array, uint8_t val)
+static void build_prepend_byte(GArray *array, uint8_t val)
{
g_array_prepend_val(array, val);
}
-void build_append_byte(GArray *array, uint8_t val)
+static void build_append_byte(GArray *array, uint8_t val)
{
g_array_append_val(array, val);
}
-void build_append_array(GArray *array, GArray *val)
+static void build_append_array(GArray *array, GArray *val)
{
g_array_append_vals(array, val->data, val->len);
}
g_strfreev(segs);
}
-void build_append_namestring(GArray *array, const char *format, ...)
+static void build_append_namestring(GArray *array, const char *format, ...)
{
va_list ap;
PACKAGE_LENGTH_4BYTE_SHIFT = 20,
};
-void
+static void
build_prepend_package_length(GArray *package, unsigned length, bool incl_self)
{
uint8_t byte;
build_free_array(tmp);
}
-void build_package(GArray *package, uint8_t op)
+static void build_package(GArray *package, uint8_t op)
{
build_prepend_package_length(package, package->len, true);
build_prepend_byte(package, op);
}
-void build_extop_package(GArray *package, uint8_t op)
+static void build_extop_package(GArray *package, uint8_t op)
{
build_package(package, op);
build_prepend_byte(package, 0x5B); /* ExtOpPrefix */
}
}
-void build_append_int(GArray *table, uint64_t value)
+static void build_append_int(GArray *table, uint64_t value)
{
if (value == 0x00) {
build_append_byte(table, 0x00); /* ZeroOp */
Aml *aml_field(const char *name, AmlFieldFlags flags);
Aml *aml_varpackage(uint32_t num_elements);
-/* other helpers */
-GArray *build_alloc_array(void);
-void build_free_array(GArray *array);
-void build_prepend_byte(GArray *array, uint8_t val);
-void build_append_byte(GArray *array, uint8_t val);
-void build_append_array(GArray *array, GArray *val);
-
-void GCC_FMT_ATTR(2, 3)
-build_append_namestring(GArray *array, const char *format, ...);
-
-void
-build_prepend_package_length(GArray *package, unsigned length, bool incl_self);
-void build_package(GArray *package, uint8_t op);
-void build_append_int(GArray *table, uint64_t value);
-void build_extop_package(GArray *package, uint8_t op);
-
#endif