Commit Graph

9888 Commits

Author SHA1 Message Date
Kay Sievers
e92a5c88fc hwdb: remove too broad PNP* match from 20-acpi-vendor.hwdb 2013-07-09 03:13:09 -04:00
Kay Sievers
3b94a10e35 hwdb: update
This is upstream commit 07125a9240088f7859b18908cc7d07e396947e24

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-09 03:11:28 -04:00
Anthony G. Basile
5d2c61c397 src/libudev/libudev-private.h: add missing include strxcpyx.h
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 12:19:12 -04:00
Kay Sievers
7a3bcc197c hwdb: allow to query arbitrary keys
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 12:13:45 -04:00
Kay Sievers
36cac2c40f hwdb: add --device=<device-id> and --filter=<key name glob>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 12:12:45 -04:00
Kay Sievers
86d0542d34 hwdb: remove support for (not fully implemented) conditional properties
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 12:04:06 -04:00
Anthony G. Basile
c9096d0490 Add sanity checks to paths in cgroup-util.c
This is part of upstream commit

	9444b1f20e311f073864d81e913bd4f32fe95cfd

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 11:44:52 -04:00
Zbigniew Jędrzejewski-Szmek
68db594ba6 dev-setup: do not create a dangling /proc/kcore symlink
https://bugs.freedesktop.org/show_bug.cgi?id=65382
https://bugs.gentoo.org/472060?id=472060
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 11:22:02 -04:00
Anthony G. Basile
faa1ff8ef8 Import strxcpyx from upstream
This commit imports strxcpyx from upstream.  This is upstream commit

    d5a89d7dc17a5ba5cf4fc71f82963c5c94a31c3d

Note: there were also some very minor code cleanups to

	accelerometer.c: line 187
	collect.c: lines 35, 140
	libudev-device.c: line 780
	libudev-hwdb.c: line 300

These are part of upstream commits:

	507f22bd0172bff5e5d98145b1419bd472a2c57f
	3cf7b686e6b29f78de0af5929602cae4482f6d49
	67410e9f73a6cdd8453c78b966451b5151def14a

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07 11:16:55 -04:00
Anthony G. Basile
44e6f1bc1a test: improve test-udev.c
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-06 23:13:39 -04:00
Anthony G. Basile
8b06a435cc rules: updates from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-06 23:02:06 -04:00
Anthony G. Basile
1c88925eee keymaps, keymaps-force-release: updates from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-06 22:52:03 -04:00
Anthony G. Basile
c8cdca5d5c hwdb: update from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-06 22:46:29 -04:00
Ian Stakenvicius
3909dfd26c create /etc/udev/rules.d target on install
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-07-03 14:14:29 -04:00
andrew-aladev
42e8bb6f12 rule_generator/rule_generator.functions: fix net rule generator
`udevadm info --run` no longer returns the correct run directory
 so we hard code it as "/run/udev/"

X-Gentoo-Bug: 475276
X-Gentoo-Bug-URL: https://bugs.gentoo.org/475276
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-01 12:57:38 -04:00
Anthony G. Basile
b722b49e9e src/udev/udev-ctrl.c: restore accept4_fallback code
This code was accidentally removed in commit

    601c4e8ce6

We restore it here.  Since most modern systems have accept4()
this code will seldom be triggered.  You can test by configuring
as follows:

    ac_cv_have_decl_accept4="no" ./configure

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-29 13:36:01 -04:00
Sean McGovern
983cecd795 udev: handle network controllers in nonstandard domains
Onboard network controllers are not always on PCI domain 0.

[Kay: use int instead of long, add [P] to slot naming, remove sysname var]

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-26 14:15:52 -04:00
Martin Pitt
98cddf4cb7 keymap: Apply to all Latitude and Precision models
https://launchpad.net/bugs/1193147

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-26 14:07:36 -04:00
Jan Janssen
b61630e3cf libudev: Use correct type for sizeof
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-26 14:04:18 -04:00
Zbigniew Jędrzejewski-Szmek
ff93c898bc man: always supply quotes around literals
When manpages are displayed on a terminal, <literal>s are indistinguishable
from surrounding text. Add quotes everywhere, remove duplicate quotes,
and tweak a few lists for consistent formatting.

