Commit Graph

10404 Commits

Author SHA1 Message Date
Peter Hutterer
fd378a7680 hwdb: add rule and first entry for PS/2 mice
https://bugs.freedesktop.org/show_bug.cgi?id=87037

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29 11:42:46 -05:00
Frank Theile
8c72ad4772 hwdb: Microsoft Wireless Laser Mouse 8000 DPI data
https://bugs.freedesktop.org/show_bug.cgi?id=87587

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29 11:41:42 -05:00
Frank Theile
095677014d hwdb: Lenovo USB mouse MO28UOL DPI data
https://bugs.freedesktop.org/show_bug.cgi?id=87504

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29 11:41:04 -05:00
Zbigniew Jędrzejewski-Szmek
487a8b2adc ata_id: remove temp variable to kill warning
src/ata_id/ata_id.c:503:24: warning: assignment from incompatible pointer type
         identify_words = &identify.wyde;
                        ^

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29 11:31:39 -05:00
Zbigniew Jędrzejewski-Szmek
379131ea37 ata_id: modernize
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29 11:30:21 -05:00
Shawn Paul Landden
3b2aa6c673 udev: fix another strict aliasing issue
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29 11:06:48 -05:00
Shawn Paul Landden
96ce74918f util: fix strict aliasing violations in use of struct inotify_event v5
There is alot of cleanup that will have to happen to turn on
-fstrict-aliasing, but I think our code should be "correct" to the rule.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29 11:05:19 -05:00
Anthony G. Basile
9d06e65608 man/udev.xml: restore hwdb documentation 2014-12-20 11:45:25 -05:00
Anthony G. Basile
1e1eddac8d hwdb/60-keyboard.hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 11:16:24 -05:00
Zbigniew Jędrzejewski-Szmek
288e4abc01 hwdb: move Logitech mouse to the right spot
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 11:13:02 -05:00
Erik Auerswald
9d31c53dbf hwdb: Logitech, Inc. RX 250 Optical Mouse DPI data
https://bugs.freedesktop.org/show_bug.cgi?id=87435

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 11:12:28 -05:00
Tim JP
526ff8804d hwdb: Logitech, Inc. RX 300 Optical Mouse DPI data
https://bugs.freedesktop.org/show_bug.cgi?id=87456

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 11:11:28 -05:00
Lennart Poettering
5c069ee466 util: rename ignore_file() to hidden_file()
hidden_file() is a bit more precise, since dot files usually shouldn't
be ignored, but certainly be considered hidden.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 11:07:06 -05:00
Lennart Poettering
1ebbd90911 util: when creating temporary filename for atomic creation of files, add an extra "#" to the name
That way, we have a simple, somewhat reliable way to detect such
temporary files, by simply checking if they start with ".#".

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 10:58:19 -05:00
Zbigniew Jędrzejewski-Szmek
fcaebcecdb Treat a trailing backslash as an error
Commit a2a5291b3f5 changed the parser to reject unfinished quoted
strings. Unfortunately it introduced an error where a trailing
backslash would case an infinite loop. Of course this must fixed, but
the question is what to to instead. Allowing trailing backslashes and
treating them as normal characters would be one option, but this seems
suboptimal. First, there would be inconsistency between handling of
quoting and of backslashes. Second, a trailing backslash is most
likely an error, at it seems better to point it out to the user than
to try to continue.

Updated rules:
ExecStart=/bin/echo \\ → OK, prints a backslash
ExecStart=/bin/echo \ → error
ExecStart=/bin/echo "x → error
ExecStart=/bin/echo "x"y → error

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 10:32:25 -05:00
Dave Reisner
39e51a3488 path-util: fix breakage in path_is_mount_point
This fixes 2 problems introduced by 6feeeab0bc:

1) If name_to_handle_at returns ENOSYS for the child, we'll wrongly
return -ENOSYS when it returns the same for the parent. Immediately
jump to the fallback logic when we get ENOSYS.

