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.
|
|
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.
|
|
thanks.
|
|
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.
|
|
power_management.can_suspend_to_ram and
power_management.can_suspend_to_disk in favour of
power_management.can_suspend and power_management.can_hibernate so it's
all consistent between the method names and the can_* keys. We'll
remove the former keys in a year or so, but leave them now for
compatability.
|
|
|
|
|
|
info.hal_mount.created_mount_point
Export prototype for new function libhal_ctx_get_dbus_connection()
New function
Use a the Unmount() hal method to lazy unmount
Ugh ugh ugh.. clear buffer before receiving data from udev.. we didn't use
to do this and we got all sorts of weird side-effects since we'd for
instance pick up DEVNAME='/dev/sdb' and _then_ DEVNAME='/dev/sda1' for
/sys/block/sdb.. This was because this data was left in the buffer from
the old run. It now appears to work..
New function, pass end_token to hal_util_callout_device_remove()
(force_unmount): Use the Unmount method call to lazy unmount, thus
making sure we don't block (hotplug_event_begin_remove_blockdev): Pass
end_token to force_unmount and let that function invoke
hal_util_callout_device_remove()
Make this work for helpers using a direct connection to hald
(hald_dbus_filter_handle_methods): Pass local_interface to
hald_exec_method
Update to use 'pwd' just like run-hald.sh was updated
|
|
too large and the kernel uevent buffer size is going to be increased.
|
|
numbers and vendor/product information.
|
|
|
|
know by now, various people don't really like that hal running as root.
We'd much rather see only a small process running as root and the main
hal process running unpriviledged. Which is exactly what this patch
does :)
How does it work? Just before drops it's root privs. a small program is
startup which will remain running as root and does the real execution
of the addons/probes/callouts on hals behalf. Communication between
hald and hald-runner is done via a p2p dbus connection. Resulting in a
process tree like this:
hal /usr/sbin/hald root \_ /usr/lib/hal/hald-runner root \_
/usr/lib/hal/hald-addon-acpi root \_ /usr/lib/hal/hald-addon-storage
root \_ /usr/lib/hal/hald-addon-storage
The patch consists out of two parts. First the implementation of
hald-runner, which is about 700 lines of code. And then a part
transforming the hald code from the current spawning code in utils to
an interface that can talk to the runner.
Add Sjoerd Simons <sjoerd@luon.net>. Revise my own email address.
Add hald-runner
Add hald-runner
add hald_runner.[ch]
New and changed files with slight changes. See the descriptive text above
and discussion at
http://lists.freedesktop.org/archives/hal/2006-January/004327.html for
details. Changed function hald_runner_start_runner() in
hald/hald_runner.c to print out runner path and improve error handling
when runner is not found. Also removed dbus_server_unref (server) in
handle_connection() in same file.
Remove --retain-privileges as this is no longer needed
Remove --retain-privileges and use --with-runner pointing to
../hald-runner/hald-runner
|
|
|
|
about mount tree changes. Kernel 2.6.16 will no longer have any netlink
event regarding block devices mount/claim. We watch only /proc/mounts
from now, remove all netlink listening and depend on kernel version
2.6.15.
With every mount event, we update all known devices now, to the current
state found in /proc/mounts. The device name in /proc/mounts is
ignored, but the dev_t of the underlying block device is looked up to
find the hal device. That way, /dev/root and rootdev will also be
recognized and the current mount state becomes visible.
|
|
found.
|
|
power_management.can_hibernate
|
|
over this socket to HAL, if the following rule is given:
RUN+="socket:/org/freedesktop/hal/udev_event"
The HAL hotplug helper /usr/sbin/hal.hotplug is no longer needed and should
be replaced by the direct udev connection which will no longer fork a
process for every event.
This is the preparation to reuse the persistent data udev collects from the
hardware, instead of querying it a second time with HAL. If we reach
this, drive_id/* and the hotplug helper will be removed from HAL.
|
|
fixed compiler warning
fixed bug from last fix, removed '+' from inserted lines.
|
|
smbios.system.version to the property.
fixed code documentation
|
|
files.
|
|
Nettleton <jon.nettleton@gmail.com>.
|
|
machine is a latop. If so change the key system.formfactor to 'laptop'
(to workaround missing/ unknown information from smbios). Fixed typo in
code documentation.
Fixed keys if the battery is removed. Changed check for battery and added
more criterions to be sure that we add only known values. Also fixed
the udi of APM devices, now the udi contains the name of the
devicetype.
Fixed creation of key system.formfactor from smbios information to be sure
never overwrite already set key (e.g. from APM/ACPI/PMU).
|
|
standard datatype.
|
|
COPYING file. Patch from Danny Kukawka <danny.kukawka@web.de>.
|
|
3.x and 4.x. Please review. Patch from Danny Kukawka
<danny.kukawka@web.de>.
|
|
support for Linux on S/390 specific devices in HAL. The following
patchset includes some non-s390 specific patches and support for the
S/390 bus types.
Document the properties of ccw, ccwgroup, iucv, and tape devices.
This comprises support for both the generic tape class and the tape390
class, as the two don't differ in anything but name.
ccw devices need to be considered for block devices.
The iucv bus is for virtual devices under z/VM - currently only netiucv is
implemented.
The ccwgroup on S/390 contains devices consisting of grouped ccw devices -
usually networking devices. As with the ccw bus, there are some common
properties and lots of device specific ones.
The ccw bus on s390 contains all classic channel-attached devices. They all
have a few common properties, but also driver-specific ones.
Export hal_util_get_driver_name ()
New function (hal_util_set_driver): Refactor to use
hal_util_get_driver_name
Set MAC-address to zero's if we can't read it. (net_compute_udi): Use some
other unique ID if MAC address is missing or set to all zero's.
Generate a sensible name for block devices for which the model is an empty
string.
This patch adds a needed include for some interfaces, or gcc 4.0 will make
incorrect assumptions on the format of some functions.
|
|
backend to HAL.
New file
New file
Add checks for Solaris
|
|
Remove (hal_util_get_device_file): Remove
Move from osspec.c (hal_util_get_sysfs_to_dev_map): New function
(coldplug_synthesize_events): Get the sysfs->dev map in one go using
'udevinfo -d' available in udev since at least version 057.
Bump dbus requirement to 0.33 since the new dbus is out.
Don't leak the DBusMessage objects
Don't leak the error and actually return FALSE if sender is unprivileged.
Also fix up spelling.
|
|
actions are not limited to "add" and "remove" events. The kernel
already emits "online", "offline" hotplug events for hotplugging cpu's.
|
|
here's some other new stuff - one very relevant use for this is that we
can key off whether a system can ACPI S3 by e.g. looking at the new
smbios.* properties on computer (so distros can maintain a whitelist) -
another interesting one is system.formfactor that e.g. Nautilus can use
to select the right icon for Computer
New file; invoke dmidecode and extract useful properties
Add build rules for new prober hald-probe-smbios
New function (computer_probing_pcbios_helper_done): New function
(osspec_probe): Do the hald-probe-smbios if system supports ACPI or
APM; add note to do something similar for PowerMac's etc.
|
|
options 'valgrind --show-reachable=yes --leak-check=yes
--tool=memcheck ./hald --daemon=no --retain-privileges' - remember to set
up environment variables as in run-hald.sh. Some of the output:
497664 bytes in 486 blocks are still reachable in loss record 33 of 35 at
0x1B908984: malloc (vg_replace_malloc.c:131) by 0x4DE983: (within
/usr/lib/libexpat.so.0.5.0) by 0x4E1729: XML_ParserCreate_MM (in
/usr/lib/libexpat.so.0.5.0) by 0x4E17C1: XML_ParserCreate (in
/usr/lib/libexpat.so.0.5.0)
1003104 bytes in 972 blocks are still reachable in loss record 34 of 35 at
0x1B908984: malloc (vg_replace_malloc.c:131) by 0x4DD4A2: (within
/usr/lib/libexpat.so.0.5.0) by 0x4DD5F1: (within
/usr/lib/libexpat.so.0.5.0) by 0x4E0596: (within
/usr/lib/libexpat.so.0.5.0)
2115584 bytes in 486 blocks are still reachable in loss record 35 of 35 at
0x1B908984: malloc (vg_replace_malloc.c:131) by 0x4DC64E: XML_GetBuffer
(in /usr/lib/libexpat.so.0.5.0) by 0x4DC91E: XML_Parse (in
/usr/lib/libexpat.so.0.5.0) by 0x805093E: scan_fdi_files
(device_info.c:1282)
LEAK SUMMARY: definitely lost: 20034 bytes in 769 blocks. possibly lost:
1057 bytes in 21 blocks. still reachable: 5289701 bytes in 19813
blocks. suppressed: 0 bytes in 0 blocks.
plus some illegal memory access errors. After this patch
130613 bytes in 1 blocks are still reachable in loss record 23 of 24 at
0x1B908984: malloc (vg_replace_malloc.c:131) by 0x80610E2: ids_init
(ids.c:514) by 0x8056A15: osspec_init (osspec.c:337) by 0x8051DF8: main
(hald.c:591)
322003 bytes in 1 blocks are still reachable in loss record 24 of 24 at
0x1B908984: malloc (vg_replace_malloc.c:131) by 0x806101D: ids_init
(ids.c:292) by 0x8056A15: osspec_init (osspec.c:337) by 0x8051DF8: main
(hald.c:591)
LEAK SUMMARY: definitely lost: 20884 bytes in 774 blocks. possibly lost:
800 bytes in 20 blocks. still reachable: 643659 bytes in 4499 blocks.
which gives us a net saving of approx 4.5MB. Sweet. (yes, this ChangeLog is
somewhat a weblog for me these days)
Fix up error handling; remember to free the XML_Parser context which fixes
a 4.5MB memory leak on my system.
Free strings to seal a leak
Export hal_util_hexdump prototype
Yikes, make this a static buffer since we're returning a pointer to this
variable. (hal_util_hexdump): New convenience function
Fixup this function to actually work now that info.capabilities is a
strlist
Fix unneeded char buf[1].
|
|
device probing when daemonizing. Hope that it's right this time cause
the last time it resulted in breaking peoples pkg updates :-):
https://www.redhat.com/archives/fedora-test-list/2004-August/msg00785.html
New function; call osspec_probe_done if we're initialising and don't do
anything else
Export prototype for hotplug_queue_now_empty
Call the function hotplug_queue_now_empty when we are out of hotplug (or
coldplug :-) events to process.
New function (parent_wait_for_child): New function (main): Wait for child
to finish device probing when daemonizing
|
|
New function (osspec_probe): Fixup to use new di_search_and_merge stuff
Export prototype for hal_util_kill_all_helpers
Remove from running_helpers list (hal_util_helper_invoke): Add to
running_helpers list (hal_util_kill_all_helpers): New function (uses
running_helpers list)
Don't export osspec_shutdown and osspec_shutdown_done
No need to add @LIBEXECDIR@ to PATH now that hald does that itself
Add PACKAGE_LIBEXEC_DIR to out path. Fix a fd leak also (pointed out by Kay
Sievers). (sigterm_iochn_data): Kill all pending helpers and exit
Fixup some stupid typos
Include PACKAGE_LIBEXEC_DIR
|
|
|
|
Remove build rules for hal-hotplug-map
Callouts now take two userdata pointers (physdev_callouts_preprobing_done):
New function (hotplug_event_begin_add_physdev): Run preprobing callouts
just before real probing (flow continues in the above function)
Callouts now take two userdata pointers
Callouts now take two userdata pointers
(classdev_callouts_preprobing_done): New function
(hotplug_event_begin_add_classdev): Run preprobing callouts just before
real probing (flow continues in the above function)
Callouts now take two userdata pointers
(blockdev_callouts_preprobing_storage_done): New function
(blockdev_callouts_preprobing_volume_done): New function
(hotplug_event_begin_add_blockdev): Run preprobing callouts just before
real probing (flow continues in the two above functions)
Callouts now take two userdata pointers
Callouts now take two userdata pointers
Fix up prototypes for callouts to take two userdata pointers. Add
hal_util_callout_device_preprobe prototype.
Change callouts to take two userdata pointers
(hal_util_callout_device_preprobe): New function
Don't call hald_read_conf_file() as this is now gone.
Tweak prototype for di_search_and_merge to take a DeviceInfoType parameter
Lookup new environment variables
Use new environment variables for specifying fdi file location
Use new environment variables for specifying fdi file location
Don't link with libselinux and don't install callout directories
(hald_test_SOURCES): Remove hald_conf.[ch] (hald_SOURCES): Remove
hald_conf.[ch].
Add notes about how to tweak the hal tarball for a particular distribution
or OS. Rework the details a bit. Remove the hotplug_map rules. Remove
selinux bits (for now). Rework what fdi file directory Makefile's to
generate.
Removed
Removed
Specificy new subdirs
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New
New file to describe the new directory structure
|
|
Use /proc/mounts as we're now using the kernel events layer to get
mount/umount signals rather than waiting for /etc/mtab to be changed.
Otherwise we've would have a race with mount(1). Add some usable debug
information. (blockdev_mount_status_changed): Renamed from
blockdev_mtab_changed.
Yikes, append to the right iterator; fixes segfault
|
|
two parameters (device_send_signal_property_modified): -do-
Fix up to receive PropertyModified in the new format
|
|
Patch from John (J5) Palmieri <johnp@redhat.com> Attached is a simple patch
to fix the signature of the array container we are opening.
|
|
s/HAL_PROPERTY_TYPE_NIL/HAL_PROPERTY_TYPE_INVALID
ported to new dbus-0.30 API (foreach_property_append): implemented real
string lists and got rid of the \tval\tval\tval\t hack
ported to new dbus-0.30 API
s/HAL_PROPERTY_TYPE_NIL/HAL_PROPERTY_TYPE_INVALID
(libhal_get_string_array_from_iter): new helper function to create
string arrays from dbus arrays
(libhal_property_fill_value_from_variant): new helper function that
fills in properties from variants. Used when getting a hash of
properties from hald
s/HAL_PROPERTY_TYPE_NIL/HAL_PROPERTY_TYPE_INVALID HAL_PROPERTY_TYPE_INVALID
= DBUS_TYPE_INVALID
ported to new dbus-0.30 API Added success messages and more detailed failed
messages
Change all illegal characters to underscores '_'
:__init__, add_device_signal_recv): change add_signal_receiver calls to add
expand_args=False parameter. (DeviceManager::device_changed,
gdl_changed): changed handlers to conform with the new way we call
signal handlers
|
|
VOLUME_ID_FILESYSTEM.
Remember to init the DBusError since some operations may fail. (main): Look
at $HALD_ACTION for add, remove instead of first positional parameter
$1.
New file
New file
New files (imported from hal-0.4.x)
Add rules for hald-probe-storage and hald-probe-volume
New file
Add rules for hald-addon-storage
New function (sigio_iochn_data): New function (osspec_init): Set up signal
handler for SIGIO and the neccesary pipes to handle it safely. Set up
directory watcher for /etc and invoke blockdev_mtab_changed whenever
that happens
Call blockdev_* if appropriate
Add some new prototype for interacting with hotplug.c (much like what
physdev.h and classdev.h) exported. Also add the prototype for a new
function blockdev_mtab_changed.
Actually put some code here (the previous code was just boiler plate).
Add boolean already_issued_ callback
Truncate whitespace from string read (hal_util_terminate_helper): Don't
remove the child watcher source, but set a flag that we already did the
callback and helper_child_exited will reap the child (including
removing sources). This helps reap the zombies I've been seeing.
(helper_child_timeout): -do- (helper_child_exited): Only do callback if
we haven't already done so.
Another nice script for running gdb on hald; just run this script and
invoke the run command from the gdb console.
Also export ../tools so we can get fstab-sync going. Set HAL_FDI_SOURCE
Respect the env var HAL_FDI_SOURCE which is useful for development as hald
will read you local .fdi files
Temporarily add fstab-sync add/rem callouts (mental note: move to other
file soon); also add the media detection addon
New file
Add power-mgmt-policy.fdi
|
|
Moved to here from ../util.c (get_hal_sysfs_path): New function
(get_hal_proc_path): New function
New file; export the functions mentioned above
|
|
(get_hal_proc_path): New function
New file; export the functions mentioned above
|
|
on their own now. (link_detection_handle_message): Remove
(netlink_socket_data): Remove (osspec_init): Don't listen to the
netlink socket
Do not care about link detection
|
|
Add build rules for hald-addon-acpi
New file
Also look for computer in the TDL
New function (osspec_probe): Run callouts for computer
Fix up for the new helper
Also look for computer in the TDL
Also look for computer in the TDL (acpi_generic_remove): Don't remove the
device (acpi_callouts_add_done): New function
(acpi_callouts_remove_done): New function
(hotplug_event_begin_add_acpi): Run add callouts
(hotplug_event_begin_remove_acpi): Run remove callouts
Add code for string lists
New function (gdl_store_changed): Run addons (gdl_property_changed): Don't
run property.d callouts (gdl_capability_added): Don't run capability.d
callouts
Move from hald/linux2 since this is generic. Export the HalHelperData
structure when doing hal_util_helper invoke. Add prototypes for
hal_util_terminate_ helper, hal_util_dup_strv_from_g_slist,
hal_util_callout_device_add, hal_util_callout_device_remove.
Move from hald/linux2 since this is generic. (hal_util_terminate_helper):
New function (hal_util_helper_invoke): Renamed from helper_invoke.
Accept command line parameters (through g_shell_parse_argv). Accept a
strv of extra environement to set. Introduce that timeout==0 means no
timeout. Return the HalHelperData structure
(hal_util_dup_strv_from_g_slist): New convenience function; create a
new NULL-terminated string vector from a GSList of strings.
(callout_terminated): New function (callout_do_next): New function
(hal_callout_device): New function (hal_util_callout_device_add): New
function (hal_util_callout_device_remove): New function
Remove
Remove since this functionality is now in util.[ch]
Add util.[ch]
Remove util.[ch]
|
|
Add prototypes for hal_util_grep_string_elem_from_file and
hal_util_grep_int_elem_from_file.
Allow file to be NULL or empty and handle it correctly
(hal_util_grep_string_elem_from_file): New function
(hal_util_grep_int_elem_from_file): New function
(hal_util_set_string_elem_from_file): Simplify by using
hal_util_grep_string_elem_from_file (hal_util_set_int_elem_from_file):
Simplify by using hal_util_grep_string_elem_from_file
Refine algorithm for selecting power management system since PMU based
systems may simultaneously support APM as well.
Add PMU hotplug event
New function (hotplug_event_begin): Handle PMU (hotplug_rescan_device):
Handle PMU (hotplug_reprobe_generate_remove_events): Handle PMU
(hotplug_reprobe_generate_add_events): Handle PMU
Only set linux.device_file if there really is a device file
Use maximum instead of maximum_specified
Add pmu.[ch]
|
|
Remember to initialize the error object to NULL
Only try APM if ACPI fails
New function (hotplug_event_begin): Handle APM (hotplug_rescan_device):
Handle APM (hotplug_reprobe_generate_remove_events): Handle APM
(hotplug_reprobe_generate_add_events): Handle APM
Remember to set error to NULL and don't leak the error object
(acpi_generate_remove_hotplug_event): Make this function return a
boolean to say whether ACPI capabilities were detected
Update the spec a bit more on battery.*
|
|
(osspec_device_reprobe): New function
Extend HotplugEvent struct to also be used for coldplugging/fake
hotplugging (via Reprobe()) of ACPI devices. Add prototypes for
hotplug_reprobe_tree() and hotplug_rescan_device().
Adjust to changes in hotplug.h (hotplug_event_begin_sysfs): New function;
what used to be the function hotplug_event_begin().
(hotplug_event_begin_acpi): New function (hotplug_event_begin): Now a
simple dispatcher according to hotplug type; e.g. sysfs or acpi
(hotplug_rescan_device): New function
(hotplug_reprobe_generate_remove_events): New function
(hotplug_reprobe_generate_add_events): New function
(hotplug_reprobe_tree): New function
Adjust to changes in hotplug.h
Add prototypes for classdev_generate_ [add|remove]_hotplug_event() and
classdev_rescan_device().
Add some properties so we can reconstruct the hotplug event
(classdev_rescan_device): New function
(classdev_generate_add_hotplug_event): New function
(classdev_generate_remove_hotplug_event): New function
Yikes, rewrite must of this to conform to the hotplug model so we can do
Rescan() and Reprobe()
Add prototypes for osspec_device_[rescan|reprobe]
New function (check_libhal): Add some more tests and report back
Fixup wrong failure reports (server_message_handler): Add new methods on
the org.freedesktop.Hal. Tests interfaces to signal that a test is done
(wait_for_external_test): New function; pretty ugly but it works for
now. As noted: Patches are Welcome(tm) (main): Enable libhal tests
New function (device_reprobe): New function (hald_dbus_filter_function):
Add checks for Rescan() and Reprobe() methods on the
org.freedesktop.Hal.Device interface
|
|
http://lists.freedesktop.org/archives/hal/2005-January/002002.html
from Richard Hughes <ee21rh@surrey.ac.uk> but much mangled by myself
Renamed from hal_util_get_parent_sysfs_path. (hal_util_grep_file): New
function (hal_util_set_string_elem_from_file): New function
(hal_util_set_int_elem_from_file): New function
(hal_util_set_bool_elem_from_file): New function
Add new prototypes
Call acpi_probe.
New files
Add acpi.[ch]
|
|
netlink socket
New function. For coping with net interfaces being renamed before hald can
handle them (For testing, put in the line g_spawn_command_line_sync
("/path/to/ifrename", NULL, NULL, NULL, NULL); in the top of hotplug_
event_begin(). (hotplug_event_begin): Call
fixup_net_device_for_renaming()
Be a bit more defensive about errors; export the net.80203.can_detect_link
property
|
|
it takes.
Undefine HAL_COLDPLUG_VERBOSE by default to reduce log spamming.
Merge the changes applied to the hal-0_4-stable-branch yesterday
Remove debugging fprintf's
Also remove mount options if something is set to FALSE (based on patch from
Sebastian Dransfeld <sebastid@stud.ntnu.no>; also fix a pretty bad bug
where the computation of is_imply_opt were totally wrong.
(hal_volume_policy_get_mount_options),
(hal_drive_policy_get_mount_options): Collect imply options in the
correct order now that mopts_collect is fixed : -do-
|