summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stormont <andyjstormont@googlemail.com>2011-06-13 16:43:42 +0100
committerAndrew Stormont <andyjstormont@googlemail.com>2011-06-13 16:43:42 +0100
commit129889506ced510e5184f2a465fdf9a76363a9dd (patch)
tree1b7f82abe3c2ac388e8311a47c4c247bfa9e5c5d
parent5c24b5fb1e655681493fec334df26c3ed2293eb1 (diff)
downloadhal-129889506ced510e5184f2a465fdf9a76363a9dd.tar.gz
Fix build with new solaris files
-rw-r--r--configure.in5
-rw-r--r--hald/cache_test.c4
-rw-r--r--hald/create_cache.c6
-rw-r--r--hald/rule.h12
-rw-r--r--hald/solaris/Makefile.am2
-rw-r--r--hald/solaris/osspec.c24
6 files changed, 39 insertions, 14 deletions
diff --git a/configure.in b/configure.in
index bc2698cc..ad2ed299 100644
--- a/configure.in
+++ b/configure.in
@@ -292,7 +292,8 @@ AM_CONDITIONAL(USE_PARTED, [test x$use_parted = xyes])
#### gcc linker flags
-if test "x$GCC" = "xyes"; then
+if test "x$GCC" = "xyes" -a `uname -s` != SunOS; then
+ # This causes undefined symbols errors on Solaris
LDFLAGS="-Wl,--as-needed $LDFLAGS"
fi
@@ -747,7 +748,7 @@ esac
# OS specific libs
case "$host" in
*-*-solaris*)
- HALD_OS_LIBS="-lsysevent -lnvpair -ldevinfo"
+ HALD_OS_LIBS="-lsysevent -lnvpair -ldevinfo -lkstat -lcfgadm"
AC_SUBST(HALD_OS_LIBS)
;;
esac
diff --git a/hald/cache_test.c b/hald/cache_test.c
index 76ac8bb4..2f1ac24c 100644
--- a/hald/cache_test.c
+++ b/hald/cache_test.c
@@ -47,9 +47,9 @@
void *rules_ptr = NULL;
-static void test_cache(u_int32_t offset, size_t size)
+static void test_cache(uint32_t offset, size_t size)
{
- u_int32_t m = offset;
+ uint32_t m = offset;
struct rule *r;
while(m < (offset + size)){
diff --git a/hald/create_cache.c b/hald/create_cache.c
index 2da91d0a..246e9586 100644
--- a/hald/create_cache.c
+++ b/hald/create_cache.c
@@ -54,7 +54,7 @@ static int haldc_verbose = 0;
/* ctx of the current fdi file used for parsing */
struct fdi_context {
int depth;
- u_int32_t match_at_depth[HAL_MAX_INDENT_DEPTH];
+ uint32_t match_at_depth[HAL_MAX_INDENT_DEPTH];
struct rule rule;
off_t position;
int cache_fd;
@@ -305,14 +305,14 @@ static void remember_jump_position(struct fdi_context *fdi_ctx)
static void set_jump_position(struct fdi_context *fdi_ctx)
{
off_t offset;
- u_int32_t offset32;
+ uint32_t offset32;
if (fdi_ctx->depth <= 0)
DIE(("Rule depth underrun"));
fdi_ctx->depth--;
offset = RULES_ROUND(lseek(fdi_ctx->cache_fd, 0, SEEK_END));
- offset32 = (u_int32_t)offset;
+ offset32 = (uint32_t)offset;
pad32_write(fdi_ctx->cache_fd,
fdi_ctx->match_at_depth[fdi_ctx->depth] + offsetof(struct rule, jump_position),
&offset32, sizeof(fdi_ctx->rule.jump_position));
diff --git a/hald/rule.h b/hald/rule.h
index 832759de..1a4aa93c 100644
--- a/hald/rule.h
+++ b/hald/rule.h
@@ -91,13 +91,13 @@ typedef enum {
/* a "rule" structure that is a generic node of the fdi file */
struct rule {
size_t rule_size; /* offset to next rule in the list (aligned to 4 bytes) */
- u_int32_t jump_position; /* the rule to jumo position (aligned to 4 bytes) */
+ uint32_t jump_position; /* the rule to jumo position (aligned to 4 bytes) */
rule_type rtype; /* type of rule */
match_type type_match;
merge_type type_merge;
- u_int32_t value_offset; /* offset to keys value (aligned to 4 bytes) */
+ uint32_t value_offset; /* offset to keys value (aligned to 4 bytes) */
size_t value_len; /* length of keys value */
size_t key_len;
@@ -105,10 +105,10 @@ struct rule {
};
struct cache_header {
- u_int32_t fdi_rules_preprobe;
- u_int32_t fdi_rules_information;
- u_int32_t fdi_rules_policy;
- u_int32_t all_rules_size;
+ uint32_t fdi_rules_preprobe;
+ uint32_t fdi_rules_information;
+ uint32_t fdi_rules_policy;
+ uint32_t all_rules_size;
char empty_string[4];
};
diff --git a/hald/solaris/Makefile.am b/hald/solaris/Makefile.am
index 86b49543..b113ff85 100644
--- a/hald/solaris/Makefile.am
+++ b/hald/solaris/Makefile.am
@@ -16,5 +16,5 @@ endif
libhald_solaris_la_SOURCES = \
devinfo.c devinfo_ieee1394.c devinfo_misc.c devinfo_pci.c devinfo_storage.c devinfo_usb.c \
- hotplug.c osspec.c sysevent.c
+ hotplug.c osspec.c sysevent.c devinfo_acpi.c devinfo_cpu.c
diff --git a/hald/solaris/osspec.c b/hald/solaris/osspec.c
index dde8d6a2..adb56a72 100644
--- a/hald/solaris/osspec.c
+++ b/hald/solaris/osspec.c
@@ -42,6 +42,12 @@ static void mnttab_event_init ();
static gboolean mnttab_event (GIOChannel *channel, GIOCondition cond, gpointer user_data);
void
+osspec_privileged_init (void)
+{
+
+}
+
+void
osspec_init (void)
{
ids_init ();
@@ -233,3 +239,21 @@ osspec_refresh_mount_state_for_block_device (HalDevice *d)
{
devinfo_storage_mnttab_event (d);
}
+
+static HalFileMonitor *file_monitor = NULL;
+
+HalFileMonitor *
+osspec_get_file_monitor (void)
+{
+ return file_monitor;
+}
+
+guint
+hal_file_monitor_add_notify (HalFileMonitor *monitor,
+ const char *path,
+ int mask,
+ HalFileMonitorNotifyFunc notify_func,
+ gpointer data)
+{
+ return 0;
+}