https://bugzilla.redhat.com/show_bug.cgi?id=874631

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-26 14:02:06 -04:00
Anthony G. Basile
5ec82b08d4 man/udev.xml: minor cleanup
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-26 13:57:29 -04:00
Anthony G. Basile
65a2b36600 src/libudev/log.c: remove uneeded #include <printf.h>
This header is unnecessary and causes a buildtime error on musl.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-15 16:04:11 -04:00
Anthony G. Basile
604b9042e3 Version bump to 1.0, dropping _beta tag
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-09 05:08:04 -04:00
Anthony G. Basile
1eaa837ba6 Round 2 of remove unused DECLS from src/libudev/{ioprio,log,macro,set,strv}
Remove the following unused DECLS:

  IOPRIO_BITS
  IOPRIO_CLASS_SHIFT
  IOPRIO_PRIO_MASK
  IOPRIO_PRIO_CLASS
  IOPRIO_PRIO_DATA
  IOPRIO_PRIO_VALUE
  ioprio_valid
  IOPRIO_BE_NR
  IOPRIO_WHO_PROCESS
  IOPRIO_WHO_PGRP
  IOPRIO_WHO_USER
  MESSAGE_ID
  EXIT_TEST_SKIP
  XSTRINGIFY
  STRINGIFY
  ALIGN_PTR
  ALIGN4_PTR
  ALIGN8_PTR
  MAX
  MAX3
  MIN
  CLAMP
  zero
  CHAR_TO_STR
  VA_FORMAT_ADVANCE
  SET_FLAG
  SET_FOREACH
  SET_FOREACH_BACKWARDS
  STRV_FOREACH_BACKWARDS
  STRV_FOREACH_PAIR
  _unused_
  _destructor_
  _deprecated_
  _weak_
  _hidden_
  _weakref_
  _introspect_
  _alignas_

Remove the following unused static inline functions:

  static inline int ioprio_set
  static inline int ioprio_get
  static inline const char* STRV_IFNOTNULL

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-06 21:03:42 -04:00
Anthony G. Basile
f90cec7e84 Fix ordering of params for conf_files_list_strv
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-06 18:35:30 -04:00
Anthony G. Basile
74b55d4d6d Remove unused DECLS from src/libudev/{conf-files,def,exit-status,hashmap,util}.h
The following unused DECLS are removed:

  DEFAULT_TIMEOUT_USEC
  DEFAULT_RESTART_USEC
  DEFAULT_CONFIRM_USEC
  DEFAULT_EXIT_USEC
  SIGNALS_CRASH_HANDLER
  SIGNALS_IGNORE
  EXIT_INVALIDARGUMENT
  EXIT_NOTIMPLEMENTED
  EXIT_NOPERMISSION
  EXIT_NOTINSTALLED
  EXIT_NOTCONFIGURED
  EXIT_NOTRUNNING
  EXIT_CHDIR
  EXIT_NICE
  EXIT_FDS
  EXIT_EXEC
  EXIT_MEMORY
  EXIT_LIMITS
  EXIT_OOM_ADJUST
  EXIT_SIGNAL_MASK
  EXIT_STDIN
  EXIT_STDOUT
  EXIT_CHROOT
  EXIT_IOPRI
  EXIT_TIMERSLACK
  EXIT_SECUREBITS
  EXIT_SETSCHEDULER
  EXIT_CPUAFFINITY
  EXIT_GROUP
  EXIT_USER
  EXIT_CAPABILITIES
  EXIT_CGROUP
  EXIT_SETSID
  EXIT_CONFIRM
  EXIT_STDERR
  EXIT_TCPWRAP
  EXIT_PAM
  EXIT_NETWORK
  EXIT_NAMESPACE
  EXIT_NO_NEW_PRIVILEGES
  EXIT_SECCOMP
  EXIT_STATUS_MINIMAL
  EXIT_STATUS_SYSTEMD
  EXIT_STATUS_LSB
  EXIT_STATUS_FULL
  HASHMAP_FOREACH_KEY
  HASHMAP_FOREACH_BACKWARDS
  FORMAT_TIMESTAMP_MAX
  FORMAT_TIMESTAMP_PRETTY_MAX
  FORMAT_TIMESPAN_MAX
  FORMAT_BYTES_MAX
  ANSI_HIGHLIGHT_ON
  ANSI_RED_ON
  ANSI_HIGHLIGHT_RED_ON
  dual_timestamp_is_set
  newa
  newdup
  FOREACH_WORD
  FOREACH_WORD_SEPARATOR
  NULSTR_FOREACH
  _cleanup_pclose_
  _cleanup_umask_
  _cleanup_globfree_
  DRAW_TREE_VERT
  DRAW_TREE_BRANCH
  DRAW_TREE_RIGHT
  DRAW_TREE_SPACE
  DRAW_TRIANGULAR_BULLET
  _DRAW_SPECIAL_CHAR_MAX
  FOREACH_LINE
  procfs_file_alloca