2) If name_to_handle_at returns EOPNOTSUPP for the child but suceeds
for the parent, we'll be comparing an uninitialized value (mount_id) to
an initialized value (mount_id_parent). Initialize the mount_id
variables to invalid mount_ids to avoid this.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 10:28:13 -05:00
Zbigniew Jędrzejewski-Szmek
b5a7205f6e path: make the check for unsupported name_to_handle_at symmetric
If child supports, but the parent does not, or when the child does
not support, but the parent does, assume the child is a mount point.

Only if neither supports use the fallback.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 10:26:02 -05:00
Umut Tezduyar Lindskog
a2092eadcc path: follow symbolic link for parent path (2)
c0e57ba9e22ee937722958d8b912ade2a37f206d fixed the fallback path.
We should do the same for name_to_handle_at().

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 10:21:48 -05:00
Umut Tezduyar Lindskog
691bd2810b path: follow symbolic link for parent path
[zj: When we lstat the target path, symlinks above the last component
     will be followed by both stat and lstat. So when we look at the
     parent, we should follow symlinks.]

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 10:11:13 -05:00
Tom Gundersen
0ec88a3573 shared: strv - add strv_clear()
This frees the elements of the strv without freeing the strv itself.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 10:08:23 -05:00
Tom Gundersen
8170dcd369 shared: path-util - memory leak
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 10:05:27 -05:00
Susant Sahani
853a86e6a9 fix compiler warning
src/shared/utf8.c:268:13: warning: unused variable 'd'
[-Wunused-variable]
         int d;
2014-12-20 10:04:48 -05:00
Anthony G. Basile
c74cee5a9b src/shared/util.c: fix tempfn_xxxxxx()
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 10:00:36 -05:00
Michal Schmidt
4ccd9baa59 configure.ac: add a generic --enable-debug, replace --enable-hashmap-debug
There will be more debugging options later.
 --enable-debug will enable them all.
 --enable-debug=hashmap will enable only hashmap debugging.

Also rename the C #define to ENABLE_DEBUG_* pattern.

NOTE: We add the debugging code to hashmap.{c,h} but do not
add the option in configure.ac.  We may do so at a later time.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 09:25:37 -05:00
Lennart Poettering
3f006fb44d src/shared/utf8.c: follow upstream adding utf8_encode_unichar()
This is part of upstream's e7eebcfc42f00aa481ef31abc8e7e243c16f5b2c
in which they add a minimal JSON tokenizer.  We don't add that but
update utf8 stuff from that commit to follow upstream more closely.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 09:19:11 -05:00
Michal Schmidt
87c9d285d2 shared/hashmap.h: fix comment
An early version used underscore prefixes for internal functions, but
the current version uses the prefix "internal_".

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 09:12:48 -05:00
Lennart Poettering
b0c70c543d src/shared/util.c: follow upstream on tempfn_xxxxxx()
Upstream change the behaviour of tempfn_xxxxxx() to make
the following work:

    # systemd-nspawn -xb -D / -M foobar

in commit c4e34a612c81266773cf8358cb38a43d2e43474e.  We
have no reason not to follow that change even though
eudev has nothing to do with nspawn.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 09:09:07 -05:00
Lennart Poettering
12586b6a8a util: minor simplification for loop_write() and loop_read()
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 08:58:04 -05:00
Lennart Poettering
c26b217d91 util: when using basename() for creating temporary files, verify the resulting name is actually valid
Also, rename filename_is_safe() to filename_is_valid(), since it
actually does a full validation for what the kernel will accept as file
name, it's not just a heuristic.

