diff options
author | Rob Taylor <robtaylor@sultana.(none)> | 2008-03-06 13:49:21 +0000 |
---|---|---|
committer | Rob Taylor <rob.taylor@codethink.co.uk> | 2008-03-12 20:11:09 +0100 |
commit | 84bd77044698784c976d5a1c06c13f75ec900c17 (patch) | |
tree | 6ee23c0e94c5ccf7da3bd33d2b4bc799ffc359ae /hald/util.h | |
parent | cc26838fd367a586ad1dff2dcc61370e7ea22b6a (diff) |
compute udis that are unique in the gdl and tdl
Introduces hald_compute_udi which computes a udi thats unique in both the
tdl and gdl and uses it everywhere relvent. This is necessary when we're
processing events in parallel as otherwise its possible to get a race condition
with two devices added with the same name. As part of this patch,
hal_util_compute_udi grwos a varargs version and no longer makes the computer
udi unique. I've also added a hal_util_make_udi_unique for use in those places
where hal_util_compute_udi was only used to check a udi was unique when
inserting into the gdl.
Diffstat (limited to 'hald/util.h')
-rw-r--r-- | hald/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hald/util.h b/hald/util.h index 7530f034..4cf9524c 100644 --- a/hald/util.h +++ b/hald/util.h @@ -68,6 +68,10 @@ gboolean hal_util_set_bcd2_from_file (HalDevice *d, const gchar *key, const gcha gboolean hal_util_set_double_from_file (HalDevice *d, const gchar *key, const gchar *directory, const gchar *file); +void hal_util_make_udi_unique (HalDeviceStore *store, gchar *udi, gsize udisize, const char *original_udi); + +void hal_util_compute_udi_valist (HalDeviceStore *store, gchar *dst, gsize dstsize, const gchar *format, va_list args); + void hal_util_compute_udi (HalDeviceStore *store, gchar *dst, gsize dstsize, const gchar *format, ...); gboolean hal_util_path_ascend (gchar *path); |