Age | Commit message (Collapse) | Author | Files | Lines |
|
Since there is no longer a hald/linux dir in the repository, we can move
hald/linux2 to hald/linux and rename the related HALD_BACKEND to linux.
|
|
Replaced left dbg() calls in probe-storage.c and probe-volume.c
with HAL_DEBUG().
|
|
This remove hald/linux2/probing/shared.h for better reuse of related
functions and to avoid compiler warnings about defined but unused
functions.
Major changes:
* removed shared.h and switched addons and prober to use with
logger.[c,h] the same functions and format as the hal daemon.
* split off powermanagement related code from util.c/h to a new file
util_pm.[c,h].
* added a new file util_helper.[c,h] to collect functions
drop_privileges() and hal_set_proc_title*().
* removed unused function strdup_valid_utf8() from probe-storage.c and
updated hal_util_strdup_valid_utf8() to do the same as
strdup_valid_utf8() before.
* fixed compiler warning in ids.c (use now *_ids_free() functions
instead of call free() directly without checks).
* fixed compiler warning in addon-macbookpro-backlight.c (added '#if 0'
around unused function)
|
|
We should convert the mAh reading (battery.reporting.rate) into mWh
(battery.charge_level.rate) by multiplying it by the voltage (in Volts),
but we are multiplying it by the voltage in mV, and so the rate information
is a factor of 3 too large. This *really* breaks calculating the time
for multibattery laptops.
|
|
|
|
Introduce volume.partition.msdos_part_table_start, .msdos_part_table_size,
and storage.removable.media_size.
|
|
Changed update property battery.remaining_time on APM to avoid change the
value every 2 seconds. APM calculate with each poll a new value for
remaining battery time, which could result in high dbus load if a application
listen for the event and check do something over the bus. On the other side
the remaining time from the APM interface is not trustworthy on the most
machines if you poll to often, increase the poll intervall (and emit a new
value to HAL) should smooth the time curve and reduce back and forth jumping
values.
Now the value is updated ever 30 seconds, this should preduce the needless
events.
|
|
Added missing scsi.type mappings which are e.g. needed to identify
scsi printer/scanner or media changer/raid devices. Added also the
property information about scsi.type to the spec.
Mapping of kernel types is:
TYPE_DISK, TYPE_MOD, TYPE_RBC --> disk
TYPE_TAPE --> tape
TYPE_PROCESSOR --> processor
TYPE_WORM, TYPE_ROM --> cdrom
TYPE_SCANNER --> scanner
TYPE_MEDIUM_CHANGER --> medium_changer
TYPE_COMM --> comm
TYPE_RAID --> raid
|
|
This cleanup the includes in the files under hald/linux/ . I removed not
needed and multiple included headers (-120 includes) and sorted/arranged
the remaining includes alphabetically.
|
|
Replaced in blockdev.c is_mounted_by_hald() with hal_util_is_mounted_by_hald
and included <sys/file.h> in utils.c for flock().
NOTE: Please run make or make dist before commit.
|
|
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.
|
|
We used to only creat a fakevolume if a mountable file system was
detected. This is wrong as you can have LUKS, RAID or LVM on the main
block device and we should detect this just like we do on
partitions. This patch fixes that.
Second, assume a piece of media is all zero'ed out. Then, on
insertion, we don't find anything on the main block device and neither
does the kernel so no child block devices are created. Hence, HAL
won't spit out any event when such media is inserted. And that, so
far, is correct as we don't detect any useful volumes. However, it
would be useful in e.g. a disk utility program to know if media is
actually available or not. This patch introduces a new property called
storage.removable.media_available that is TRUE if, and only if, we have
detected media on the storage device. Also expose this new property
in libhal-storage.
|
|
Also converted probe-volume to use this new API.
|
|
|
|
It appears that ide-cs in the Linux kernel finally got fixed, see
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130232
for details. So remove some code to make our handling of block devices
more robust.
Also add a note about it would be nice to add > 1 fakevolume objects
for multisession / partitioned optical discs.
|
|
This patch sets the proc title for this addons:
* hald-addon-acpi: add the current source of ACPI events
* hald-addon-hid-ups: add "listening on $device_file"
* hald-addon-usb-csr: add "listening on '$info.product'"
|
|
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.
|
|
Also make a note that this is a hack and that it can go away once the
patch for device mapper in the kernel emitted "changed" is in a
relased kernel.
|
|
|
|
|
|
Introduce new property volume.linux.is_device_mapper and check for this
on remove events to avoid looping in hotplug remove.
|
|
Don't mark device-mapper as volume.is_partition. Export new properties
storage.size, volume.partition.start and volume.partition.media_size.
Also define these in the spec.
Actually make the existing functions libhal_volume_is_partition() and
libhal_volume_get_partition_number() work. Also add a couple of new
functions libhal_drive_get_size(), libhal_volume_get_partition_start_offset()
and libhal_volume_get_partition_media_size().
|
|
Add a xen namespace to the spec and make HAL recognize bus devices
exported by Xen. This patch comes from Mark McLoughlin. Fixed
freedesktop.org bug #7521.
|
|
Fixed compiler warnings because of missing include of string.h and
added doc/api/tmpl/.gitignore.
|
|
You explicitly have to pass --disable-policy-kit to configure and/or
autogen.sh and if you do, a big fat warning will be displayed:
NOTE: WARNING! WARNING! WARNING! PolicyKit is not enabled. HAL will
allow any user to invoke any method. THIS IS A SECURITY RISK.
Use this only if you really know what you are doing. Bugs,
security issues and similar filed against HAL versions built
without PolicyKit may be ignored by the HAL maintainers.
Disable PolicyKit usage only if you really know what you are doing.
This option might be removed in the future. Also clean up the build
system by removing PACKAGE_CFLAGS and PACKAGE_LIBS. Binaries now have
to specify exactly what libs they want.
|
|
|
|
thanks.
|
|
introduced some copy-pasted LGPL code.
|
|
Use slaves/ directory in sysfs to figure out whether we set up a LUKS
partition - enables us to remove a gross hack. Remove sleep3 after
cryptsetup as it's no longer needed due to use fixing this right.
Remove defunct hal-luks-remove.in file.
|
|
in C, .hal-mtab usage, light_sensor and keyboard_backlight additions
including example.
Remove ChangeLog and add rules to Makefile.am (from cairo) to generate
the ChangeLog file from git history.
Add support for light_sensor and keyboard_backlight on my Macbook
Pro. Add an examply python script to examples/ to show how it's done.
Move Unmount, Eject and related stuff to C. Start using the file
/media/.hal-mtab instead of .created-by-hal to specify if HAL created
the mount point. Also list tons of metadata such as uid, session id
(still unused). Fixes the bug where the unprivileged hald couldn't
look into /media/foobar/ for the .created-by-hal file. So now doing
'umount /dev/sda1' on a volume mounted by HAL, makes hald remove the
mount point as one would expect.
|
|
|
|
|
|
include ctype.h to fix compiler warning
|
|
filesystem on the disk. This should work with kernel 2.6.17.
|
|
|
|
/sys/class.
|
|
volume size if volume.block_size and volume.num_blocks.
|
|
|
|
the addon daemon code. The example here is setting the LCD backlight on
a Macbook Pro. Actual code for setting the backlight is based on code
from Nicolas Boichat found on the mactel-linux mailing list.
New file.
Bugfix so the right backend script is invoked.
Add prototype for libhal_device_claim_interface().
New function.
Add rules for hald-addon-macbookpro-backlight.
Only allow helpers, e.g. only messages from direct connections.
(device_claim_interface): New function to handle the ClaimInterface()
method (do_introspect): Include introspection XML for ClaimInterface()
and the introspection XML returned by ClaimInterface() invocations.
(reply_from_fwd_message): New function
(hald_dbus_filter_handle_methods): Handle ClaimInterface() and forward
messages to the claimed interfaces on the appropriate objects.
(local_server_message_handler): Forward signals from helpers onto the
system message bus and DTRT when a helper disconnects.
New function. One can now do a <spawn udi="foo"> to spawn a child device.
See the fdi file below for usage. (start,
spawned_device_callouts_add_done, end): Handle spawning device objects
in response to <spawn>.
Add rules for matching the Macbook Pro in order to spawn a new device
object with an addon for handing methods on the org.fd.H.D.LaptopPanel
interface.
Allow some interfaces to also emit signals.
Check for libpci so we can use it as an optional dependency.
|
|
<ervin@kde.org>.
|
|
this info is gone into NetworkMananger and removed from HAL (see fd.o
bug #6233).
changed net.interface_up to not mandatory
|
|
if the key is already set to avoid overwrite values e.g. set in the
ACPI/APM/PMU code. Added check for exit_type to skip mapping if
execution of the smbios prober failed. (osspec_probe): Removed set
default value for system.formfactor for all cases and readded to case
if !should_decode_dmi is set.
|
|
|
|
|
|
example: https://launchpad.net/bugs/27897. This happens if the label is
either truly bogus, or in a non-UTF-8 compatible encoding. The blunt
solution would be to just ignore any non-UTF-8 labels, but since it
might be preferable to retain labels which are only 'lightly' damaged
(maybe one Umlaut in an otherwise valid string), I wrote a small patch
to ignore invalid labels if they contain more than 20% illegal
characters. Patch from Martin Pitt <martin@piware.de>.
|
|
|
|
validate the returned string and not the original, which we duplicated for
return.
|
|
allow easy logging complete hal debug information to syslog if hald run
in daemon mode:
added HALD_USE_SYSLOG to env
added support for HALD_USE_SYSLOG
Replaced in prober and addons old debug code with support for
--use-syslog instead of log to sterr.
also fixed set debug option before use dbg() the first time
replaced printf with dbg() and removed some needless debug lines.
|
|
search string is shorter than 7 chars: replaced in strbegin()
'sizeof(char *) -1' (which returns the size of the pointer) with
'strlen(char *)' which returns the size of the string.
|
|
reworked detection of device capabilities to get correct DVD-RW info and
added DVD+RW DL detection.
fixed mapping of return value of get_dvd_r_rw_profile() related to changes
added property DVD+RW DL
|