hal/hald util.c,1.35,1.36 util.h,1.16,1.17
Kay Sievers
kay at freedesktop.org
Mon Jan 23 04:15:52 PST 2006
- Previous message: hal/hald/linux2 blockdev.c, 1.32, 1.33 coldplug.c, 1.21,
1.22 hotplug.c, 1.19, 1.20 hotplug.h, 1.10, 1.11 osspec.c,
1.41, 1.42
- Next message: hal/drive_id .cvsignore,1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvs/hal/hal/hald
In directory gabe:/tmp/cvs-serv27406/hald
Modified Files:
util.c util.h
Log Message:
2006-01-23 Kay Sievers <kay.sievers at vrfy.org>
Remove drive_id and use the udev provided data for block device
serial numbers and vendor/product information.
* Makefile.am:
* configure.in:
* drive_id/Makefile.am:
* drive_id/ata.c:
* drive_id/ata.h:
* drive_id/drive_id.c:
* drive_id/drive_id.h:
* drive_id/logging.h:
* drive_id/scsi.c:
* drive_id/scsi.h:
* drive_id/util.c:
* drive_id/util.h:
* hald/linux2/blockdev.c: (add_blockdev_probing_helper_done),
(blockdev_callouts_preprobing_storage_done),
(blockdev_callouts_preprobing_volume_done),
(hotplug_event_begin_add_blockdev):
* hald/linux2/coldplug.c: (hal_util_get_udevinfo_path),
(hal_util_init_sysfs_to_udev_map), (coldplug_get_hotplug_event),
(coldplug_synthesize_events), (coldplug_synthesize_block_event),
(coldplug_compute_visit_device):
* hald/linux2/hotplug.c: (fixup_net_device_for_renaming),
(hotplug_event_begin_sysfs):
* hald/linux2/hotplug.h:
* hald/linux2/osspec.c: (hald_udev_data), (osspec_init):
* hald/linux2/probing/Makefile.am:
* hald/linux2/probing/probe-storage.c: (main):
* hald/linux2/probing/probe-volume.c: (volume_id_log),
(strdup_valid_utf8), (set_volume_id_values):
* hald/util.c: (hal_util_strdup_valid_utf8):
* hald/util.h:
Index: util.c
===================================================================
RCS file: /cvs/hal/hal/hald/util.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- util.c 21 Jan 2006 02:45:27 -0000 1.35
+++ util.c 23 Jan 2006 12:15:50 -0000 1.36
@@ -1012,6 +1012,23 @@
;
}
+gchar *
+hal_util_strdup_valid_utf8 (const char *str)
+{
+ char *endchar;
+ char *newstr;
+
+ if (str == NULL)
+ return NULL;
+
+ newstr = g_strdup (str);
+
+ while (!g_utf8_validate (str, -1, (const char **) &endchar)) {
+ *endchar = '?';
+ }
+ return newstr;
+}
+
void
hal_util_hexdump (const void *mem, unsigned int size)
{
Index: util.h
===================================================================
RCS file: /cvs/hal/hal/hald/util.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- util.h 21 Jan 2006 02:45:27 -0000 1.16
+++ util.h 23 Jan 2006 12:15:50 -0000 1.17
@@ -29,6 +29,10 @@
#include "device.h"
#include "device_store.h"
+#define HAL_NAME_MAX 256
+#define HAL_PATH_MAX 256
+#define HAL_HELPER_TIMEOUT 10000
+
int util_compute_time_remaining (const char *id, int chargeRate, int chargeLevel, int chargeLastFull,
gboolean isDischarging, gboolean isCharging, gboolean guessChargeRate);
@@ -89,10 +93,8 @@
void hal_util_callout_device_remove (HalDevice *d, HalCalloutsDone callback, gpointer userdata1, gpointer userdata2);
void hal_util_callout_device_preprobe (HalDevice *d, HalCalloutsDone callback, gpointer userdata1, gpointer userdata2);
-void hal_util_hexdump (const void *buf, unsigned int size);
-
-#define HAL_HELPER_TIMEOUT 10000
+gchar *hal_util_strdup_valid_utf8 (const char *str);
-#define HAL_PATH_MAX 256
+void hal_util_hexdump (const void *buf, unsigned int size);
#endif /* UTIL_H */
- Previous message: hal/hald/linux2 blockdev.c, 1.32, 1.33 coldplug.c, 1.21,
1.22 hotplug.c, 1.19, 1.20 hotplug.h, 1.10, 1.11 osspec.c,
1.41, 1.42
- Next message: hal/drive_id .cvsignore,1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the hal-commit
mailing list