Age | Commit message (Collapse) | Author |
|
src/libudev/{conf-files,exit-status,hashmap,log,path-util,set,strv}.c
A lot of upstream commits cross many boundaries between systemd code
and udev code. The point of intersection is upstreams src/shared
folder. The best way we find to track them is to apply their commits
to udev and libudev and then just pick remove functions from the
shared folder. Its timely but it gives us the best control over what
gets in and what doesnt.
In this commit we removed the following functions:
conf_files_list_nulstr
exit_status_to_string
is_clean_exit_lsb
uint64_hash_func
uint64_compare_func
hashmap_free_free_free
hashmap_update
hashmap_get2
hashmap_remove_and_replace
hashmap_remove_value
hashmap_steal_first_key
hashmap_next
log_forget_fds
log_set_facility
log_meta_object
log_struct_internal
log_set_target_from_string
log_set_max_level_from_string
log_get_target
log_get_max_level
log_show_color_from_string
log_show_location_from_string
log_on_console
is_path
path_split_and_make_absolute
set_ensure_allocated
set_replace
set_remove_and_put
set_size
set_isempty
set_iterate_skip
set_steal_first
set_first
set_last
set_merge
set_move_one
set_copy
set_clear_free
set_get_strv
strv_find_prefix
strv_merge_concat
strv_split_newlines
strv_join
strv_remove_prefix
strv_parse_nulstr
strv_overlap
strv_sort
strv_print
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
|
|
|
|
In doing so, we better alined util.{c,h} by movig the definitions
of freep, fclosep, closep, closedirp, umaskp from util.c to util.h
as static inline. We also add strv_env_get to env-util.{c,h} which
we forgot to do earlier.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
To bring this in line with upstream, we had to add in env-util.c.
The approach we will take is to slim down upstream's "shared" code
so that it only contains functions and macros for what we need.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
|
|
gcc (and other compilers) sometimes generate spurious warnings, and
thus users of public headers must be able to disable warnings.
Printf format attributes can be disabled by setting
#define _sd_printf_attr_
before including the header file.
Also, add similar logic for sentinel attribute:
#define _sd_sentinel_attr_
before including the header file disables the attribute.
|
|
It's polite to print the name of the link that wasn't created,
and it makes little sense to print the target.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
b8a2b0f76 'use initalization instead of explicit zeroing'
introduced a bug where only the first sizeof(uint_t*) bytes
would be zeroed out, instead of the whole array.
|
|
|
|
Avoid "sender uid=65534, message ignored" case, where no credentials can
be read on the sender side.
Seems, the server socket does not enable credential receiving fast
enough, and the message from the client (without credential) sometimes
is queued before the credential passing was active.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Before, we would initialize many fields twice: first
by filling the structure with zeros, and then a second
time with the real values. We can let the compiler do
the job for us, avoiding one copy.
A downside of this patch is that text gets slightly
bigger. This is because all zero() calls are effectively
inlined:
$ size build/.libs/systemd
text data bss dec hex filename
before 897737 107300 2560 1007597 f5fed build/.libs/systemd
after 897873 107300 2560 1007733 f6075 build/.libs/systemd
… actually less than 1‰.
A few asserts that the parameter is not null had to be removed. I
don't think this changes much, because first, it is quite unlikely
for the assert to fail, and second, an immediate SEGV is almost as
good as an assert.
NOTE by Basile: the above analysis is for all systemd. This commit
is just a sliver of the commit for all of system and so we can't
expect size to be the same.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
A fix for ff03aed06a422.
|
|
For some reason this shows up on i686 only:
src/udev/udev-builtin-usb_id.c:192:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
|
|
|
|
This function was removed in v183, so drop it from the symbols
versioning file.
|
|
It's only needed for static linking.
https://bugs.freedesktop.org/show_bug.cgi?id=63309
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
This corrects a previously applied commit for upstream's
acd42fae59096d84e78f1c17bfcc0d8f96486341
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Remove special handling of device link by Sievers.
Remove legacy respecting code by Basile.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=57206
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
This fixes two issues: 1) The -r option does not exist for busybox
and we do not need relative sym linking anyhow, and 2) if the
sym link already exists, we want to overwrite it, hence -f.
X-Eudev-Bug: 58
X-Eudev-Bug-URL: https://github.com/gentoo/eudev/issues/58
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
This fixes:
https://github.com/gentoo/eudev/issues/55
https://bugs.freedesktop.org/show_bug.cgi?id=62864
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
This code was dropped while importing from upstream. It is needed
to allow the legacy renaming of interfaces like eth* or wlan*.
X-Eudev-Bug: 56
X-Eudev-Bug-URL: https://github.com/gentoo/eudev/issues/56
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
The installation was overwriting udevadm when building with
--sbindir=/usr/bin and ignoring $bindir. Both situations lead
to a symlink which points to nowhere.
Thanks TZ86.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Libudev has a symbol version for 199 now, so the libudev_internal
version (which is used to essentially hide symbols that are not
part of the external API) needs to use 199 as its baseline instead
of 196
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|
|
This error was introduced in our commit
601c4e8ce69338652b3c9178386cbc05de8bae8d
when importing from upstream. The revert line works only
in the context of all of upstream's commit
7850b3b83791ba0e2377ba40383c5abc258b839d
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Wraps the changes made in systemd commits 5ae18ddc and 53726349
with a #if's on LIBUDEV_LEGACY_VERSION so that old behaviour
can be chosen at build-time if users find it necessary to support
legacy software dependent on the original behaviour
Original Authors:
Kay Sievers
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
configure.ac has AC_PROG_LN_S already so we should use it.
upstream did this in commit 783162123dbac43d5b7a3fab9d4f11dcf86d06e1
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Follow upstream commit f432bb914499e2c28b43f592bb273f0a8664f352
but refactor the patch for eudev build system. Provide a
compatibility symlink in sbindir for anything that hard-codes
the path to udevadm
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|
|
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|
|
Avoid two evaluations of src in util_strpcpy clean the code in the ones
where the pointer passed is not modified and merge the main loop of
util_strpcpyl and util_strscpyl into util_strpcpyv. Also make strpcpy
more compact by removing some unnecessary arithmetic.
Cleanup util_strpcpyv by shortcutting size == 0 case
Do some style fixups
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|
|
This updates the daemon codebase to upstream.
Authors:
Zbigniew Jędrzejewski-Szmek
Lennart Poettering
Václav Pavlín
Kay Sievers
Harald Hoyer
Rob Clark
Zeeshan Ali (Khattak)
See http://cgit.freedesktop.org/systemd/systemd/log/src/udev
Ian is signing off but has some concerns on a few of the changes
that he may fix in future commits.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|
|
Based on a coverity warning.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|
|
This updates the library codebase to upstream version 199.
(originally merged by Anthony G. Basile <blueness@gentoo.org>)
Upstream commits 5ae18ddc0d and 53726349e1 are not applied,
code will be excluded via #if...#endif in a future commit
Authors:
Kay Sievers
Thomas Hindoe Paaboel Andersen
Hannes Reinecke
Jan Engelhardt
See http://cgit.freedesktop.org/systemd/systemd/log/src/libudev
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|
|
Distros that whish to support old kernels should set
--with-firmware-dirs="/usr/lib/firmware/updates:/usr/lib/firmware"
to retain the old behaviour.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|