hal/libhal-storage libhal-storage.c,1.18,1.19
David Zeuthen
david at freedesktop.org
Thu Jul 21 13:26:48 PDT 2005
Update of /cvs/hal/hal/libhal-storage
In directory gabe:/tmp/cvs-serv22019/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.c: Move the
LIBHAL_CHECK_LIBHALCONTEXT down to after declerations so we
don't depend on C99.
Index: libhal-storage.c
===================================================================
RCS file: /cvs/hal/hal/libhal-storage/libhal-storage.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- libhal-storage.c 21 Jul 2005 19:03:34 -0000 1.18
+++ libhal-storage.c 21 Jul 2005 20:26:46 -0000 1.19
@@ -814,9 +814,7 @@
*/
LibHalDrive *
libhal_drive_from_udi (LibHalContext *hal_ctx, const char *udi)
-{
- LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
-
+{
char *bus_textual;
LibHalDrive *drive;
LibHalPropertySet *properties;
@@ -824,6 +822,8 @@
DBusError error;
unsigned int i;
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
drive = NULL;
properties = NULL;
bus_textual = NULL;
@@ -997,14 +997,14 @@
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;
LibHalPropertySetIterator it;
DBusError error;
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
vol = NULL;
properties = NULL;
disc_type_textual = NULL;
@@ -1125,8 +1125,6 @@
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;
@@ -1134,6 +1132,8 @@
char *found_udi;
DBusError error;
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
result = NULL;
found_udi = NULL;
@@ -1184,8 +1184,6 @@
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;
@@ -1193,6 +1191,8 @@
char *found_udi;
DBusError error;
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
result = NULL;
found_udi = NULL;
@@ -1434,8 +1434,6 @@
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;
@@ -1443,6 +1441,8 @@
char **result;
DBusError error;
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
udis = NULL;
result = NULL;
*num_volumes = 0;
@@ -1479,9 +1479,10 @@
char *
libhal_drive_policy_default_get_mount_root (LibHalContext *hal_ctx)
{
+ DBusError error;
+
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",
"storage.policy.default.mount_root", &error);
@@ -1490,9 +1491,10 @@
dbus_bool_t
libhal_drive_policy_default_use_managed_keyword (LibHalContext *hal_ctx)
{
+ DBusError error;
+
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",
"storage.policy.default.use_managed_keyword", &error);
@@ -1501,9 +1503,10 @@
char *
libhal_drive_policy_default_get_managed_keyword_primary (LibHalContext *hal_ctx)
{
+ DBusError error;
+
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",
"storage.policy.default.managed_keyword.primary", &error);
@@ -1512,9 +1515,10 @@
char *
libhal_drive_policy_default_get_managed_keyword_secondary (LibHalContext *hal_ctx)
{
+ DBusError error;
+
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",
"storage.policy.default.managed_keyword.secondary", &error);
@@ -1547,12 +1551,12 @@
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;
+ LIBHAL_CHECK_LIBHALCONTEXT(hal_ctx, NULL);
+
dbus_error_init (&error);
/* first collect from root computer device */
More information about the hal-commit
mailing list