Commit Graph

9857 Commits

Author SHA1 Message Date
Anthony G. Basile
c36cba5bc1 Remove unused functions from 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>
2013-06-05 19:20:52 -04:00
Anthony G. Basile
58daf39a6c src/libudev/cgroup-util.{c,h}: bring in line with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-04 20:50:24 -04:00
Anthony G. Basile
730b8403f9 src/libudev/hashmap.{c,h}: bring in line with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-04 13:17:54 -04:00
Anthony G. Basile
f7ba1295c3 src/libudev/conf-files.{c,h}: bring in line with upstream 2013-06-04 13:12:41 -04:00
Anthony G. Basile
3eca306a92 src/libudev/log.{c,h}: bring in line with upstream 2013-06-04 13:04:12 -04:00
Anthony G. Basile
6ca44589b0 src/libudev/strv.{c,h}: bring in line with upstream
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>
2013-06-04 12:53:32 -04:00
Anthony G. Basile
fcb3dc9265 src/libudev/strbuf.c: bring in line with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-04 12:31:44 -04:00
Anthony G. Basile
321aee618d src/libudev/{exit-status,macro,missing}.h: bring in line with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-04 12:06:38 -04:00
Anthony G. Basile
fe41df0313 src/libudev/socket-util.h: slim down
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-04 11:47:41 -04:00
Anthony G. Basile
d347f1c510 src/libudev/util.c: bring in line with upstream
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>
2013-06-04 11:45:41 -04:00
Anthony G. Basile
00e01c3841 src/libudev/path-util.c: bring in line with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-04 08:02:34 -04:00
Anthony G. Basile
1cc8667cd9 Remove libudev-legacy
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-04 05:41:20 -04:00
Anthony G. Basile
813ad77ebb rules/95-keymap.rules: move comment since udev-test.pl fails otherwise
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-03 10:43:55 -04:00
Anthony G. Basile
80000b8639 test/udev-test.pl: fix a spelling error 2013-06-03 09:42:36 -04:00
Anthony G. Basile
4be873f22e rules: bring some rules up to date with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-03 09:36:55 -04:00
Martin Pitt
d692ac406b keymap: Add DIXONSP
https://launchpad.net/bugs/1157334
2013-06-03 09:27:15 -04:00
Martin Pitt
d1877a787c keymap: Add BenQ JoyBook
https://launchpad.net/bugs/727139
2013-06-03 09:17:04 -04:00
Martin Pitt
168b1295f9 keymap: Add Samsung 900XC3
https://launchpad.net/bugs/1012365
2013-06-03 09:15:20 -04:00
Johan Heikkilä
b557cd94be keymap: Add support for Eject button on MSI GE60/GE70 2013-06-03 09:11:53 -04:00
Ville Skyttä
8ea0e39f1f keymap/findkeyboards: avoid throwaway attribute-walk 2013-06-03 09:09:27 -04:00
Zbigniew Jędrzejewski-Szmek
49799c750d Add printf attributes in exported headers
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.
2013-06-03 09:05:34 -04:00
Zbigniew Jędrzejewski-Szmek
7772dedbcf Standarize on one spelling of symlink error message
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>
2013-06-03 09:01:02 -04:00
Anthony G. Basile
09376a932b Move remaining _cleanup_free_ in front of type
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-03 08:57:49 -04:00
Anthony G. Basile
2e16351ec5 src/libudev/libudev-device.c: fix typo
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-03 08:45:50 -04:00
Anatol Pomozov
0d0e9310f6 src/udev/udev-rules.c: fix a spelling error
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 13:28:55 -04:00
Zbigniew Jędrzejewski-Szmek
16c008bed0 udev/ata_id: zero out variable properly
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.
2013-06-02 13:04:54 -04:00
Zbigniew Jędrzejewski-Szmek
146d55e60a udev/ata_id: use initalization instead of explicit zeroing 2013-06-02 13:03:10 -04:00
Martin Pitt
10f991d6a9 rules/95-keymap.rules: fix typo
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 13:00:59 -04:00
Harald Hoyer
ca5fc30e5a udev/udev-ctrl.c:udev_ctrl_new_from_fd() enable SO_PASSCRED
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>
2013-06-02 12:57:36 -04:00
Zbigniew Jędrzejewski-Szmek
786cd8191b Use initalization instead of explicit zeroing
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>
2013-06-02 12:50:56 -04:00
Zbigniew Jędrzejewski-Szmek
669bfbaead udevadm: do not free node on success
A fix for ff03aed06a422.
2013-06-02 12:47:07 -04:00
Zbigniew Jędrzejewski-Szmek
7e85521337 udev-builtin-usb_id: avoid comparison of unsigned and ssize_t
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]
2013-06-02 12:45:24 -04:00
Zbigniew Jędrzejewski-Szmek
c7b0400c80 udevadm-hwdb: avoid leak in error path 2013-06-02 12:39:29 -04:00
Michael Biebl
57f2c181f7 libudev: remove udev_monitor_new_from_socket() symbol
This function was removed in v183, so drop it from the symbols
versioning file.
2013-06-02 12:17:28 -04:00
Michael Biebl
e6af18333f libudev: Move -lrt to Libs.private
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>
2013-06-02 12:16:15 -04:00
Anthony G. Basile
2a0f2910b1 Correct missing int to size_t change
This corrects a previously applied commit for upstream's

  acd42fae59096d84e78f1c17bfcc0d8f96486341

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 12:12:14 -04:00
Kay Sievers
adb162e7ef libude: remove special handling of "device" link and legacy respecting code
Remove special handling of device link by Sievers.
Remove legacy respecting code by Basile.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 12:02:42 -04:00
Hannes Reinecke
ebcfcd41ac libudev: implement udev_device_set_attribute_value()
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 11:42:02 -04:00
Martin Pitt
ebbcb55a2d keymap: Add Logitech USB (iTouch)
https://launchpad.net/bugs/1152377

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 11:25:06 -04:00
Pali Rohar
c4b8f8a920 keymap: Add HP EliteBook 8460p
Taken from
https://code.launchpad.net/~pali/ubuntu/raring/udev/hp-elitebook-8460p/+merge/157420

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 11:23:20 -04:00
Kay Sievers
6734988f4e hwdb: update 2013-06-02 10:50:26 -04:00
Kay Sievers
0470cf474d hwdb: update 2013-06-02 10:49:52 -04:00
Kay Sievers
00c2d89e7b hwdb: update 2013-06-02 10:49:10 -04:00
Kay Sievers
ae88f88db0 hwdb: update 2013-06-02 10:48:32 -04:00
Sami Kerola
9c00864f98 licence: remove references to old FSF address
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=57206

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 10:30:02 -04:00
Anthony G. Basile
ed844d28c4 src/udev/Makefile.am: do not fail if sym link already exists
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>
2013-04-21 18:24:39 -04:00
Anthony G. Basile
1fcf167f65 Version bump to eudev-1_beta4
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-10 22:11:37 -04:00
Kay Sievers
faed3b5ff1 build-sys: fix HAVE/ENABLE_FIRMWARE
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>
2013-04-09 17:47:19 -04:00
Anthony G. Basile
ab0a37ddcf rules/Makefile.am: conditionally install 80-net-name-slot.rules
We do not want to install 80-net-name-slot.rules if we
--enable-rule-generator.  In fact doing so will switch to
the predictable network interface names.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-09 12:22:42 -04:00
Anthony G. Basile
215c4a0faa rules/40-mem-null.rules: coalesce with rules/50-udev-default.rules
There is no reason to keep this rule separate and it works fine
when incuded in 50-udev-default.rules.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-07 22:52:39 -04:00