hal/libhal-storage libhal-storage.c,1.17,1.18
David Zeuthen
david at freedesktop.org
Thu Jul 21 12:03:36 PDT 2005
Update of /cvs/hal/hal/libhal-storage
In directory gabe:/tmp/cvs-serv31761/libhal-storage
Modified Files:
libhal-storage.c
Log Message:
2005-07-21 David Zeuthen <davidz at redhat.com>
* libhal-storage/libhal-storage.c, libhal/libhal.[ch]: Patch from
Danny Kukawka <danny.kukawka at web.de>: here the new patch with a
macro instead of always the same codeblock in so many funtions.
Index: libhal-storage.c
===================================================================
RCS file: /cvs/hal/hal/libhal-storage/libhal-storage.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- libhal-storage.c 15 Jul 2005 19:54:31 -0000 1.17
+++ libhal-storage.c 21 Jul 2005 19:03:34 -0000 1.18
@@ -815,6 +815,8 @@
LibHalDrive *
libhal_drive_from_udi (LibHalContext *hal_ctx, const char *udi)
{
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
char *bus_textual;
LibHalDrive *drive;
LibHalPropertySet *properties;
@@ -995,6 +997,8 @@
LibHalVolume *
libhal_volume_from_udi (LibHalContext *hal_ctx, const char *udi)
{
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
char *disc_type_textual;
LibHalVolume *vol;
LibHalPropertySet *properties;
@@ -1121,6 +1125,8 @@
LibHalDrive *
libhal_drive_from_device_file (LibHalContext *hal_ctx, const char *device_file)
{
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
int i;
char **hal_udis;
int num_hal_udis;
@@ -1178,6 +1184,8 @@
LibHalVolume *
libhal_volume_from_device_file (LibHalContext *hal_ctx, const char *device_file)
{
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
int i;
char **hal_udis;
int num_hal_udis;
@@ -1426,6 +1434,8 @@
char **
libhal_drive_find_all_volumes (LibHalContext *hal_ctx, LibHalDrive *drive, int *num_volumes)
{
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
int i;
char **udis;
int num_udis;
@@ -1469,6 +1479,8 @@
char *
libhal_drive_policy_default_get_mount_root (LibHalContext *hal_ctx)
{
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
DBusError error;
dbus_error_init (&error);
return libhal_device_get_property_string (hal_ctx, "/org/freedesktop/Hal/devices/computer",
@@ -1478,6 +1490,8 @@
dbus_bool_t
libhal_drive_policy_default_use_managed_keyword (LibHalContext *hal_ctx)
{
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
DBusError error;
dbus_error_init (&error);
return libhal_device_get_property_bool (hal_ctx, "/org/freedesktop/Hal/devices/computer",
@@ -1487,6 +1501,8 @@
char *
libhal_drive_policy_default_get_managed_keyword_primary (LibHalContext *hal_ctx)
{
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
DBusError error;
dbus_error_init (&error);
return libhal_device_get_property_string (hal_ctx, "/org/freedesktop/Hal/devices/computer",
@@ -1496,6 +1512,8 @@
char *
libhal_drive_policy_default_get_managed_keyword_secondary (LibHalContext *hal_ctx)
{
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
DBusError error;
dbus_error_init (&error);
return libhal_device_get_property_string (hal_ctx, "/org/freedesktop/Hal/devices/computer",
@@ -1529,6 +1547,8 @@
mopts_collect (LibHalContext *hal_ctx, const char *namespace, int namespace_len,
const char *udi, char *options_string, size_t options_max_len, dbus_bool_t only_collect_imply_opts)
{
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
LibHalPropertySet *properties;
LibHalPropertySetIterator it;
DBusError error;
More information about the hal-commit
mailing list