Age | Commit message (Collapse) | Author | Files | Lines |
|
Fixed libhal: do not call property_set_lookup before checking
param validity.
|
|
Fixed leaks on error conditions.
|
|
Fixed a bunch of compiler warnings from the Intel compiler
(cce/icc 10.1.015). Closed a small memory leak in
linux/hal-file-monitor.c
|
|
Fixed usage of LIBHAL_CHECK_LIBHALCONTEXT() in
libhal_get_all_devices_with_properties(). For parameter checks use
LIBHAL_CHECK_PARAM_VALID() instead.
|
|
|
|
This is optionally used by the gvfs hal volume monitor.
|
|
This fixes a crash in libhal, found when libhal_ctx_shutdown is called
while system bus was shutdown.
It ensures the way dbus error has handled in libhal_ctx_shutdown is the
same as the other functions in libhal.c (and it no longer crashes as a
bonus).
|
|
Reduces the amount of same calls in different code paths. Fixes few
double unreferencing, and several resource leaks by unreferencing
the DBusMessages.
|
|
This fixes several compiler warnings from cgcc/spase.
|
|
Fixed some whitespaces in libhal.c
|
|
This adds:
- a minimal check if a given UDI is valid (checks if the UDI starts
with '/org/freedesktop/Hal/devices/'). This should prevent possible
(application) crashes if a invalid UDI is send to HAL and reduce
unneeded dbus calls.
- some more parameter checks (for LibHalChangeSet, keys ...)
|
|
Fixed memory leaks after out of memory conditions.
|
|
Do not dereference *reason_why_locked if it's NULL after call
dbus_malloc0().
|
|
Fixed access of freed memory in function libhal_free_property_set().
|
|
This patch adds some more parameter check to some of the libhal
functions to avoid possible trouble (e.g. in libhal_free_property_set()).
|
|
The last entry is not returned.
|
|
Fixed libhal code docu, removed type from commit #e9717094
|
|
Fixed one return of libhal_ctx_init_direct() to return not FALSE,
but correct LibHalContext* if dbus_connection_add_filter() fail.
|
|
Fix build errors with older D-Bus versions (< v1.0) where
DBUS_API_SUBJECT_TO_CHANGE need to be defined.
|
|
Fixed API documentation of libhal (libhal_device_singleton_addon_is_ready)
|
|
Uses uthash (http://uthash.sourceforge.net/) as a hashtable implementation
for LibHalPropertySet. Slight changes have been made to uthash.h to remove float usage and clean up compiler warnings.
|
|
Adds api to libhal for supporting addon singletons:
- libhal_device_singleton_addon_is_ready for singletons to signal readyness.
- libhal_ctx_set_singleton_device_added and
libhal_ctx_set_singleton_device_removed for setting a callback on singleton
DeviceAdded/Removed. The properties of the new device are passed as a
LibHalPropertySet to the callback.
- a number of direct accessors for properties in a LibHalPropertySet
|
|
Changeset element keys weren't freed, causing memleaks. Mostly in the
UPS addon, which uses it for every change it notices.
|
|
Update the autotools files to not use obsolete macros and variables
and add proper quotation. Switch to autoreconf which will call any
needed program. Also autoreconf -Wall should be clean now (except
for external problems).
|
|
Fix possible segfaults in probe-volume and libhal if vid->type ==
NULL. Adde d checks for vid->type != NULL to probe-volume.c and new
checks for parameter (LIBHAL_CHECK_PARAM_VALID) of
libhal_changeset_set_property_string().
This fix also fd.o bug #10429.
|
|
|
|
These actions currently set parameters
hal-storage-mount-[removable|fixed]:
- fstype
- mount-point
- mount-options
hal-lock
- interface
|
|
In the process, include hal-functions and make out shell-script based
method handlers share that.
|
|
It just doesn't make sense for a system-wide daemon to have
translations. The only reasons it's here is that
1. deprecated functions in libhal-storage uses it
(officially deprecated since 0.5.8 but people have been advised
for long to not use it)
2. hal-device-manager uses it
(and that will be replaced by gnome-device-manager shortly;
other desktops are encouraged to write their own replacements too.)
|
|
|
|
|
|
|
|
|
|
Now to write some docs how all this works...
|
|
|
|
This fixes fd.o bug #10133 and check several function parameter for
!= NULL to aviod problems with D-Bus calls where e.g. given udi or
key is NULL (it's at least the same code as check for a valid
LibHalContext).
|
|
Fixed compiler warning in libhal within fprintf().
|
|
I can't believe I didn't implement this earlier. Also extend libhal
with a libhal_property_set_sort() method and provide a lame
bubble-sort implementation for now.
|
|
|
|
Fixed copy-and-paste error in libhal and named the related
functions in the code documentation correct.
|
|
This patch fixes the usage of dbus_error_is_set(error) if the error is NULL.
Added check to be sure the lib don't call dbus_error_is_set() if the error is
NULL, otherwise the call crash.
|
|
|
|
Before this bug was fixed, the changes were sent in the wrong
order. This screwed up probe-storage.c (and probably other helpers
too) as it first set a property to FALSE and subsequently to TRUE.
|
|
Also fixup some .gitignore files and prune the TODO for finished items.
|
|
Also put some brains into addon-hid-ups so it only sets properties if
they are changed. Fix libhal_device_commit_changeset do nothing
if the changeset is empty. Should reduce load when having a USB UPS.
|
|
Added a new static library in partutil/ that serves two purposes
1. Probe for partition tables and the entries in them. This is
done without any new dependencies and is in general efficient.
Right now we understand Master Boot Record (and Extended MBR),
GUID Partitioning Tables and Apple Partition Map. The interface
is generic enough to add support for other disk labels too
should the need arise.
2. Create partition tables, add partition table entries, alter
partition table entries, delete partition table entries. This
is done using libparted to ensure maximal robustness and
correctness.
Beware that libparted is kinda silly in a few ways, it probes all
drives (even when asked to only look at one drive - the audicity!),
and we have to poke at the internals to get/set vital raw
properties. As such, we only officially support libparted 1.7.1 at
this point. If you use anything else but that, you are on your own.
We should start a dialouge with the libparted guys to make them
export official API suitable for our needs.
configure now takes a new --enable-parted and by default (for
the upcoming 0.5.8 release), this is set to "no". As such, the
upcoming 0.5.8 release will not depend on libparted.
Also we now use this infrastructure in probe-volume and probe-storage
to export the following new properties
storage.partitioning_scheme (string)
on storage devices and
volume.partition.scheme (string)
volume.partition.type (string)
volume.partition.label (string)
volume.partition.uuid (string)
volume.partition.flags (strlist)
on volumes. These new properties are also now exported through
libhal-storage.
Also moves some more code over to using LibHalChangeSet for nicer
and much more efficient handling.
|
|
Moved linux2/blockdev.c:is_mounted_by_hald() to
util.c:hal_util_is_mounted_by_hald() so all backends can use it.
Fixed some compilation warnings when compiling with non-GNU
compiler and libc.
|
|
Also converted probe-volume to use this new API.
|
|
This fixes several compiler warnings from warn_unused_result compiler
flag and some "format '%*' expects type 'x', but argument z has type 'xy'"
warnings on 64bit systems.
|
|
libhal uses i18n functions such as bindtextdomain. These functions are not
always provided by the standard C library (as happens in Linux). For example,
NetBSD has the i18n functions in libintl.
Therefore, libhal should be linked against the appropriate library that provides
the missing functions. This library is available in the INTLLIBS variable
thanks to the AM_GLIB_GNU_GETTEXT variable used in configure.
If libhal is not linked to libintl, any program using libhal fails to build
because the missing functions cannot be found. This happens while trying to
build the tools directory.
|