The following unused struct defs were removed:

  struct ExitStatusSet

The following unused static inline funcs were remvoed:

  static inline int safe_atolu
  static inline int safe_atoli
  static inline int safe_atolu
  static inline int safe_atoli
  static inline int safe_atou32
  static inline int safe_atoi32
  static inline int safe_atou64
  static inline int safe_atoi64
  static inline const char* yes_no
  static inline const char* strempty
  static inline const char* strnull
  static inline const char *strna
  static inline void pclosep
  static inline void umaskp

NOTE: Some unused DECLS were retained if they formed part of a logical
series, eg. definition of time units.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-06 18:19:05 -04:00
Anthony G. Basile
afe76217f9 Round 4 of remove unused functions from src/libudev/{hashmap,log,set,util}.c
We removed the following functions:

  hashmap_merge
  path_is_read_only_fs
  set_free_free
  set_free_freep
  readlink_malloc
  hexchar
  unhexchar
  octchar
  unoctchar
  format_timespan

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-06 10:39:11 -04:00
Anthony G. Basile
6f8f3edfe8 Round 3 of remove unused functions from src/libudev/{conf-files,hashmap,util}
The following functions were removed:
  strv_env_get_n
  strv_env_get
  conf_files_list
  hashmap_remove
  hashmap_move
  log_dump_internal
  parse_uid
  read_full_file
  strstrip
  file_in_same_dir
  cunescape
  cunescape_length
  cunescape_length_with_prefix
  xescape
  dirent_is_file
  close_all_fds
  read_one_char
  ask
  reset_terminal_fd
  reset_terminal
  flush_fd
  loop_read
  get_ctty_devnr
  get_ctty
  rm_rf_children
  rm_rf_children_dangerous
  rm_rf
  status_vprintf
  fd_columns
  columns
  fd_lines
  lines
  on_tty
  ellipsize
  ellipsize_mem
  touch
  unquote
  resolve_dev_console
  tty_is_vc
  vtnr_from_tty
  terminal_vhangup_fd
  terminal_vhangup
  file_is_priv_sticky
  signal_from_string
  fd_wait_for_event
  memdup
  memdup_multiply

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-06 00:18:45 -04:00
Anthony G. Basile
ac6af14544 Round 2 of remove unused functions from src/libudev/{hashmap,log,path-util,set,strv,util}
We remove the following functions:

  cleanup_pool
  uint64_hash_func
  hashmap_ensure_allocated
  hashmap_clear_free_free
  hashmap_replace
  hashmap_remove_and_put
  hashmap_iterate_skip
  hashmap_first
  hashmap_first_key
  hashmap_last
  hashmap_isempty
  hashmap_move_one
  hashmap_copy
  log_metav_object
  log_show_color
  log_show_location
  path_strv_make_absolute_cwd
  path_startswith
  set_remove
  set_move
  set_clear
  strv_find
  strv_contains
  strv_merge
  strv_split
  strv_split_quoted
  strv_append
  strv_extend
  strv_push
  strv_split_nulstr
  str_compare
  dual_timestamp_get
  dual_timestamp_from_realtime
  timespec_store
  timeval_load
  timeval_store
  parse_boolean
  fchmod_umask
  parse_env_file
  get_process_comm
  get_process_id
  readlink_and_make_absolute
  bus_path_unescape
  format_timestamp
  acquire_terminal
  loop_write
  parse_usec
  make_stdio
  random_ull
  lookup_uid
  getttyname_malloc
  status_printf
  replace_env
  normalize_env_assignment
  wait_for_terminate
  freeze
  tag_to_udev_node
  tty_is_vc_resolve
  nulstr_contains
  strshorten
  hostname_valid_char
  display_is_local
  get_group_creds
  in_gid
  dirent_ensure_type
  is_locale_utf8

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-05 22:30:19 -04:00
Anthony G. Basile
b79c75f64b Remove unused functions from src/udev/{label,mkdir}
We remove the following unused functions:

  label_socket_set
  label_socket_clear
  label_free
  label_get_create_label_from_exe
  label_retest_selinux
  label_bind
  mkdir_label
  mkdir_safe
  mkdir_safe_label
  mkdir_p_label

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-05 21:04:15 -04:00
Anthony G. Basile
771f8ed258 Remove unused functions from src/libudev/util.c
We remove the following unused functions:

  ascii_strlower
  block_get_whole_disk
  bus_path_escape
  can_sleep
  can_sleep_disk
  cescape
  chars_intersect
  chvt
  close_many
  close_pipe
  columns_lines_cache_reset
  copy_file
  cpu_set_malloc
  decchar
  default_signals
  default_term_for_tty
  delete_chars
  dir_is_empty
  draw_special_char
  dual_timestamp_deserialize
  dual_timestamp_serialize
  execute_directory
  fchmod_and_fchown
  fd_cloexec
  fd_inc_rcvbuf
  fd_nonblock
  filename_is_safe
  first_word
  fork_agent
  format_bytes
  format_timestamp_pretty
  fstab_node_to_udev_node
  fstype_is_network
  getenv_for_pid
  get_files_in_directory
  get_home_dir
  gethostname_malloc
  getlogname_malloc
  get_parent_of_pid
  get_process_cmdline
  get_process_exe
  get_process_gid
  get_process_uid
  get_starttime_of_pid
  getttyname_harder
  get_user_creds
  getusername_malloc
  glob_exists
  hostname_cleanup
  hostname_is_set
  hostname_is_valid
  ignore_signals
  in_charset
  in_group
  in_search_path
  is_device_path
  is_kernel_thread
  is_valid_documentation_url
  kexec_loaded
  kill_and_sigcont
  load_env_file
  make_console_stdio
  make_null_stdio
  parse_bytes
  parse_nsec
  parse_pid
  parse_timestamp
  pipe_eof
  plymouth_running
  prot_from_flags
  readlink_and_canonicalize
  release_terminal
  rename_process
  replace_env_argv
  reset_all_signal_handlers
  rmdir_parents
  rm_rf_dangerous
  running_in_chroot
  setrlimit_closest
  sigaction_many
  signal_from_string_try_harder
  sigset_add_many
  socket_from_display
  startswith_no_case
  status_welcome
  strdup_or_null
  string_is_safe
  strreplace
  symlink_atomic
  tty_is_console
  undecchar
  vt_disallocate
  wait_for_terminate_and_warn
  warn_melody
  write_env_file
  write_one_line_file_atomic
  xopendirat

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-05 20:46:13 -04:00
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