hal-set-property patch
Artem Kachitchkine
Artem.Kachitchkin at Sun.COM
Fri Apr 28 12:04:33 PDT 2006
David, are you okay with me committing this?
-Artem.
Artem Kachitchkine wrote:
>
> hal-set-property --remove returns 1 on success and 0 on failure.
> Depending on the compiler, it can also dump core. Here's the fix, OK to
> commit?
>
> -Artem.
>
>
> ------------------------------------------------------------------------
>
> Index: tools/hal_set_property.c
> ===================================================================
> RCS file: /cvs/hal/hal/tools/hal_set_property.c,v
> retrieving revision 1.13
> diff -u -r1.13 hal_set_property.c
> --- tools/hal_set_property.c 8 Nov 2005 15:47:36 -0000 1.13
> +++ tools/hal_set_property.c 27 Apr 2006 03:42:36 -0000
> @@ -235,7 +235,7 @@
>
> if (remove) {
> rc = libhal_device_remove_property (hal_ctx, udi, key, &error);
> - if (rc != 0) {
> + if (!rc) {
> fprintf (stderr, "error: libhal_device_remove_property: %s: %s\n", error.name, error.message);
> return 1;
> }
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> hal mailing list
> hal at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/hal
More information about the hal
mailing list