Age | Commit message (Collapse) | Author |
|
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>
|
|
We originally only supported the BMP (i.e., we treated UTF-16 as UCS-2).
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Originally we only supported ucs2, so move the ucs4 version from libsystemd-terminal to shared
and use that everywhere.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
c0e57ba9e22ee937722958d8b912ade2a37f206d fixed the fallback path.
We should do the same for name_to_handle_at().
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
[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>
|
|
This frees the elements of the strv without freeing the strv itself.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
src/shared/utf8.c:268:13: warning: unused variable 'd'
[-Wunused-variable]
int d;
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Let's add some syntactic sugar for iterating through inotify events, and
use it everywhere.
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>
|
|
We need original socket_fd around otherwise mac_selinux_get_child_mls_label
fails with -EINVAL return code. Also don't call setexeccon twice but rather pass
context value of SELinuxContext option as an extra argument.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
environ is already defined in unistd.h
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
This patch changes the naming scheme for sas disks. The original names used
disk's sas address and lun, the new scheme uses sas address of the
nearest expander (if available) and a phy id of the used connection.
If no expander is used, the phy id of hba phy is used.
Note that names that refer to RAID or other abstract devices are
unchanged.
Name in raid configuration:
hba_pci_address-sas-raid_sas_address-lunY-partZ
Name in expander bare disk configuration:
hba_pci_address-sas-expander_sas_address-phyX-lunY-partZ
Name format without expanders:
hba_pci_address-sas-phyX-lunY-partZ
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
udev_device_new_from_syspath()
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Also accept '\r' as newline character.
This dropps warnings of the type:
invalid key/value pair in file /usr/lib/udev/rules.d/40-usb-media-players.rules
on line 26, starting at character 25 ('')
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
The current code would print the character following the first invalid
character.
Given an udev rules-file without a trailing newline we would otherwise print
garbage:
invalid key/value pair in file /usr/lib/udev/rules.d/40-usb-media-players.rules
on line 26, starting at character 25 ('m')
This is now changed to print
invalid key/value pair in file /usr/lib/udev/rules.d/40-usb-media-players.rules
on line 26, starting at character 25 ('')
(still not very good as printing \0 just gives the empty string)
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Currently a property in the form of
FOO=bar
is stored as " FOO=bar", i.e. the property name contains a leading space.
That's quite hard to spot.
This patch discards all extra whitespaces but the first one which is required
by libudev's hwdb_add_property.
[zj: modify the check a bit]
https://bugs.freedesktop.org/show_bug.cgi?id=82311
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>
|
|
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno
+ return simplifications".
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
On the contrary of env, the added function returns all characters
cescaped, because it improves reproducibility.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|