NOTE: eudev doesn't have filename_is_safe() -- AGB

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20 08:50:52 -05:00
Lennart Poettering
6b16cd5fed path-util: no need to check whether p is absolute twice
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-17 14:47:29 -05:00
Gabriel de Perthuis
c93ec252df blkid: Warn when rejecting a superblock with a bad csum
Bump libblkid requirement from 2.20 to 2.24.
util-linux 2.25 is actually required since fdbbad981cc5da8bb4ed7e9b6646e7a114745ec5

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-17 14:37:25 -05:00
Lennart Poettering
411ec4713b udev-builtin-btrfs: properly initialize ioctl struct to zeroes
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-17 14:32:39 -05:00
Thomas Hindoe Paaboel Andersen
fdb139feed use correct format types
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-17 14:28:47 -05:00
Marc Schmitzer
c01838a8db hwdb: add Lenovo 3000 N200 special key
https://bugs.freedesktop.org/show_bug.cgi?id=87377

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-17 14:23:47 -05:00
Peter Hutterer
cef254435c hwdb: Logitech MX1000, another Lenovo USB mouse
Provided by Benjamin Bellec

https://bugs.freedesktop.org/show_bug.cgi?id=87343

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-17 14:22:46 -05:00
Peter Hutterer
4255a0267f hwdb: more an entry for the MS Sculpt Ergonomic
Note that the MS receivers likely work like the Logitech ones, i.e. all
devices connected show up with the same vid/pid/name. Full evidence remains to
be gathered.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-17 14:22:04 -05:00
Daniel Mack
6701bca683 hwdb: fix ordering
We sort by default DPI, not the first one in the list.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-17 14:21:26 -05:00
Daniel Mack
1e40ba9756 hwdb: Logitech G400s
Provided by Peter Hutterer:

  https://bugs.freedesktop.org/show_bug.cgi?id=87332

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-17 14:20:46 -05:00
Harald Hoyer
0c0e1571b8 hwdb: Logitech MX 518
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-17 14:19:39 -05:00
Zbigniew Jędrzejewski-Szmek
b0c9fe1f49 hwdb: add more mice
https://bugs.freedesktop.org/show_bug.cgi?id=87271

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-17 14:18:56 -05:00
Zbigniew Jędrzejewski-Szmek
b3943faca5 hwdb: sort mice by brand,type,dpi,frequency
This way entries from the same brand with the same dpi and frequency
can be coalesced. It is also visually easier to find the right DPI
than order hexadecimal identifiers.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-17 14:17:58 -05:00
Marcel Holtmann
260e4b3a87 hwdb: Update database of Bluetooth company identifiers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-17 14:14:49 -05:00
Lennart Poettering
11d61581aa core: unify how we iterate over inotify events
Let's add some syntactic sugar for iterating through inotify events, and
use it everywhere.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-11 13:45:16 -05:00
Torstein Husebø
96ed47b845 treewide: correct spacing near eol in code comments
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-11 13:33:10 -05:00
Torstein Husebø
9dca886fc2 hwdb: fix typo
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-11 11:18:25 -05:00
Lennart Poettering
94991570b1 hwdb: add two more mice to the DPI database
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-11 11:17:24 -05:00
Lennart Poettering
3f67592ea1 hwdb: add another Logitech mouse (M-BZ96C)
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-11 11:16:38 -05:00
Lennart Poettering
c1a53aba66 hwdb: add DPI data for M325 mouse
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-11 11:16:04 -05:00
Lennart Poettering
aa7b989905 hwdb: update PCI, USB, OUI databases
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-11 11:15:20 -05:00
Peter Hutterer
16e3cb106e hwdb: add more mouse DPI entries
Plus a note for Logitech devices using the unified receiver: these devices
include their wireless PID in the name, the usb PID/VID is the same for all.
In kernel 3.19 the actual model number will be the name, but the patches are
still a bit in flux at this point. In the future each device will need two
entries for pre+3.19 and 3.19.

https://bugs.freedesktop.org/show_bug.cgi?id=87037
https://bugs.freedesktop.org/show_bug.cgi?id=87072
https://bugs.freedesktop.org/show_bug.cgi?id=87162

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-11 11:14:53 -05:00