Imported Upstream version 224

This commit is contained in:
Martin Pitt 2015-08-01 13:02:32 +02:00
parent 7035cd9e22
commit 5fd56512f6
80 changed files with 1536 additions and 834 deletions

1
.gitignore vendored
View File

@ -73,7 +73,6 @@
/systemd-debug-generator
/systemd-delta
/systemd-detect-virt
/systemd-efi-boot-generator
/systemd-escape
/systemd-export
/systemd-firstboot

View File

@ -91,7 +91,6 @@ MANPAGES += \
man/systemd-debug-generator.8 \
man/systemd-delta.1 \
man/systemd-detect-virt.1 \
man/systemd-efi-boot-generator.8 \
man/systemd-escape.1 \
man/systemd-fsck@.service.8 \
man/systemd-fstab-generator.8 \
@ -2304,7 +2303,6 @@ EXTRA_DIST += \
man/systemd-debug-generator.xml \
man/systemd-delta.xml \
man/systemd-detect-virt.xml \
man/systemd-efi-boot-generator.xml \
man/systemd-escape.xml \
man/systemd-firstboot.xml \
man/systemd-fsck@.service.xml \

View File

@ -43,7 +43,7 @@ LIBUDEV_REVISION=4
LIBUDEV_AGE=6
LIBSYSTEMD_CURRENT=10
LIBSYSTEMD_REVISION=0
LIBSYSTEMD_REVISION=1
LIBSYSTEMD_AGE=10
# The following four libraries only exist for compatibility reasons,
@ -2426,16 +2426,6 @@ EXTRA_DIST += \
# ------------------------------------------------------------------------------
if ENABLE_EFI
systemgenerator_PROGRAMS += \
systemd-efi-boot-generator
systemd_efi_boot_generator_SOURCES = \
src/efi-boot-generator/efi-boot-generator.c
systemd_efi_boot_generator_LDADD = \
libshared.la
# ------------------------------------------------------------------------------
if HAVE_BLKID
bootctl_SOURCES = \
src/boot/bootctl.c
@ -2529,13 +2519,15 @@ systemd_boot_headers = \
src/boot/efi/util.h \
src/boot/efi/console.h \
src/boot/efi/graphics.h \
src/boot/efi/pefile.h
src/boot/efi/pefile.h \
src/boot/efi/disk.h
systemd_boot_sources = \
src/boot/efi/util.c \
src/boot/efi/console.c \
src/boot/efi/graphics.c \
src/boot/efi/pefile.c \
src/boot/efi/disk.c \
src/boot/efi/boot.c
EXTRA_DIST += $(systemd_boot_sources) $(systemd_boot_headers)
@ -2568,6 +2560,7 @@ endif
stub_headers = \
src/boot/efi/util.h \
src/boot/efi/pefile.h \
src/boot/efi/disk.h \
src/boot/efi/graphics.h \
src/boot/efi/splash.h \
src/boot/efi/linux.h
@ -2575,6 +2568,7 @@ stub_headers = \
stub_sources = \
src/boot/efi/util.c \
src/boot/efi/pefile.c \
src/boot/efi/disk.c \
src/boot/efi/graphics.c \
src/boot/efi/splash.c \
src/boot/efi/linux.c \
@ -6024,12 +6018,12 @@ git-tag:
.PHONY: git-tar
git-tar:
git archive --format=tar --prefix=systemd-$(VERSION)/ HEAD | xz > systemd-$(VERSION).tar.xz
git archive --format=tar --prefix=systemd-$(VERSION)/ HEAD | gzip > systemd-$(VERSION).tar.gz
www_target = www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd
.PHONY: doc-sync
doc-sync: all destdir-sphinx
doc-sync: all
rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
.PHONY: gardel

34
NEWS
View File

@ -1,5 +1,20 @@
systemd System and Service Manager
CHANGES WITH 224:
* The systemd-efi-boot-generator functionality was merged into
systemd-gpt-auto-generator.
* systemd-networkd now supports Group Policy for vxlan devices. It can
be enabled via the new boolean configuration option called
'GroupPolicyExtension='.
Contributions from: Andreas Kempf, Christian Hesse, Daniel Mack, David
Herrmann, Herman Fries, Johannes Nixdorf, Kay Sievers, Lennart
Poettering, Peter Hutterer, Susant Sahani, Tom Gundersen
-- Berlin, 2015-07-31
CHANGES WITH 223:
* The python-systemd code has been removed from the systemd repository.
@ -53,16 +68,17 @@ CHANGES WITH 223:
mapped as 'vg-foo-TGID'.
Contributions from: Beniamino Galvani, cee1, Christian Hesse, Daniel
Buch, Daniel Mack, daurnimator, David Herrmann, Dimitri John Ledkov, Jan
Alexander Steffens (heftig), Johan Ouwerkerk, Jose Carlos Venegas Munoz,
Kay Sievers, Lennart Poettering, Lidong Zhong, Martin Pitt, Michael
Biebl, Michael Olbrich, Michal Schmidt, Mike Gilbert, Namhyung Kim, Nick
Owens, Peter Hutterer, Richard Maw, Steven Allen, Sungbae Yoo, Susant
Sahani, Thomas Blume, Thomas Hindoe Paaboel Andersen, Tom Gundersen,
Umut Tezduyar Lindskog, Vito Caputo, Vivenzio Pagliari, Zbigniew
Jędrzejewski-Szmek
Buch, Daniel Mack, daurnimator, David Herrmann, Dimitri John Ledkov,
HATAYAMA Daisuke, Ivan Shapovalov, Jan Alexander Steffens (heftig),
Johan Ouwerkerk, Jose Carlos Venegas Munoz, Karel Zak, Kay Sievers,
Lennart Poettering, Lidong Zhong, Martin Pitt, Michael Biebl, Michael
Olbrich, Michal Schmidt, Michal Sekletar, Mike Gilbert, Namhyung Kim,
Nick Owens, Peter Hutterer, Richard Maw, Steven Allen, Sungbae Yoo,
Susant Sahani, Thomas Blume, Thomas Hindoe Paaboel Andersen, Tom
Gundersen, Torstein Husebø, Umut Tezduyar Lindskog, Vito Caputo,
Vivenzio Pagliari, Zbigniew Jędrzejewski-Szmek
-- Berlin, 2015-XX-XX
-- Berlin, 2015-07-29
CHANGES WITH 222:

View File

@ -20,7 +20,7 @@
AC_PREREQ([2.64])
AC_INIT([systemd],
[223],
[224],
[http://github.com/systemd/systemd/issues],
[systemd],
[http://www.freedesktop.org/wiki/Software/systemd])
@ -1151,10 +1151,10 @@ AS_IF([test "x$enable_gnuefi" != "xno"], [
have_efi_lds=no
AC_ARG_WITH(efi-ldsdir,
AS_HELP_STRING([--with-efi-ldsdir=PATH], [Path to EFI lds directory]),
[EFI_LDS_DIR="$withval" && AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
[EFI_LDS_DIR="$withval" && AS_IF([test -f "${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds"],
[have_efi_lds=yes])],
[AS_FOR([DIR], [EFI_LDS_DIR], ["${EFI_LIB_DIR}/gnuefi" "${EFI_LIB_DIR}"],
[AC_CHECK_FILE([${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds],
[AS_IF([test -f "${EFI_LDS_DIR}/elf_${EFI_ARCH}_efi.lds"],
[have_efi_lds=yes && break])])])
AS_IF([test "x$have_efi_lds" = xyes],
[AC_SUBST([EFI_LDS_DIR])],

File diff suppressed because it is too large Load Diff

View File

@ -95,6 +95,9 @@ pci:v*d*sv*sd*bc02sc06*
pci:v*d*sv*sd*bc02sc07*
ID_PCI_SUBCLASS_FROM_DATABASE=Infiniband controller
pci:v*d*sv*sd*bc02sc08*
ID_PCI_SUBCLASS_FROM_DATABASE=Fabric controller
pci:v*d*sv*sd*bc02sc80*
ID_PCI_SUBCLASS_FROM_DATABASE=Network controller
@ -554,5 +557,8 @@ pci:v*d*sv*sd*bc12sc00*
pci:v*d*sv*sd*bc13*
ID_PCI_CLASS_FROM_DATABASE=Non-Essential Instrumentation
pci:v*d*sv*sd*bc40*
ID_PCI_CLASS_FROM_DATABASE=Coprocessor
pci:v*d*sv*sd*bcFF*
ID_PCI_CLASS_FROM_DATABASE=Unassigned class

View File

@ -1847,6 +1847,9 @@ pci:v00001002d00004151*
pci:v00001002d00004151sv00001043sd0000C004*
ID_MODEL_FROM_DATABASE=RV350 [Radeon 9600 Series] (A9600SE)
pci:v00001002d00004151sv0000174Bsd00007C37*
ID_MODEL_FROM_DATABASE=RV350 [Radeon 9600 Series] (Radeon 9600 SE)
pci:v00001002d00004152*
ID_MODEL_FROM_DATABASE=RV360 [Radeon 9600/X1050 Series]
@ -1934,6 +1937,9 @@ pci:v00001002d00004171*
pci:v00001002d00004171sv00001043sd0000C005*
ID_MODEL_FROM_DATABASE=RV350 [Radeon 9600] (Secondary) (A9600SE (Secondary))
pci:v00001002d00004171sv0000174Bsd00007C36*
ID_MODEL_FROM_DATABASE=RV350 [Radeon 9600] (Secondary) (Radeon 9600 SE (secondary))
pci:v00001002d00004172*
ID_MODEL_FROM_DATABASE=RV350 [Radeon 9600/X1050 Series] (Secondary)
@ -3422,6 +3428,9 @@ pci:v00001002d00005159sv0000148Csd00002003*
pci:v00001002d00005159sv0000148Csd00002023*
ID_MODEL_FROM_DATABASE=RV100 [Radeon 7000 / Radeon VE] (RV100 QY [Radeon 7000 Evil Master Multi-Display])
pci:v00001002d00005159sv0000148Csd00002081*
ID_MODEL_FROM_DATABASE=RV100 [Radeon 7000 / Radeon VE] (RV6DE)
pci:v00001002d00005159sv0000174Bsd00000280*
ID_MODEL_FROM_DATABASE=RV100 [Radeon 7000 / Radeon VE] (Radeon RV100 QY [Radeon 7000/VE])
@ -17060,6 +17069,9 @@ pci:v00001077d00002020*
pci:v00001077d00002031*
ID_MODEL_FROM_DATABASE=ISP8324-based 16Gb Fibre Channel to PCI Express Adapter
pci:v00001077d00002031sv0000103Csd00008002*
ID_MODEL_FROM_DATABASE=ISP8324-based 16Gb Fibre Channel to PCI Express Adapter (3830C 16G Fibre Channel Host Bus Adapter)
pci:v00001077d00002100*
ID_MODEL_FROM_DATABASE=QLA2100 64-bit Fibre Channel Adapter
@ -21335,6 +21347,12 @@ pci:v000010B5d00009656sv00001885sd00000700*
pci:v000010B5d00009656sv00001885sd00000701*
ID_MODEL_FROM_DATABASE=PCI9656 PCI <-> IOBus Bridge (Tsunami FPGA PMC with Altera Stratix S30)
pci:v000010B5d00009733*
ID_MODEL_FROM_DATABASE=PEX 9733 33-lane, 9-port PCI Express Gen 3 (8.0 GT/s) Switch
pci:v000010B5d00009749*
ID_MODEL_FROM_DATABASE=PEX 9749 49-lane, 13-port PCI Express Gen 3 (8.0 GT/s) Switch
pci:v000010B5d0000A100*
ID_MODEL_FROM_DATABASE=Blackmagic Design DeckLink
@ -22497,13 +22515,13 @@ pci:v000010CDd00001200*
ID_MODEL_FROM_DATABASE=ASC1200 [(abp940) Fast SCSI-II]
pci:v000010CDd00001300*
ID_MODEL_FROM_DATABASE=ABP940-U / ABP960-U
ID_MODEL_FROM_DATABASE=ASC1300 / ASC3030 [ABP940-U / ABP960-U / ABP3925]
pci:v000010CDd00001300sv000010CDsd00001310*
ID_MODEL_FROM_DATABASE=ABP940-U / ABP960-U (ASC1300 SCSI Adapter)
ID_MODEL_FROM_DATABASE=ASC1300 / ASC3030 [ABP940-U / ABP960-U / ABP3925] (ASC1300/3030 SCSI adapter)
pci:v000010CDd00001300sv00001195sd00001320*
ID_MODEL_FROM_DATABASE=ABP940-U / ABP960-U (Ultra-SCSI CardBus PC Card REX CB31)
ID_MODEL_FROM_DATABASE=ASC1300 / ASC3030 [ABP940-U / ABP960-U / ABP3925] (Ultra-SCSI CardBus PC Card REX CB31)
pci:v000010CDd00002300*
ID_MODEL_FROM_DATABASE=ABP940-UW
@ -26223,7 +26241,7 @@ pci:v000010DEd0000056Dsv00001019sd0000297A*
ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge (MCP73PVT-SM)
pci:v000010DEd0000056Dsv000010DEsd0000CB73*
ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge (MCP73 PCIe x1 port)
ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge (MCP73 PCI Bridge)
pci:v000010DEd0000056E*
ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge
@ -26240,6 +26258,9 @@ pci:v000010DEd0000056F*
pci:v000010DEd0000056Fsv00001019sd0000297A*
ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge (MCP73PVT-SM)
pci:v000010DEd0000056Fsv000010DEsd00000000*
ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge (MCP73 PCIe x1 port)
pci:v000010DEd000005B1*
ID_MODEL_FROM_DATABASE=NF200 PCIe 2.0 switch
@ -26531,6 +26552,9 @@ pci:v000010DEd00000643*
pci:v000010DEd00000644*
ID_MODEL_FROM_DATABASE=G96 [GeForce 9500 GS]
pci:v000010DEd00000644sv0000174Bsd00009600*
ID_MODEL_FROM_DATABASE=G96 [GeForce 9500 GS] (Geforce 9500GS 512M DDR2 V/D/HDMI)
pci:v000010DEd00000645*
ID_MODEL_FROM_DATABASE=G96 [GeForce 9500 GS]
@ -26708,6 +26732,9 @@ pci:v000010DEd000006DFsv000010DEsd0000087F*
pci:v000010DEd000006E0*
ID_MODEL_FROM_DATABASE=G98 [GeForce 9300 GE]
pci:v000010DEd000006E0sv0000107Dsd00005A96*
ID_MODEL_FROM_DATABASE=G98 [GeForce 9300 GE] (Geforce 9300GE)
pci:v000010DEd000006E1*
ID_MODEL_FROM_DATABASE=G98 [GeForce 9300 GS]
@ -30404,6 +30431,15 @@ pci:v000010DEd000013F2*
pci:v000010DEd00001401*
ID_MODEL_FROM_DATABASE=GM206 [GeForce GTX 960]
pci:v000010DEd00001617*
ID_MODEL_FROM_DATABASE=GM204M [GeForce GTX 980M]
pci:v000010DEd00001618*
ID_MODEL_FROM_DATABASE=GM204M [GeForce GTX 970M]
pci:v000010DEd00001619*
ID_MODEL_FROM_DATABASE=GM204M [GeForce GTX 965M]
pci:v000010DEd000017C2*
ID_MODEL_FROM_DATABASE=GM200 [GeForce GTX TITAN X]
@ -34367,6 +34403,12 @@ pci:v0000111Dd00008088sv00001093sd00007602*
pci:v0000111Dd0000808F*
ID_MODEL_FROM_DATABASE=PES32NT8AG2
pci:v0000111Dd000080CF*
ID_MODEL_FROM_DATABASE=F32P08xG3 [PCIe boot mode]
pci:v0000111Dd000080D2*
ID_MODEL_FROM_DATABASE=F32P08xG3 NVMe controller
pci:v0000111E*
ID_VENDOR_FROM_DATABASE=Eldec
@ -40107,7 +40149,13 @@ pci:v00001244d00000A00sv00001244sd00000A00*
ID_MODEL_FROM_DATABASE=A1 ISDN [Fritz] (FRITZ!Card ISDN Controller)
pci:v00001244d00000E00*
ID_MODEL_FROM_DATABASE=Fritz!PCI v2.0 ISDN
ID_MODEL_FROM_DATABASE=Fritz!Card PCI v2.0 ISDN
pci:v00001244d00000E80*
ID_MODEL_FROM_DATABASE=Fritz!Card PCI v2.1 ISDN
pci:v00001244d00000E80sv00001244sd00000E00*
ID_MODEL_FROM_DATABASE=Fritz!Card PCI v2.1 ISDN (PSB 3100F (AVM KAFKA) [Fritz!Card PCI v2.1])
pci:v00001244d00001100*
ID_MODEL_FROM_DATABASE=C2 ISDN
@ -44895,7 +44943,7 @@ pci:v00001409d00007168sv00001409sd00004027*
ID_MODEL_FROM_DATABASE=PCI2S550 (Dual 16550 UART) (SER4027A (1x RS232 port))
pci:v00001409d00007168sv00001409sd00004037*
ID_MODEL_FROM_DATABASE=PCI2S550 (Dual 16550 UART) (SER4037A (2x RS232 port))
ID_MODEL_FROM_DATABASE=PCI2S550 (Dual 16550 UART) (SER4037A(L) [SUNIX SUN1889] (2x RS232 port))
pci:v00001409d00007168sv00001409sd00004056*
ID_MODEL_FROM_DATABASE=PCI2S550 (Dual 16550 UART) (SER4056A (4x RS232))
@ -48146,6 +48194,12 @@ pci:v000014E4d000016A2sv0000103Csd00001916*
pci:v000014E4d000016A2sv0000103Csd00001917*
ID_MODEL_FROM_DATABASE=BCM57840 NetXtreme II 10/20-Gigabit Ethernet (HP FlexFabric 20Gb 2-port 630M Adapter)
pci:v000014E4d000016A2sv0000103Csd00002231*
ID_MODEL_FROM_DATABASE=BCM57840 NetXtreme II 10/20-Gigabit Ethernet (3820C 10/20Gb Converged Network Adapter)
pci:v000014E4d000016A2sv0000103Csd000022FA*
ID_MODEL_FROM_DATABASE=BCM57840 NetXtreme II 10/20-Gigabit Ethernet (FlexFabric 10Gb 2-port 536FLB Adapter)
pci:v000014E4d000016A3*
ID_MODEL_FROM_DATABASE=NetXtreme BCM57786 Gigabit Ethernet PCIe
@ -48158,6 +48212,12 @@ pci:v000014E4d000016A4sv0000103Csd00001916*
pci:v000014E4d000016A4sv0000103Csd00001917*
ID_MODEL_FROM_DATABASE=BCM57840 NetXtreme II Ethernet Multi Function (HP NPAR 20Gb 2-port 630M Adapter)
pci:v000014E4d000016A4sv0000103Csd00002231*
ID_MODEL_FROM_DATABASE=BCM57840 NetXtreme II Ethernet Multi Function (3820C 10/20Gb Converged Network Adapter (NPAR 1.5))
pci:v000014E4d000016A4sv0000103Csd000022FA*
ID_MODEL_FROM_DATABASE=BCM57840 NetXtreme II Ethernet Multi Function (FlexFabric 10Gb 2-port 536FLB Adapter (NPAR 1.5))
pci:v000014E4d000016A5*
ID_MODEL_FROM_DATABASE=NetXtreme II BCM57800 1/10 Gigabit Ethernet Multi Function
@ -48287,6 +48347,12 @@ pci:v000014E4d000016ADsv0000103Csd00001916*
pci:v000014E4d000016ADsv0000103Csd00001917*
ID_MODEL_FROM_DATABASE=NetXtreme II BCM57840 10/20 Gigabit Ethernet Virtual Function (HP FlexFabric 20Gb 2-port 630M Adapter)
pci:v000014E4d000016ADsv0000103Csd00002231*
ID_MODEL_FROM_DATABASE=NetXtreme II BCM57840 10/20 Gigabit Ethernet Virtual Function (3820C 10/20Gb Converged Network Adapter (SR-IOV VF))
pci:v000014E4d000016ADsv0000103Csd000022FA*
ID_MODEL_FROM_DATABASE=NetXtreme II BCM57840 10/20 Gigabit Ethernet Virtual Function (FlexFabric 10Gb 2-port 536FLB Adapter (SR-IOV VF))
pci:v000014E4d000016AE*
ID_MODEL_FROM_DATABASE=NetXtreme II BCM57810 10 Gigabit Ethernet Multi Function
@ -49052,6 +49118,9 @@ pci:v000014E4d000043D9*
pci:v000014E4d000043DF*
ID_MODEL_FROM_DATABASE=BCM4354 802.11ac Wireless LAN SoC
pci:v000014E4d000043E9*
ID_MODEL_FROM_DATABASE=BCM4358 802.11ac Wireless LAN SoC
pci:v000014E4d000043EC*
ID_MODEL_FROM_DATABASE=BCM4356 802.11ac Wireless Network Adapter
@ -49232,6 +49301,9 @@ pci:v000014E4d00008602*
pci:v000014E4d0000A8D8*
ID_MODEL_FROM_DATABASE=BCM43224/5 Wireless Network Adapter
pci:v000014E4d0000AA52*
ID_MODEL_FROM_DATABASE=BCM43602 802.11ac Wireless LAN SoC
pci:v000014E4d0000B302*
ID_MODEL_FROM_DATABASE=BCM56302 StrataXGS 24x1GE 2x10GE Switch Controller
@ -52266,199 +52338,199 @@ pci:v0000168Cd00000012sv00001B47sd0000AA00*
ID_MODEL_FROM_DATABASE=AR5211 Wireless Network Adapter [AR5001X 802.11ab] (8460 802.11ab Wireless CardBus Adapter)
pci:v0000168Cd00000013*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter
pci:v0000168Cd00000013sv00000308sd00003402*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (AG-100 802.11ag Wireless Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (AG-100 802.11ag Wireless Cardbus Adapter)
pci:v0000168Cd00000013sv00000308sd00003405*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (G-102 v2 802.11g Wireless Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (G-102 v2 802.11g Wireless Cardbus Adapter)
pci:v0000168Cd00000013sv00000308sd00003408*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (G-170S 802.11g Wireless CardBus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (G-170S 802.11g Wireless CardBus Adapter)
pci:v0000168Cd00000013sv00000E11sd000000E5*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (NC6000/NC8000 laptop)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (NC6000/NC8000 laptop)
pci:v0000168Cd00000013sv000010B7sd00006002*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (3CRWE154A72 802.11abg Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (3CRWE154A72 802.11abg Cardbus Adapter)
pci:v0000168Cd00000013sv00001113sd0000D301*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Philips CPWNA100 Wireless CardBus adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Philips CPWNA100 Wireless CardBus adapter)
pci:v0000168Cd00000013sv00001113sd0000EE23*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (SMCWPCIT-G 108Mbps Wireless PCI adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (SMCWPCIT-G 108Mbps Wireless PCI adapter)
pci:v0000168Cd00000013sv00001154sd0000033B*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Buffalo WLI-CB-AMG54)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Buffalo WLI-CB-AMG54)
pci:v0000168Cd00000013sv00001154sd0000034E*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Buffalo WLI-CB-AG108HP 802.11abg Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Buffalo WLI-CB-AG108HP 802.11abg Cardbus Adapter)
pci:v0000168Cd00000013sv00001186sd00003202*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (DWL-G650 (Rev B3,B5) Wireless cardbus adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (DWL-G650 (Rev B3,B5) Wireless cardbus adapter)
pci:v0000168Cd00000013sv00001186sd00003203*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (AirPlus DWL-G520 Wireless PCI Adapter (rev. A))
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (AirPlus DWL-G520 Wireless PCI Adapter (rev. A))
pci:v0000168Cd00000013sv00001186sd00003A07*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (AirXpert DWL-AG650 Wireless Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (AirXpert DWL-AG650 Wireless Cardbus Adapter)
pci:v0000168Cd00000013sv00001186sd00003A08*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (AirXpert DWL-AG520 Wireless PCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (AirXpert DWL-AG520 Wireless PCI Adapter)
pci:v0000168Cd00000013sv00001186sd00003A12*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (D-Link AirPlus DWL-G650 Wireless Cardbus Adapter(rev.C))
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (D-Link AirPlus DWL-G650 Wireless Cardbus Adapter(rev.C))
pci:v0000168Cd00000013sv00001186sd00003A13*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (AirPlus DWL-G520 Wireless PCI Adapter (rev. B))
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (AirPlus DWL-G520 Wireless PCI Adapter (rev. B))
pci:v0000168Cd00000013sv00001186sd00003A14*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (AirPremier AG DWL-AG530 Wireless PCI Adapter (rev.A))
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (AirPremier AG DWL-AG530 Wireless PCI Adapter (rev.A))
pci:v0000168Cd00000013sv00001186sd00003A17*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (D-Link AirPremier DWL-G680 Wireless Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (D-Link AirPremier DWL-G680 Wireless Cardbus Adapter)
pci:v0000168Cd00000013sv00001186sd00003A18*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (D-Link AirPremier DWL-G550 Wireless PCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (D-Link AirPremier DWL-G550 Wireless PCI Adapter)
pci:v0000168Cd00000013sv00001186sd00003A1A*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WNA-2330 802.11bg Wireless CardBus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WNA-2330 802.11bg Wireless CardBus Adapter)
pci:v0000168Cd00000013sv00001186sd00003A63*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (D-Link AirPremier DWL-AG660 Wireless Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (D-Link AirPremier DWL-AG660 Wireless Cardbus Adapter)
pci:v0000168Cd00000013sv00001186sd00003A93*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Conceptronic C54I Wireless 801.11g PCI card)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Conceptronic C54I Wireless 801.11g PCI card)
pci:v0000168Cd00000013sv00001186sd00003A94*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Conceptronic C54C 802.11g Wireless Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Conceptronic C54C 802.11g Wireless Cardbus Adapter)
pci:v0000168Cd00000013sv00001186sd00003AB0*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Allnet ALL0281 Wireless PCI Card)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Allnet ALL0281 Wireless PCI Card)
pci:v0000168Cd00000013sv00001385sd00004600*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WAG511 802.11a/b/g Dual Band Wireless PC Card)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WAG511 802.11a/b/g Dual Band Wireless PC Card)
pci:v0000168Cd00000013sv00001385sd00004610*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WAG511 802.11a/b/g Dual Band Wireless PC Card)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WAG511 802.11a/b/g Dual Band Wireless PC Card)
pci:v0000168Cd00000013sv00001385sd00004900*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WG311v1 802.11g Wireless PCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WG311v1 802.11g Wireless PCI Adapter)
pci:v0000168Cd00000013sv00001385sd00004A00*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WAG311 802.11a/g Wireless PCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WAG311 802.11a/g Wireless PCI Adapter)
pci:v0000168Cd00000013sv00001385sd00004B00*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WG511T 108 Mbps Wireless PC Card (rev.A/B))
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WG511T 108 Mbps Wireless PC Card (rev.A/B))
pci:v0000168Cd00000013sv00001385sd00004D00*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WG311T 108 Mbps Wireless PCI Adapter (rev.A2))
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WG311T 108 Mbps Wireless PCI Adapter (rev.A2))
pci:v0000168Cd00000013sv00001385sd00004F00*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WG511U Double 108 Mbps Wireless PC Card)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WG511U Double 108 Mbps Wireless PC Card)
pci:v0000168Cd00000013sv00001385sd00005A00*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WG311T 108 Mbps Wireless PCI Adapter (rev.A3))
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WG311T (rev.A3 v1h3/v1h4) 108 Mbps Wireless PCI Adapter [AR2412])
pci:v0000168Cd00000013sv00001385sd00005B00*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WG511T 108 Mbps Wireless PC Card (rev.C))
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WG511T 108 Mbps Wireless PC Card (rev.C))
pci:v0000168Cd00000013sv00001385sd00005D00*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WPN511 RangeMax Wireless PC Card)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WPN511 RangeMax Wireless PC Card)
pci:v0000168Cd00000013sv00001458sd0000E911*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (GN-WIAG02)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (GN-WIAG02)
pci:v0000168Cd00000013sv00001468sd00000403*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (U10H014 802.11g Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (U10H014 802.11g Cardbus Adapter)
pci:v0000168Cd00000013sv00001468sd00000408*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (ThinkPad 11b/g Wireless LAN Mini PCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (ThinkPad 11b/g Wireless LAN Mini PCI Adapter)
pci:v0000168Cd00000013sv000014B7sd00000A10*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (8480-WD 802.11abg Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (8480-WD 802.11abg Cardbus Adapter)
pci:v0000168Cd00000013sv000014B7sd00000A60*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (8482-WD ORiNOCO 11a/b/g Wireless PCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (8482-WD ORiNOCO 11a/b/g Wireless PCI Adapter)
pci:v0000168Cd00000013sv000014B7sd0000AA30*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (8800-FC 802.11bg Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (8800-FC 802.11bg Cardbus Adapter)
pci:v0000168Cd00000013sv000014B7sd0000AA40*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (8470-WD 802.11bg Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (8470-WD 802.11bg Cardbus Adapter)
pci:v0000168Cd00000013sv000014B9sd0000CB21*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (CB21 802.11a/b/g Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (CB21 802.11a/b/g Cardbus Adapter)
pci:v0000168Cd00000013sv00001668sd00001026*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (IBM HighRate 11 a/b/g Wireless CardBus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (IBM HighRate 11 a/b/g Wireless CardBus Adapter)
pci:v0000168Cd00000013sv0000168Csd00000013*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (AirPlus XtremeG DWL-G650 Wireless PCMCIA Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (AirPlus XtremeG DWL-G650 Wireless PCMCIA Adapter)
pci:v0000168Cd00000013sv0000168Csd00001025*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (DWL-G650B2 Wireless CardBus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (DWL-G650B2 Wireless CardBus Adapter)
pci:v0000168Cd00000013sv0000168Csd00001027*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Engenius NL-3054CB ARIES b/g CardBus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Engenius NL-3054CB ARIES b/g CardBus Adapter)
pci:v0000168Cd00000013sv0000168Csd00001042*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Ubiquiti Networks SuperRange a/b/g Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Ubiquiti Networks SuperRange a/b/g Cardbus Adapter)
pci:v0000168Cd00000013sv0000168Csd00001051*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (EZ Connect g 802.11g 108Mbps Wireless PCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (EZ Connect g 802.11g 108Mbps Wireless PCI Adapter)
pci:v0000168Cd00000013sv0000168Csd00002026*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Netgate 5354MP ARIES a(108Mb turbo)/b/g MiniPCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Netgate 5354MP ARIES a(108Mb turbo)/b/g MiniPCI Adapter)
pci:v0000168Cd00000013sv0000168Csd00002027*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (D-Link AirPlus DWL-G520 Wireless PCI Adapter (rev. A))
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (D-Link AirPlus DWL-G520 Wireless PCI Adapter (rev. A))
pci:v0000168Cd00000013sv0000168Csd00002041*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Engenius 5354MP Plus ARIES2 b/g MiniPCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Engenius 5354MP Plus ARIES2 b/g MiniPCI Adapter)
pci:v0000168Cd00000013sv0000168Csd00002042*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Engenius 5354MP Plus ARIES2 a/b/g MiniPCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Engenius 5354MP Plus ARIES2 a/b/g MiniPCI Adapter)
pci:v0000168Cd00000013sv0000168Csd00002051*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (TRENDnet TEW-443PI Wireless PCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (TRENDnet TEW-443PI Wireless PCI Adapter)
pci:v0000168Cd00000013sv000016A5sd0000160A*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (BWP712 802.11bg Wireless CardBus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (BWP712 802.11bg Wireless CardBus Adapter)
pci:v0000168Cd00000013sv000016ABsd00007302*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Trust Speedshare Turbo Pro Wireless PCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Trust Speedshare Turbo Pro Wireless PCI Adapter)
pci:v0000168Cd00000013sv00001737sd00000017*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WPC55AG)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WPC55AG)
pci:v0000168Cd00000013sv00001737sd00000026*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WMP55AG v1.1)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WMP55AG v1.1)
pci:v0000168Cd00000013sv00001737sd00000035*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WPC55AG v1.2 802.11abg Cardbus Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WPC55AG v1.2 802.11abg Cardbus Adapter)
pci:v0000168Cd00000013sv00001737sd00000036*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (WMP55AG v1.2 802.11abg PCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (WMP55AG v1.2 802.11abg PCI Adapter)
pci:v0000168Cd00000013sv00001799sd00003000*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (F6D3000 Dual-Band Wireless A+G Desktop Card)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (F6D3000 Dual-Band Wireless A+G Desktop Card)
pci:v0000168Cd00000013sv00001799sd00003010*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (F6D3010 Dual-Band Wireless A+G Notebook Card)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (F6D3010 Dual-Band Wireless A+G Notebook Card)
pci:v0000168Cd00000013sv000017CFsd00000042*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Z-COMAX Highpower XG-622H (400mw) 802.11b/g mini-PCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Z-COMAX Highpower XG-622H (400mw) 802.11b/g mini-PCI Adapter)
pci:v0000168Cd00000013sv0000185Fsd00001012*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (CM9 Wireless a/b/g MiniPCI Adapter)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (CM9 Wireless a/b/g MiniPCI Adapter)
pci:v0000168Cd00000013sv0000185Fsd00002012*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (Wistron NeWeb WLAN a+b+g model CB9)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (Wistron NeWeb WLAN a+b+g model CB9)
pci:v0000168Cd00000013sv0000A727sd00006801*
ID_MODEL_FROM_DATABASE=AR5212/AR5213 Wireless Network Adapter (3CRXJK10075 OfficeConnect Wireless 108Mbps 11g XJACK PC Card)
ID_MODEL_FROM_DATABASE=AR5212/5213/2414 Wireless Network Adapter (3CRXJK10075 OfficeConnect Wireless 108Mbps 11g XJACK PC Card)
pci:v0000168Cd0000001A*
ID_MODEL_FROM_DATABASE=AR2413/AR2414 Wireless Network Adapter [AR5005G(S) 802.11bg]
@ -52733,6 +52805,9 @@ pci:v0000168Cd0000002Asv00000777sd00004F05*
pci:v0000168Cd0000002Asv0000103Csd00003041*
ID_MODEL_FROM_DATABASE=AR928X Wireless Network Adapter (PCI-Express) (AR5BHB92-H 802.11abgn Wireless Half-size Mini PCIe Card [AR9280])
pci:v0000168Cd0000002Asv0000103Csd00003042*
ID_MODEL_FROM_DATABASE=AR928X Wireless Network Adapter (PCI-Express) (AzureWave AW-NE773 802.11abgn Wireless Half-size Mini PCIe Card [AR9280])
pci:v0000168Cd0000002Asv0000105Bsd0000E006*
ID_MODEL_FROM_DATABASE=AR928X Wireless Network Adapter (PCI-Express) (T77H053.00 802.11bgn Wireless Mini PCIe Card [AR9281])
@ -53204,6 +53279,12 @@ pci:v000016D5d00007004*
pci:v000016D5d00007005*
ID_MODEL_FROM_DATABASE=XMC-7K410CC: User-Configurable Kintex-7 FPGA, 410k logic cells, conduction-cooled
pci:v000016D5d00007006*
ID_MODEL_FROM_DATABASE=XMC-7A200: User-Configurable Artix-7 FPGA, 200k logic cells with Plug-In I/O
pci:v000016D5d00007007*
ID_MODEL_FROM_DATABASE=XMC-7A200CC: User-Configurable Conduction-Cooled Artix-7 FPGA, with 200k logic cells
pci:v000016DA*
ID_VENDOR_FROM_DATABASE=Advantech Co., Ltd.
@ -53471,6 +53552,12 @@ pci:v0000177Dd00000095*
pci:v0000177Dd00000096*
ID_MODEL_FROM_DATABASE=Octeon III CN70XX Network Processor
pci:v0000177Dd00009700*
ID_MODEL_FROM_DATABASE=Octeon III CN73XX Network Processor
pci:v0000177Dd00009800*
ID_MODEL_FROM_DATABASE=Octeon Fusion CNF75XX Processor
pci:v0000177Dd0000A001*
ID_MODEL_FROM_DATABASE=THUNDERX MRML Bridge
@ -55295,6 +55382,9 @@ pci:v00001924d00000923sv00001924sd0000800B*
pci:v00001924d00000923sv00001924sd0000800E*
ID_MODEL_FROM_DATABASE=SFC9140 (SFN7x42Q-R2 Flareon Ultra 7000 Series 10/40G Adapter)
pci:v00001924d00000923sv00001924sd0000800F*
ID_MODEL_FROM_DATABASE=SFC9140 (SFN7xx4F-R1 Flareon Ultra 7000 Series 10G Adapter)
pci:v00001924d00001803*
ID_MODEL_FROM_DATABASE=SFC9020 Virtual Function [Solarstorm]
@ -56819,6 +56909,9 @@ pci:v00001B4Bd00009120*
pci:v00001B4Bd00009123*
ID_MODEL_FROM_DATABASE=88SE9123 PCIe SATA 6.0 Gb/s controller
pci:v00001B4Bd00009123sv0000DC93sd0000600E*
ID_MODEL_FROM_DATABASE=88SE9123 PCIe SATA 6.0 Gb/s controller (DC-6xxe series SATA 6G controller)
pci:v00001B4Bd00009125*
ID_MODEL_FROM_DATABASE=88SE9125 PCIe SATA 6.0 Gb/s controller
@ -56915,6 +57008,9 @@ pci:v00001B73d00001000sv00001D5Csd00001000*
pci:v00001B73d00001009*
ID_MODEL_FROM_DATABASE=FL1009 USB 3.0 Host Controller
pci:v00001B73d00001100*
ID_MODEL_FROM_DATABASE=FL1100 USB 3.0 Host Controller
pci:v00001B74*
ID_VENDOR_FROM_DATABASE=OpenVox Communication Co. Ltd.
@ -57191,6 +57287,9 @@ pci:v00001CE4d00000002*
pci:v00001CF7*
ID_VENDOR_FROM_DATABASE=Subspace Dynamics
pci:v00001D00*
ID_VENDOR_FROM_DATABASE=Pure Storage
pci:v00001D21*
ID_VENDOR_FROM_DATABASE=Allo
@ -57356,6 +57455,36 @@ pci:v00001FC9d00003314sv00000000sd00003012*
pci:v00001FC9d00003314sv00000000sd00003014*
ID_MODEL_FROM_DATABASE=10-Giga TOE Dual Port Low Profile SmartNIC (10-Giga TOE Dual Port CX4 Low Profile SmartNIC)
pci:v00001FC9d00004010*
ID_MODEL_FROM_DATABASE=TN4010 Clean SROM
pci:v00001FC9d00004020*
ID_MODEL_FROM_DATABASE=TN9030 10GbE CX4 Ethernet Adapter
pci:v00001FC9d00004022*
ID_MODEL_FROM_DATABASE=TN9310 10GbE SFP+ Ethernet Adapter
pci:v00001FC9d00004022sv00001186sd00004D00*
ID_MODEL_FROM_DATABASE=TN9310 10GbE SFP+ Ethernet Adapter (DXE-810S 10GbE SFP+ Ethernet Adapter)
pci:v00001FC9d00004022sv00001FC9sd00003015*
ID_MODEL_FROM_DATABASE=TN9310 10GbE SFP+ Ethernet Adapter (Ethernet Adapter)
pci:v00001FC9d00004024*
ID_MODEL_FROM_DATABASE=TN9210 10GBase-T Ethernet Adapter
pci:v00001FC9d00004025*
ID_MODEL_FROM_DATABASE=TN9510 10GBase-T/NBASE-T Ethernet Adapter
pci:v00001FC9d00004025sv00001186sd00002900*
ID_MODEL_FROM_DATABASE=TN9510 10GBase-T/NBASE-T Ethernet Adapter (DXE-810T 10GBase-T Ethernet Adapter)
pci:v00001FC9d00004025sv00001FC9sd00003015*
ID_MODEL_FROM_DATABASE=TN9510 10GBase-T/NBASE-T Ethernet Adapter (Ethernet Adapter)
pci:v00001FC9d00004026*
ID_MODEL_FROM_DATABASE=TN9610 10GbE SFP+ Ethernet Adapter
pci:v00001FCC*
ID_VENDOR_FROM_DATABASE=StreamLabs
@ -63962,6 +64091,12 @@ pci:v00008086d000015A2*
pci:v00008086d000015A3*
ID_MODEL_FROM_DATABASE=Ethernet Connection (3) I218-V
pci:v00008086d000015A4*
ID_MODEL_FROM_DATABASE=Ethernet Switch FM10000 Host Interface
pci:v00008086d000015A5*
ID_MODEL_FROM_DATABASE=Ethernet Switch FM10000 Host Virtual Interface
pci:v00008086d000015A8*
ID_MODEL_FROM_DATABASE=Ethernet Connection X552 Virtual Function

View File

@ -43,6 +43,11 @@
# Apple
#########################################
# Macbook2,1 (late 2006), single-button touchpad
evdev:input:b0003v05ACp021B*
EVDEV_ABS_00=256:1471:12
EVDEV_ABS_01=256:831:12
# Macbook5,1 (unibody), aka wellspring3
evdev:input:b0003v05ACp0236*
evdev:input:b0003v05ACp0237*
@ -83,6 +88,16 @@ evdev:input:b0003v05ACp025b*
EVDEV_ABS_35=::94
EVDEV_ABS_36=::92
#########################################
# ASUS
#########################################
# Asus K52JT
evdev:name:ETPS/2 Elantech Touchpad:dmi:bvn*:bvr*:bd*:svnASUSTeKComputerInc.:pnK52JT:*
EVDEV_ABS_00=::18
EVDEV_ABS_01=::16
EVDEV_ABS_35=::18
EVDEV_ABS_36=::16
#########################################
# Google
#########################################

View File

@ -36,10 +36,11 @@
# where /dev/input/eventXX is the mouse in question. If in
# doubt, simply use /dev/input/event* to reload all input rules.
#
# If your changes are generally applicable, open a bug report on
# http://bugs.freedesktop.org/enter_bug.cgi?product=systemd
# and include your new rules, a description of the device, and the
# output of
# If your changes are generally applicable, preferably send them as a pull
# request to
# https://github.com/systemd/
# or create a bug report on the issue tracker located there and include your
# new rules, a description of the device, and the output of
# udevadm info /dev/input/eventXX
# (or /dev/input/event*).
#
@ -238,6 +239,10 @@ mouse:usb:v046dpc245:name:Logitech Gaming Mouse G400:
mouse:usb:v046dpc24c:name:Logitech G400s Optical Gaming Mouse:
MOUSE_DPI=400@1000 *800@1000 2000@1000 4000@1000
# Logitech G402 Hyperion Fury
mouse:usb:v046dpc07e:name:Logitech Gaming Mouse G402:
MOUSE_DPI=400@1000 *800@1000 1600@1000 3200@1000
# Logitech B605 Wireless Mouse (also M505)
mouse:usb:v046dp101d:name:Logitech B605:
mouse:usb:v046dp101d:name:Logitech M505:

View File

@ -86,7 +86,7 @@
<listitem><para>The boot partition used for bringing up the
system. On EFI systems this is possibly the EFI System
Partition, also see
<citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
<citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
This directory is usually strictly local to the host, and
should be considered read-only, except when a new kernel or
boot loader is installed. This directory only exists on
@ -804,7 +804,7 @@
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>hier</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,

View File

@ -1,85 +0,0 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
This file is part of systemd.
Copyright 2013 Lennart Poettering
systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
<refentry id="systemd-efi-boot-generator">
<refentryinfo>
<title>systemd-efi-boot-generator</title>
<productname>systemd</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Lennart</firstname>
<surname>Poettering</surname>
<email>lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>systemd-efi-boot-generator</refentrytitle>
<manvolnum>8</manvolnum>
</refmeta>
<refnamediv>
<refname>systemd-efi-boot-generator</refname>
<refpurpose>Generator for automatically mounting the
EFI System Partition used by the current boot to
<filename>/boot</filename></refpurpose>
</refnamediv>
<refsynopsisdiv>
<para><filename>/usr/lib/systemd/system-generators/systemd-efi-boot-generator</filename></para>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para><filename>systemd-efi-boot-generator</filename> is a
generator that automatically creates mount and automount units for
the EFI System Partition (ESP), mounting it to
<filename>/boot</filename>. Note that this generator will execute
no operation on non-EFI systems, on systems where the boot loader
does not communicate the used ESP to the OS, on systems where
<filename>/boot</filename> is an explicitly configured mount (for
example, listed in
<citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
or where the <filename>/boot</filename> mount point is non-empty.
Since this generator creates an automount unit, the mount will
only be activated on-demand, when accessed.</para>
<para><filename>systemd-efi-boot-generator</filename> implements
<citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>

View File

@ -150,10 +150,16 @@
<filename>/etc/crypttab</filename> with a different device mapper
device name.</para>
<para>Also note that
<citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
will mount the EFI System Partition (ESP) to
<filename>/boot</filename> if not otherwise mounted.</para>
<para>Mount and automount units for the EFI System Partition (ESP),
mounting it to <filename>/boot</filename> are generated on EFI
systems, where the boot loader communicates the used ESP to the operating
system. Since this generator creates an automount unit, the mount will
only be activated on-demand, when accessed. On systems where
<filename>/boot</filename> is an explicitly configured mount
(for example, listed in
<citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
or where the <filename>/boot</filename> mount point is non-empty, no
mount units are generated.</para>
<para>When using this generator in conjunction with btrfs file
systems, make sure to set the correct default subvolumes on them,
@ -170,7 +176,6 @@
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='die-net'><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,

View File

@ -66,7 +66,7 @@
<para>This tool will execute no operation if
<filename>/etc/machine-id</filename> doesn't contain any valid
machine ID, isn't mounted as an independent temporary file system,
of <filename>/etc</filename> is read-only. If those conditions are
or <filename>/etc</filename> is read-only. If those conditions are
met, it will then write current machine ID to disk and unmount the
transient <filename>/etc/machine-id</filename> file in a race-free
manner to ensure that this file is always valid for other

View File

@ -80,7 +80,8 @@
several interfaces which will be configured, but a particular
one is necessary to access some network resources. This option
may be used more than once to wait for multiple network
interfaces.</para></listitem>
interfaces. When used, all other interfaces are ignored.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--ignore=</option></term>

View File

@ -331,7 +331,6 @@ find $dir</programlisting>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-debug-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-getty-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,

View File

@ -441,6 +441,15 @@
<para>A boolean. When true receiving zero checksums in VXLAN/IPv6 is turned on.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>GroupPolicyExtension=</varname></term>
<listitem>
<para>A boolean. When true it enables Group Policy VXLAN extension security label mechanism
across network peers based on VXLAN. For details about the Group Policy VXLAN see the
<ulink url="https://tools.ietf.org/html/draft-smith-vxlan-group-policy">
VXLAN Group Policy </ulink> document. Defaults to false.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>

View File

@ -737,7 +737,7 @@
to 0 (job timeouts disabled), except for device units. NB:
this timeout is independent from any unit-specific timeout
(for example, the timeout set with
<varname>StartTimeoutSec=</varname> in service units) as the
<varname>TimeoutStartSec=</varname> in service units) as the
job timeout has no effect on the unit itself, only on the job
that might be pending for it. Or in other words: unit-specific
timeouts are useful to abort unit state changes, and revert

View File

@ -253,6 +253,7 @@ int calendar_spec_to_string(const CalendarSpec *c, char **p) {
char *buf = NULL;
size_t sz = 0;
FILE *f;
int r;
assert(c);
assert(p);
@ -278,12 +279,11 @@ int calendar_spec_to_string(const CalendarSpec *c, char **p) {
fputc(':', f);
format_chain(f, 2, c->second);
fflush(f);
if (ferror(f)) {
r = fflush_and_check(f);
if (r < 0) {
free(buf);
fclose(f);
return -ENOMEM;
return r;
}
fclose(f);

View File

@ -28,21 +28,15 @@
#include "fileio.h"
int write_string_stream(FILE *f, const char *line, bool enforce_newline) {
assert(f);
assert(line);
errno = 0;
fputs(line, f);
if (enforce_newline && !endswith(line, "\n"))
fputc('\n', f);
fflush(f);
if (ferror(f))
return errno ? -errno : -EIO;
return 0;
return fflush_and_check(f);
}
static int write_string_file_atomic(const char *fn, const char *line, bool enforce_newline) {

View File

@ -583,7 +583,7 @@ int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_
} else {
p = strndup(sa->un.sun_path, sizeof(sa->un.sun_path));
if (!ret)
if (!p)
return -ENOMEM;
}
@ -662,13 +662,13 @@ int socknameinfo_pretty(union sockaddr_union *sa, socklen_t salen, char **_ret)
r = sockaddr_pretty(&sa->sa, salen, true, true, &ret);
if (r < 0)
return log_error_errno(r, "sockadd_pretty() failed: %m");
return r;
log_debug_errno(saved_errno, "getnameinfo(%s) failed: %m", ret);
} else {
ret = strdup(host);
if (!ret)
return log_oom();
return -ENOMEM;
}
*_ret = ret;
@ -683,7 +683,7 @@ int getnameinfo_pretty(int fd, char **ret) {
assert(ret);
if (getsockname(fd, &sa.sa, &salen) < 0)
return log_error_errno(errno, "getsockname(%d) failed: %m", fd);
return -errno;
return socknameinfo_pretty(&sa, salen, ret);
}

View File

@ -673,6 +673,7 @@ int unit_name_mangle_with_suffix(const char *name, UnitNameMangle allow_globs, c
int slice_build_parent_slice(const char *slice, char **ret) {
char *s, *dash;
int r;
assert(slice);
assert(ret);
@ -693,11 +694,11 @@ int slice_build_parent_slice(const char *slice, char **ret) {
if (dash)
strcpy(dash, ".slice");
else {
free(s);
s = strdup("-.slice");
if (!s)
return -ENOMEM;
r = free_and_strdup(&s, "-.slice");
if (r < 0) {
free(s);
return r;
}
}
*ret = s;

View File

@ -489,9 +489,9 @@ static int copy_file(const char *from, const char *to, bool force) {
}
} while (!feof(f));
fflush(g);
if (ferror(g)) {
r = log_error_errno(EIO, "Failed to write \"%s\": %m", to);
r = fflush_and_check(g);
if (r < 0) {
log_error_errno(r, "Failed to write \"%s\": %m", to);
goto error;
}
@ -519,7 +519,7 @@ static int copy_file(const char *from, const char *to, bool force) {
return 0;
error:
unlink(p);
(void) unlink(p);
return r;
}

View File

@ -22,6 +22,7 @@
#include "console.h"
#include "graphics.h"
#include "pefile.h"
#include "disk.h"
#include "linux.h"
#ifndef EFI_OS_INDICATIONS_BOOT_TO_FW_UI
@ -1139,13 +1140,11 @@ static VOID config_entry_add_from_file(Config *config, EFI_HANDLE *device, CHAR1
config_add_entry(config, entry);
}
static VOID config_load(Config *config, EFI_HANDLE *device, EFI_FILE *root_dir, CHAR16 *loaded_image_path) {
EFI_FILE_HANDLE entries_dir;
EFI_STATUS err;
static VOID config_load_defaults(Config *config, EFI_FILE *root_dir) {
CHAR8 *content = NULL;
UINTN sec;
UINTN len;
UINTN i;
EFI_STATUS err;
len = file_read(root_dir, L"\\loader\\loader.conf", 0, 0, &content);
if (len > 0)
@ -1158,6 +1157,11 @@ static VOID config_load(Config *config, EFI_HANDLE *device, EFI_FILE *root_dir,
config->timeout_sec = sec;
} else
config->timeout_sec_efivar = -1;
}
static VOID config_load_entries(Config *config, EFI_HANDLE *device, EFI_FILE *root_dir, CHAR16 *loaded_image_path) {
EFI_FILE_HANDLE entries_dir;
EFI_STATUS err;
err = uefi_call_wrapper(root_dir->Open, 5, root_dir, &entries_dir, L"\\loader\\entries", EFI_FILE_MODE_READ, 0ULL);
if (!EFI_ERROR(err)) {
@ -1194,8 +1198,11 @@ static VOID config_load(Config *config, EFI_HANDLE *device, EFI_FILE *root_dir,
}
uefi_call_wrapper(entries_dir->Close, 1, entries_dir);
}
}
static VOID config_sort_entries(Config *config) {
UINTN i;
/* sort entries after version number */
for (i = 1; i < config->entry_count; i++) {
BOOLEAN more;
UINTN k;
@ -1696,11 +1703,11 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
EFI_LOADED_IMAGE *loaded_image;
EFI_FILE *root_dir;
CHAR16 *loaded_image_path;
EFI_DEVICE_PATH *device_path;
EFI_STATUS err;
Config config;
UINT64 init_usec;
BOOLEAN menu = FALSE;
CHAR16 uuid[37];
InitializeLib(image, sys_table);
init_usec = time_usec();
@ -1722,29 +1729,8 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
}
/* export the device path this image is started from */
device_path = DevicePathFromHandle(loaded_image->DeviceHandle);
if (device_path) {
EFI_DEVICE_PATH *path, *paths;
paths = UnpackDevicePath(device_path);
for (path = paths; !IsDevicePathEnd(path); path = NextDevicePathNode(path)) {
HARDDRIVE_DEVICE_PATH *drive;
CHAR16 uuid[37];
if (DevicePathType(path) != MEDIA_DEVICE_PATH)
continue;
if (DevicePathSubType(path) != MEDIA_HARDDRIVE_DP)
continue;
drive = (HARDDRIVE_DEVICE_PATH *)path;
if (drive->SignatureType != SIGNATURE_TYPE_GUID)
continue;
GuidToString(uuid, (EFI_GUID *)&drive->Signature);
efivar_set(L"LoaderDevicePartUUID", uuid, FALSE);
break;
}
FreePool(paths);
}
if (disk_get_part_uuid(loaded_image->DeviceHandle, uuid) == EFI_SUCCESS)
efivar_set(L"LoaderDevicePartUUID", uuid, FALSE);
root_dir = LibOpenRoot(loaded_image->DeviceHandle);
if (!root_dir) {
@ -1758,12 +1744,19 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
loaded_image_path = DevicePathToStr(loaded_image->FilePath);
efivar_set(L"LoaderImageIdentifier", loaded_image_path, FALSE);
/* scan "\loader\entries\*.conf" files */
ZeroMem(&config, sizeof(Config));
config_load(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path);
config_load_defaults(&config, root_dir);
/* scan /EFI/Linux/ directory */
config_entry_add_linux(&config, loaded_image, root_dir);
/* scan /loader/entries/\*.conf files */
config_load_entries(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path);
/* sort entries after version number */
config_sort_entries(&config);
/* if we find some well-known loaders, add them to the end of the list */
config_entry_add_linux(&config, loaded_image, root_dir);
config_entry_add_loader_auto(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path,
L"auto-windows", 'w', L"Windows Boot Manager", L"\\EFI\\Microsoft\\Boot\\bootmgfw.efi");
config_entry_add_loader_auto(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path,

51
src/boot/efi/disk.c Normal file
View File

@ -0,0 +1,51 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* Copyright (C) 2015 Kay Sievers <kay@vrfy.org>
*/
#include <efi.h>
#include <efilib.h>
#include "util.h"
EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[37]) {
EFI_DEVICE_PATH *device_path;
EFI_STATUS r = EFI_NOT_FOUND;
/* export the device path this image is started from */
device_path = DevicePathFromHandle(handle);
if (device_path) {
EFI_DEVICE_PATH *path, *paths;
paths = UnpackDevicePath(device_path);
for (path = paths; !IsDevicePathEnd(path); path = NextDevicePathNode(path)) {
HARDDRIVE_DEVICE_PATH *drive;
if (DevicePathType(path) != MEDIA_DEVICE_PATH)
continue;
if (DevicePathSubType(path) != MEDIA_HARDDRIVE_DP)
continue;
drive = (HARDDRIVE_DEVICE_PATH *)path;
if (drive->SignatureType != SIGNATURE_TYPE_GUID)
continue;
GuidToString(uuid, (EFI_GUID *)&drive->Signature);
r = EFI_SUCCESS;
break;
}
FreePool(paths);
}
return r;
}

21
src/boot/efi/disk.h Normal file
View File

@ -0,0 +1,21 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* Copyright (C) 2015 Kay Sievers <kay@vrfy.org>
*/
#ifndef __SDBOOT_DISK_H
#define __SDBOOT_DISK_H
EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[37]);
#endif

View File

@ -18,6 +18,7 @@
#include "util.h"
#include "pefile.h"
#include "disk.h"
#include "graphics.h"
#include "splash.h"
#include "linux.h"
@ -46,6 +47,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
UINTN szs[ELEMENTSOF(sections)-1] = {};
CHAR8 *cmdline = NULL;
UINTN cmdline_len;
CHAR16 uuid[37];
EFI_STATUS err;
InitializeLib(image, sys_table);
@ -99,6 +101,10 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
cmdline = line;
}
/* export the device path this image is started from */
if (disk_get_part_uuid(loaded_image->DeviceHandle, uuid) == EFI_SUCCESS)
efivar_set(L"LoaderDevicePartUUID", uuid, FALSE);
if (szs[3] > 0)
graphics_splash((UINT8 *)((UINTN)loaded_image->ImageBase + addrs[3]), szs[3], NULL);

View File

@ -71,6 +71,27 @@ static int get_creds_by_message(sd_bus *bus, sd_bus_message *m, uint64_t mask, s
return get_creds_by_name(bus, name, mask, _creds, error);
}
static int driver_activation(sd_bus_message *reply, void *userdata, sd_bus_error *error) {
_cleanup_bus_message_unref_ sd_bus_message *m = NULL;
ProxyActivation *activation = userdata;
/*
* The org.freedesktop.DBus.Peer.Ping() call returned. We don't care
* whether this succeeded, failed, was not implemented or timed out. We
* cannot assume that the target reacts to this properly. Hence, just
* send the reply to the activation request and be done.
*/
m = activation->request; /* claim reference */
--activation->proxy->n_activations;
LIST_REMOVE(activations_by_proxy, activation->proxy->activations, activation);
sd_bus_slot_unref(activation->slot);
free(activation);
return synthetic_reply_method_return(m, "u", BUS_START_REPLY_SUCCESS);
}
int bus_proxy_process_driver(Proxy *p, sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPolicy *sp, const struct ucred *ucred, Set *owned_names) {
int r;
@ -441,27 +462,29 @@ int bus_proxy_process_driver(Proxy *p, sd_bus *a, sd_bus *b, sd_bus_message *m,
name_list = (struct kdbus_info *) ((uint8_t *) a->kdbus_buffer + cmd.offset);
KDBUS_FOREACH(name, name_list, cmd.list_size) {
const char *entry_name = NULL;
struct kdbus_item *item;
char *n;
KDBUS_ITEM_FOREACH(item, name, items)
if (item->type == KDBUS_ITEM_OWNED_NAME)
entry_name = item->name.name;
KDBUS_ITEM_FOREACH(item, name, items) {
if (item->type == KDBUS_ITEM_OWNED_NAME) {
if (!streq_ptr(item->name.name, arg0))
continue;
if (!streq_ptr(entry_name, arg0))
continue;
if (asprintf(&n, ":1.%llu", (unsigned long long) name->id) < 0) {
err = -ENOMEM;
break;
}
if (asprintf(&n, ":1.%llu", (unsigned long long) name->id) < 0) {
err = -ENOMEM;
break;
r = strv_consume(&owners, n);
if (r < 0) {
err = r;
break;
}
}
}
r = strv_consume(&owners, n);
if (r < 0) {
err = r;
if (err < 0)
break;
}
}
r = bus_kernel_cmd_free(a, cmd.offset);
@ -585,7 +608,9 @@ int bus_proxy_process_driver(Proxy *p, sd_bus *a, sd_bus *b, sd_bus_message *m,
} else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "StartServiceByName")) {
_cleanup_bus_message_unref_ sd_bus_message *msg = NULL;
ProxyActivation *activation;
const char *name;
uint64_t cookie;
uint32_t flags;
if (!sd_bus_message_has_signature(m, "su"))
@ -604,21 +629,46 @@ int bus_proxy_process_driver(Proxy *p, sd_bus *a, sd_bus *b, sd_bus_message *m,
if (r != -ESRCH)
return synthetic_reply_method_errno(m, r, NULL);
r = sd_bus_message_new_method_call(
a,
&msg,
name,
"/",
"org.freedesktop.DBus.Peer",
"Ping");
if (p->n_activations >= PROXY_ACTIVATIONS_MAX)
return synthetic_reply_method_errno(m, -EMFILE, NULL);
r = sd_bus_message_get_cookie(m, &cookie);
if (r < 0)
return synthetic_reply_method_errno(m, r, NULL);
r = sd_bus_send(a, msg, NULL);
r = sd_bus_message_new_method_call(a,
&msg,
name,
"/",
"org.freedesktop.DBus.Peer",
"Ping");
if (r < 0)
return synthetic_reply_method_errno(m, r, NULL);
return synthetic_reply_method_return(m, "u", BUS_START_REPLY_SUCCESS);
r = bus_message_seal(msg, cookie, BUS_DEFAULT_TIMEOUT);
if (r < 0)
return synthetic_reply_method_errno(m, r, NULL);
activation = new0(ProxyActivation, 1);
if (!activation)
return synthetic_reply_method_errno(m, -ENOMEM, NULL);
r = sd_bus_call_async(a,
&activation->slot,
msg,
driver_activation,
activation,
0);
if (r < 0) {
free(activation);
return synthetic_reply_method_errno(m, r, NULL);
}
activation->proxy = p;
activation->request = sd_bus_message_ref(m);
LIST_PREPEND(activations_by_proxy, p->activations, activation);
++p->n_activations;
return 1;
} else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "UpdateActivationEnvironment")) {
_cleanup_bus_message_unref_ sd_bus_message *msg = NULL;
@ -657,8 +707,8 @@ int bus_proxy_process_driver(Proxy *p, sd_bus *a, sd_bus *b, sd_bus_message *m,
if (r < 0)
return synthetic_reply_method_errno(m, r, NULL);
if (!args)
return synthetic_reply_method_errno(m, -EINVAL, NULL);
if (strv_isempty(args)) /* nothing to do? */
return synthetic_reply_method_return(m, NULL);
r = sd_bus_message_new_method_call(
a,

View File

@ -261,9 +261,18 @@ int proxy_new(Proxy **out, int in_fd, int out_fd, const char *destination) {
}
Proxy *proxy_free(Proxy *p) {
ProxyActivation *activation;
if (!p)
return NULL;
while ((activation = p->activations)) {
LIST_REMOVE(activations_by_proxy, p->activations, activation);
sd_bus_message_unref(activation->request);
sd_bus_slot_unref(activation->slot);
free(activation);
}
sd_bus_flush_close_unref(p->local_bus);
sd_bus_flush_close_unref(p->destination_bus);
set_free_free(p->owned_names);
@ -644,6 +653,10 @@ static int process_hello(Proxy *p, sd_bus_message *m) {
if (r < 0)
return log_error_errno(r, "Failed to append sender to NameAcquired message: %m");
r = sd_bus_message_set_destination(n, p->destination_bus->unique_name);
if (r < 0)
return log_error_errno(r, "Failed to set destination for NameAcquired message: %m");
r = bus_seal_synthetic_message(p->local_bus, n);
if (r < 0)
return log_error_errno(r, "Failed to seal NameAcquired message: %m");

View File

@ -25,6 +25,9 @@
#include "bus-xml-policy.h"
typedef struct Proxy Proxy;
typedef struct ProxyActivation ProxyActivation;
#define PROXY_ACTIVATIONS_MAX (16) /* max parallel activation requests */
struct Proxy {
sd_bus *local_bus;
@ -37,12 +40,22 @@ struct Proxy {
Set *owned_names;
SharedPolicy *policy;
LIST_HEAD(ProxyActivation, activations);
size_t n_activations;
bool got_hello : 1;
bool queue_overflow : 1;
bool message_matched : 1;
bool synthetic_matched : 1;
};
struct ProxyActivation {
LIST_FIELDS(ProxyActivation, activations_by_proxy);
Proxy *proxy;
sd_bus_message *request;
sd_bus_slot *slot;
};
int proxy_new(Proxy **out, int in_fd, int out_fd, const char *dest);
Proxy *proxy_free(Proxy *p);

View File

@ -214,22 +214,13 @@ int synthesize_name_acquired(Proxy *p, sd_bus *a, sd_bus *b, sd_bus_message *m)
if (r < 0)
return r;
r = sd_bus_message_set_destination(n, a->unique_name);
if (r < 0)
return r;
r = bus_seal_synthetic_message(b, n);
if (r < 0)
return r;
/*
* Make sure to only forward NameLost/NameAcquired messages if they
* match an installed MATCH rule of the local client. We really must
* not send messages the client doesn't expect.
*/
r = bus_match_run(b, &b->match_callbacks, n);
if (r >= 0 && p->message_matched)
r = sd_bus_send(b, n, NULL);
p->message_matched = false;
p->synthetic_matched = false;
return r;
return sd_bus_send(b, n, NULL);
}

View File

@ -1069,10 +1069,9 @@ static int method_dump(sd_bus_message *message, void *userdata, sd_bus_error *er
manager_dump_units(m, f, NULL);
manager_dump_jobs(m, f, NULL);
fflush(f);
if (ferror(f))
return -ENOMEM;
r = fflush_and_check(f);
if (r < 0)
return r;
return sd_bus_reply_method_return(message, "s", dump);
}

View File

@ -1701,6 +1701,7 @@ static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t
ssize_t n;
struct signalfd_siginfo sfsi;
bool sigchld = false;
int r;
assert(m);
assert(m->signal_fd == fd);
@ -1809,20 +1810,16 @@ static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t
f = open_memstream(&dump, &size);
if (!f) {
log_warning("Failed to allocate memory stream.");
log_warning_errno(errno, "Failed to allocate memory stream: %m");
break;
}
manager_dump_units(m, f, "\t");
manager_dump_jobs(m, f, "\t");
if (ferror(f)) {
log_warning("Failed to write status stream");
break;
}
if (fflush(f)) {
log_warning("Failed to flush status stream");
r = fflush_and_check(f);
if (r < 0) {
log_warning_errno(r, "Failed to write status stream: %m");
break;
}

View File

@ -1 +0,0 @@
../Makefile

View File

@ -1,162 +0,0 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/***
This file is part of systemd.
Copyright 2013 Lennart Poettering
systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <unistd.h>
#include <stdlib.h>
#include "efivars.h"
#include "path-util.h"
#include "util.h"
#include "mkdir.h"
#include "virt.h"
#include "generator.h"
#include "special.h"
static const char *arg_dest = "/tmp";
int main(int argc, char *argv[]) {
_cleanup_free_ char *what = NULL;
_cleanup_fclose_ FILE *f = NULL;
int r = EXIT_SUCCESS;
sd_id128_t id;
char *name;
if (argc > 1 && argc != 4) {
log_error("This program takes three or no arguments.");
return EXIT_FAILURE;
}
if (argc > 1)
arg_dest = argv[3];
log_set_target(LOG_TARGET_SAFE);
log_parse_environment();
log_open();
umask(0022);
if (in_initrd()) {
log_debug("In initrd, exiting.");
return EXIT_SUCCESS;
}
if (detect_container(NULL) > 0) {
log_debug("In a container, exiting.");
return EXIT_SUCCESS;
}
if (!is_efi_boot()) {
log_debug("Not an EFI boot, exiting.");
return EXIT_SUCCESS;
}
r = path_is_mount_point("/boot", AT_SYMLINK_FOLLOW);
if (r > 0) {
log_debug("/boot is already a mount point, exiting.");
return EXIT_SUCCESS;
}
if (r == -ENOENT)
log_debug("/boot does not exist, continuing.");
else if (dir_is_empty("/boot") <= 0) {
log_debug("/boot already populated, exiting.");
return EXIT_SUCCESS;
}
r = efi_loader_get_device_part_uuid(&id);
if (r == -ENOENT) {
log_debug("EFI loader partition unknown, exiting.");
return EXIT_SUCCESS;
} else if (r < 0) {
log_error_errno(r, "Failed to read ESP partition UUID: %m");
return EXIT_FAILURE;
}
name = strjoina(arg_dest, "/boot.mount");
f = fopen(name, "wxe");
if (!f) {
log_error_errno(errno, "Failed to create mount unit file %s: %m", name);
return EXIT_FAILURE;
}
r = asprintf(&what,
"/dev/disk/by-partuuid/%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
SD_ID128_FORMAT_VAL(id));
if (r < 0) {
log_oom();
return EXIT_FAILURE;
}
fprintf(f,
"# Automatially generated by systemd-efi-boot-generator\n\n"
"[Unit]\n"
"Description=EFI System Partition\n"
"Documentation=man:systemd-efi-boot-generator(8)\n");
r = generator_write_fsck_deps(f, arg_dest, what, "/boot", "vfat");
if (r < 0)
return EXIT_FAILURE;
fprintf(f,
"\n"
"[Mount]\n"
"What=%s\n"
"Where=/boot\n"
"Type=vfat\n"
"Options=umask=0077,noauto\n",
what);
r = fflush_and_check(f);
if (r < 0) {
log_error_errno(r, "Failed to write mount unit file: %m");
return EXIT_FAILURE;
}
name = strjoina(arg_dest, "/boot.automount");
fclose(f);
f = fopen(name, "wxe");
if (!f) {
log_error_errno(errno, "Failed to create automount unit file %s: %m", name);
return EXIT_FAILURE;
}
fputs("# Automatially generated by systemd-efi-boot-generator\n\n"
"[Unit]\n"
"Description=EFI System Partition Automount\n\n"
"[Automount]\n"
"Where=/boot\n"
"TimeoutIdleSec=120\n", f);
r = fflush_and_check(f);
if (r < 0) {
log_error_errno(r, "Failed to write automount unit file: %m");
return EXIT_FAILURE;
}
name = strjoina(arg_dest, "/" SPECIAL_LOCAL_FS_TARGET ".wants/boot.automount");
mkdir_parents(name, 0755);
if (symlink("../boot.automount", name) < 0) {
log_error_errno(errno, "Failed to create symlink %s: %m", name);
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}

View File

@ -728,9 +728,8 @@ static int parse_argv(int argc, char *argv[]) {
return -EINVAL;
}
free(arg_locale);
arg_locale = strdup(optarg);
if (!arg_locale)
r = free_and_strdup(&arg_locale, optarg);
if (r < 0)
return log_oom();
break;
@ -741,9 +740,8 @@ static int parse_argv(int argc, char *argv[]) {
return -EINVAL;
}
free(arg_locale_messages);
arg_locale_messages = strdup(optarg);
if (!arg_locale_messages)
r = free_and_strdup(&arg_locale_messages, optarg);
if (r < 0)
return log_oom();
break;
@ -754,19 +752,16 @@ static int parse_argv(int argc, char *argv[]) {
return -EINVAL;
}
free(arg_timezone);
arg_timezone = strdup(optarg);
if (!arg_timezone)
r = free_and_strdup(&arg_timezone, optarg);
if (r < 0)
return log_oom();
break;
case ARG_ROOT_PASSWORD:
free(arg_root_password);
arg_root_password = strdup(optarg);
if (!arg_root_password)
r = free_and_strdup(&arg_root_password, optarg);
if (r < 0)
return log_oom();
break;
case ARG_ROOT_PASSWORD_FILE:
@ -785,9 +780,8 @@ static int parse_argv(int argc, char *argv[]) {
return -EINVAL;
}
free(arg_hostname);
arg_hostname = strdup(optarg);
if (!arg_hostname)
r = free_and_strdup(&arg_hostname, optarg);
if (r < 0)
return log_oom();
break;

View File

@ -46,51 +46,6 @@ static bool arg_enabled = true;
static bool arg_root_enabled = true;
static bool arg_root_rw = false;
static int add_swap(const char *path) {
_cleanup_free_ char *name = NULL, *unit = NULL, *lnk = NULL;
_cleanup_fclose_ FILE *f = NULL;
int r;
assert(path);
log_debug("Adding swap: %s", path);
r = unit_name_from_path(path, ".swap", &name);
if (r < 0)
return log_error_errno(r, "Failed to generate unit name: %m");
unit = strjoin(arg_dest, "/", name, NULL);
if (!unit)
return log_oom();
f = fopen(unit, "wxe");
if (!f)
return log_error_errno(errno, "Failed to create unit file %s: %m", unit);
fprintf(f,
"# Automatically generated by systemd-gpt-auto-generator\n\n"
"[Unit]\n"
"Description=Swap Partition\n"
"Documentation=man:systemd-gpt-auto-generator(8)\n\n"
"[Swap]\n"
"What=%s\n",
path);
fflush(f);
if (ferror(f))
return log_error_errno(errno, "Failed to write unit file %s: %m", unit);
lnk = strjoin(arg_dest, "/" SPECIAL_SWAP_TARGET ".wants/", name, NULL);
if (!lnk)
return log_oom();
mkdir_parents_label(lnk, 0755);
if (symlink(unit, lnk) < 0)
return log_error_errno(errno, "Failed to create symlink %s: %m", lnk);
return 0;
}
static int add_cryptsetup(const char *id, const char *what, bool rw, char **device) {
_cleanup_free_ char *e = NULL, *n = NULL, *p = NULL, *d = NULL, *to = NULL;
_cleanup_fclose_ FILE *f = NULL;
@ -142,9 +97,9 @@ static int add_cryptsetup(const char *id, const char *what, bool rw, char **devi
id, what, rw ? "" : "read-only",
id);
fflush(f);
if (ferror(f))
return log_error_errno(errno, "Failed to write file %s: %m", p);
r = fflush_and_check(f);
if (r < 0)
return log_error_errno(r, "Failed to write file %s: %m", p);
from = strjoina("../", n);
@ -202,6 +157,7 @@ static int add_mount(
const char *where,
const char *fstype,
bool rw,
const char *options,
const char *description,
const char *post) {
@ -262,11 +218,14 @@ static int add_mount(
if (fstype)
fprintf(f, "Type=%s\n", fstype);
fprintf(f, "Options=%s\n", rw ? "rw" : "ro");
if (options)
fprintf(f, "Options=%s,%s\n", options, rw ? "rw" : "ro");
else
fprintf(f, "Options=%s\n", rw ? "rw" : "ro");
fflush(f);
if (ferror(f))
return log_error_errno(errno, "Failed to write unit file %s: %m", p);
r = fflush_and_check(f);
if (r < 0)
return log_error_errno(r, "Failed to write unit file %s: %m", p);
if (post) {
lnk = strjoin(arg_dest, "/", post, ".requires/", unit, NULL);
@ -281,6 +240,104 @@ static int add_mount(
return 0;
}
static int add_automount(
const char *id,
const char *what,
const char *where,
const char *fstype,
bool rw,
const char *options,
const char *description,
usec_t timeout) {
_cleanup_free_ char *unit = NULL, *lnk = NULL, *crypto_what = NULL;
_cleanup_free_ char *opt, *p = NULL;
_cleanup_fclose_ FILE *f = NULL;
int r;
assert(id);
assert(where);
assert(description);
if (options)
opt = strjoin(options, ",noauto", NULL);
else
opt = strdup("noauto");
if (!opt)
return log_oom();
r = add_mount(id,
what,
where,
fstype,
rw,
opt,
description,
NULL);
if (r < 0)
return r;
r = unit_name_from_path(where, ".automount", &unit);
if (r < 0)
return log_error_errno(r, "Failed to generate unit name: %m");
p = strjoin(arg_dest, "/", unit, NULL);
if (!p)
return log_oom();
f = fopen(p, "wxe");
if (!f)
return log_error_errno(errno, "Failed to create unit file %s: %m", unit);
fprintf(f,
"# Automatically generated by systemd-gpt-auto-generator\n\n"
"[Unit]\n"
"Description=%s\n"
"Documentation=man:systemd-gpt-auto-generator(8)\n"
"[Automount]\n"
"Where=%s\n"
"TimeoutIdleSec=%lld\n",
description,
where,
(unsigned long long)timeout / USEC_PER_SEC);
r = fflush_and_check(f);
if (r < 0)
return log_error_errno(r, "Failed to write unit file %s: %m", p);
lnk = strjoin(arg_dest, "/" SPECIAL_LOCAL_FS_TARGET ".wants/", unit, NULL);
if (!lnk)
return log_oom();
mkdir_parents_label(lnk, 0755);
if (symlink(p, lnk) < 0)
return log_error_errno(errno, "Failed to create symlink %s: %m", lnk);
return 0;
}
static bool path_is_busy(const char *where) {
int r;
/* already a mountpoint; generators run during reload */
r = path_is_mount_point(where, AT_SYMLINK_FOLLOW);
if (r > 0)
return false;
/* the directory might not exist on a stateless system */
if (r == -ENOENT)
return false;
if (r < 0)
return true;
/* not a mountpoint but it contains files */
if (dir_is_empty(where) <= 0)
return true;
return false;
}
static int probe_and_add_mount(
const char *id,
const char *what,
@ -298,8 +355,7 @@ static int probe_and_add_mount(
assert(where);
assert(description);
if (path_is_mount_point(where, AT_SYMLINK_FOLLOW) <= 0 &&
dir_is_empty(where) <= 0) {
if (path_is_busy(where)) {
log_debug("%s already populated, ignoring.", where);
return 0;
}
@ -335,21 +391,163 @@ static int probe_and_add_mount(
where,
fstype,
rw,
NULL,
description,
post);
}
static int add_swap(const char *path) {
_cleanup_free_ char *name = NULL, *unit = NULL, *lnk = NULL;
_cleanup_fclose_ FILE *f = NULL;
int r;
assert(path);
log_debug("Adding swap: %s", path);
r = unit_name_from_path(path, ".swap", &name);
if (r < 0)
return log_error_errno(r, "Failed to generate unit name: %m");
unit = strjoin(arg_dest, "/", name, NULL);
if (!unit)
return log_oom();
f = fopen(unit, "wxe");
if (!f)
return log_error_errno(errno, "Failed to create unit file %s: %m", unit);
fprintf(f,
"# Automatically generated by systemd-gpt-auto-generator\n\n"
"[Unit]\n"
"Description=Swap Partition\n"
"Documentation=man:systemd-gpt-auto-generator(8)\n\n"
"[Swap]\n"
"What=%s\n",
path);
r = fflush_and_check(f);
if (r < 0)
return log_error_errno(r, "Failed to write unit file %s: %m", unit);
lnk = strjoin(arg_dest, "/" SPECIAL_SWAP_TARGET ".wants/", name, NULL);
if (!lnk)
return log_oom();
mkdir_parents_label(lnk, 0755);
if (symlink(unit, lnk) < 0)
return log_error_errno(errno, "Failed to create symlink %s: %m", lnk);
return 0;
}
static int add_boot(const char *what) {
#ifdef ENABLE_EFI
_cleanup_blkid_free_probe_ blkid_probe b = NULL;
const char *fstype = NULL, *uuid = NULL;
sd_id128_t id, type_id;
int r;
assert(what);
if (!is_efi_boot()) {
log_debug("Not an EFI boot, ignoring /boot.");
return 0;
}
if (in_initrd()) {
log_debug("In initrd, ignoring /boot.");
return 0;
}
if (detect_container(NULL) > 0) {
log_debug("In a container, ignoring /boot.");
return 0;
}
if (path_is_busy("/boot")) {
log_debug("/boot already populated, ignoring.");
return 0;
}
r = efi_loader_get_device_part_uuid(&id);
if (r == -ENOENT) {
log_debug("EFI loader partition unknown.");
return 0;
}
if (r < 0) {
log_error_errno(r, "Failed to read ESP partition UUID: %m");
return r;
}
errno = 0;
b = blkid_new_probe_from_filename(what);
if (!b) {
if (errno == 0)
return log_oom();
log_error_errno(errno, "Failed to allocate prober: %m");
return -errno;
}
blkid_probe_enable_partitions(b, 1);
blkid_probe_set_partitions_flags(b, BLKID_PARTS_ENTRY_DETAILS);
errno = 0;
r = blkid_do_safeprobe(b);
if (r == -2 || r == 1) /* no result or uncertain */
return 0;
else if (r != 0)
return log_error_errno(errno ?: EIO, "Failed to probe %s: %m", what);
(void) blkid_probe_lookup_value(b, "TYPE", &fstype, NULL);
if (!streq(fstype, "vfat")) {
log_debug("Partition for /boot is not a FAT filesystem, ignoring.");
return 0;
}
r = blkid_probe_lookup_value(b, "PART_ENTRY_UUID", &uuid, NULL);
if (r != 0) {
log_debug_errno(r, "Partition for /boot does not have a UUID, ignoring. %m");
return 0;
}
if (sd_id128_from_string(uuid, &type_id) < 0) {
log_debug("Partition for /boot does not have a valid UUID, ignoring.");
return 0;
}
if (!sd_id128_equal(type_id, id)) {
log_debug("Partition for /boot does not appear to be the partition we are booted from.");
return 0;
}
r = add_automount("boot",
what,
"/boot",
"vfat",
"EFI System Partition Automount",
false,
"umask=0077",
120 * USEC_PER_SEC);
return r;
#else
return 0;
#endif
}
static int enumerate_partitions(dev_t devnum) {
_cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL;
_cleanup_udev_device_unref_ struct udev_device *d = NULL;
_cleanup_blkid_free_probe_ blkid_probe b = NULL;
_cleanup_udev_unref_ struct udev *udev = NULL;
_cleanup_free_ char *home = NULL, *srv = NULL;
_cleanup_free_ char *boot = NULL, *home = NULL, *srv = NULL;
struct udev_list_entry *first, *item;
struct udev_device *parent = NULL;
const char *name, *node, *pttype, *devtype;
int home_nr = -1, srv_nr = -1;
int boot_nr = -1, home_nr = -1, srv_nr = -1;
bool home_rw = true, srv_rw = true;
blkid_partlist pl;
int r, k;
@ -521,6 +719,18 @@ static int enumerate_partitions(dev_t devnum) {
if (k < 0)
r = k;
} else if (sd_id128_equal(type_id, GPT_ESP)) {
/* We only care for the first /boot partition */
if (boot && nr >= boot_nr)
continue;
boot_nr = nr;
r = free_and_strdup(&boot, subnode);
if (r < 0)
return log_oom();
} else if (sd_id128_equal(type_id, GPT_HOME)) {
/* We only care for the first /home partition */
@ -530,9 +740,8 @@ static int enumerate_partitions(dev_t devnum) {
home_nr = nr;
home_rw = !(flags & GPT_FLAG_READ_ONLY),
free(home);
home = strdup(subnode);
if (!home)
r = free_and_strdup(&home, subnode);
if (r < 0)
return log_oom();
} else if (sd_id128_equal(type_id, GPT_SRV)) {
@ -544,13 +753,18 @@ static int enumerate_partitions(dev_t devnum) {
srv_nr = nr;
srv_rw = !(flags & GPT_FLAG_READ_ONLY),
free(srv);
srv = strdup(subnode);
if (!srv)
r = free_and_strdup(&srv, subnode);
if (r < 0)
return log_oom();
}
}
if (boot) {
k = add_boot(boot);
if (k < 0)
r = k;
}
if (home) {
k = probe_and_add_mount("home", home, "/home", home_rw, "Home Partition", SPECIAL_LOCAL_FS_TARGET);
if (k < 0)
@ -645,6 +859,7 @@ static int add_root_mount(void) {
in_initrd() ? "/sysroot" : "/",
NULL,
arg_root_rw,
NULL,
"Root Partition",
in_initrd() ? SPECIAL_INITRD_ROOT_FS_TARGET : SPECIAL_LOCAL_FS_TARGET);
#else

View File

@ -1114,6 +1114,7 @@ static int accept_connection(const char* type, int fd,
r = socknameinfo_pretty(&addr->sockaddr, addr->size, &b);
if (r < 0) {
log_error_errno(r, "Resolving hostname failed: %m");
close(fd2);
return r;
}

View File

@ -126,26 +126,31 @@ static int update_cursor_state(Uploader *u) {
r = fopen_temporary(u->state_file, &f, &temp_path);
if (r < 0)
goto finish;
goto fail;
fprintf(f,
"# This is private data. Do not parse.\n"
"LAST_CURSOR=%s\n",
u->last_cursor);
fflush(f);
r = fflush_and_check(f);
if (r < 0)
goto fail;
if (ferror(f) || rename(temp_path, u->state_file) < 0) {
if (rename(temp_path, u->state_file) < 0) {
r = -errno;
unlink(u->state_file);
unlink(temp_path);
goto fail;
}
finish:
if (r < 0)
log_error_errno(r, "Failed to save state %s: %m", u->state_file);
return 0;
return r;
fail:
if (temp_path)
(void) unlink(temp_path);
(void) unlink(u->state_file);
return log_error_errno(r, "Failed to save state %s: %m", u->state_file);
}
static int load_cursor_state(Uploader *u) {

View File

@ -371,25 +371,23 @@ static long write_catalog(const char *database, Hashmap *h, struct strbuf *sb,
goto error;
}
fflush(w);
if (ferror(w)) {
log_error("%s: failed to write database.", p);
r = fflush_and_check(w);
if (r < 0) {
log_error_errno(r, "%s: failed to write database: %m", p);
goto error;
}
fchmod(fileno(w), 0644);
if (rename(p, database) < 0) {
log_error_errno(errno, "rename (%s -> %s) failed: %m", p, database);
r = -errno;
r = log_error_errno(errno, "rename (%s -> %s) failed: %m", p, database);
goto error;
}
return ftell(w);
error:
unlink(p);
(void) unlink(p);
return r;
}

View File

@ -142,7 +142,7 @@ static int stdout_stream_save(StdoutStream *s) {
r = fopen_temporary(s->state_file, &f, &temp_path);
if (r < 0)
goto finish;
goto fail;
fprintf(f,
"# This is private data. Do not parse\n"
@ -163,7 +163,7 @@ static int stdout_stream_save(StdoutStream *s) {
escaped = cescape(s->identifier);
if (!escaped) {
r = -ENOMEM;
goto finish;
goto fail;
}
fprintf(f, "IDENTIFIER=%s\n", escaped);
@ -175,7 +175,7 @@ static int stdout_stream_save(StdoutStream *s) {
escaped = cescape(s->unit_id);
if (!escaped) {
r = -ENOMEM;
goto finish;
goto fail;
}
fprintf(f, "UNIT=%s\n", escaped);
@ -183,16 +183,13 @@ static int stdout_stream_save(StdoutStream *s) {
r = fflush_and_check(f);
if (r < 0)
goto finish;
goto fail;
if (rename(temp_path, s->state_file) < 0) {
r = -errno;
goto finish;
goto fail;
}
free(temp_path);
temp_path = NULL;
/* Store the connection fd in PID 1, so that we get it passed
* in again on next start */
if (!s->fdstore) {
@ -200,14 +197,15 @@ static int stdout_stream_save(StdoutStream *s) {
s->fdstore = true;
}
finish:
return 0;
fail:
(void) unlink(s->state_file);
if (temp_path)
unlink(temp_path);
(void) unlink(temp_path);
if (r < 0)
log_error_errno(r, "Failed to save stream data %s: %m", s->state_file);
return r;
return log_error_errno(r, "Failed to save stream data %s: %m", s->state_file);
}
static int stdout_stream_log(StdoutStream *s, const char *p) {

View File

@ -643,13 +643,13 @@ int sd_dhcp_lease_save(sd_dhcp_lease *lease, const char *lease_file) {
r = fopen_temporary(lease_file, &f, &temp_path);
if (r < 0)
goto finish;
goto fail;
fchmod(fileno(f), 0644);
r = sd_dhcp_lease_get_address(lease, &address);
if (r < 0)
goto finish;
goto fail;
fprintf(f,
"# This is private data. Do not parse.\n"
@ -657,7 +657,7 @@ int sd_dhcp_lease_save(sd_dhcp_lease *lease, const char *lease_file) {
r = sd_dhcp_lease_get_netmask(lease, &address);
if (r < 0)
goto finish;
goto fail;
fprintf(f, "NETMASK=%s\n", inet_ntoa(address));
@ -713,7 +713,7 @@ int sd_dhcp_lease_save(sd_dhcp_lease *lease, const char *lease_file) {
client_id_hex = hexmem(client_id, client_id_len);
if (!client_id_hex) {
r = -ENOMEM;
goto finish;
goto fail;
}
fprintf(f, "CLIENTID=%s\n", client_id_hex);
}
@ -725,26 +725,27 @@ int sd_dhcp_lease_save(sd_dhcp_lease *lease, const char *lease_file) {
option_hex = hexmem(data, data_len);
if (!option_hex) {
r = -ENOMEM;
goto finish;
goto fail;
}
fprintf(f, "VENDOR_SPECIFIC=%s\n", option_hex);
}
r = 0;
r = fflush_and_check(f);
if (r < 0)
goto fail;
fflush(f);
if (ferror(f) || rename(temp_path, lease_file) < 0) {
if (rename(temp_path, lease_file) < 0) {
r = -errno;
unlink(lease_file);
unlink(temp_path);
goto fail;
}
finish:
if (r < 0)
log_error_errno(r, "Failed to save lease data %s: %m", lease_file);
return 0;
return r;
fail:
if (temp_path)
(void) unlink(temp_path);
return log_error_errno(r, "Failed to save lease data %s: %m", lease_file);
}
int sd_dhcp_lease_load(sd_dhcp_lease **ret, const char *lease_file) {

View File

@ -440,7 +440,7 @@ int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) {
r = fopen_temporary(lldp_file, &f, &temp_path);
if (r < 0)
goto finish;
goto fail;
fchmod(fileno(f), 0644);
@ -457,8 +457,10 @@ int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) {
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], type);
s = strdup(buf);
if (!s)
return -ENOMEM;
if (!s) {
r = -ENOMEM;
goto fail;
}
r = lldp_read_port_id(p->packet, &type, &length, &port_id);
if (r < 0)
@ -466,8 +468,10 @@ int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) {
if (type != LLDP_PORT_SUBTYPE_MAC_ADDRESS) {
k = strndup((char *) port_id, length -1);
if (!k)
return -ENOMEM;
if (!k) {
r = -ENOMEM;
goto fail;
}
sprintf(buf, "'_Port=%s' '_PType=%d' ", k , type);
free(k);
@ -478,8 +482,10 @@ int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) {
}
k = strappend(s, buf);
if (!k)
return -ENOMEM;
if (!k) {
r = -ENOMEM;
goto fail;
}
free(s);
s = k;
@ -493,8 +499,10 @@ int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) {
sprintf(buf, "'_TTL="USEC_FMT"' ", p->until);
k = strappend(s, buf);
if (!k)
return -ENOMEM;
if (!k) {
r = -ENOMEM;
goto fail;
}
free(s);
s = k;
@ -504,15 +512,19 @@ int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) {
k = strappend(s, "'_NAME=N/A' ");
else {
t = strndup(k, length);
if (!t)
return -ENOMEM;
if (!t) {
r = -ENOMEM;
goto fail;
}
k = strjoin(s, "'_NAME=", t, "' ", NULL);
free(t);
}
if (!k)
return -ENOMEM;
if (!k) {
r = -ENOMEM;
goto fail;
}
free(s);
s = k;
@ -522,8 +534,10 @@ int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) {
sprintf(buf, "'_CAP=%x'", data);
k = strappend(s, buf);
if (!k)
return -ENOMEM;
if (!k) {
r = -ENOMEM;
goto fail;
}
free(s);
s = k;
@ -531,21 +545,23 @@ int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) {
fprintf(f, "%s\n", s);
}
}
r = 0;
fflush(f);
r = fflush_and_check(f);
if (r < 0)
goto fail;
if (ferror(f) || rename(temp_path, lldp_file) < 0) {
if (rename(temp_path, lldp_file) < 0) {
r = -errno;
unlink(lldp_file);
unlink(temp_path);
goto fail;
}
finish:
if (r < 0)
log_error("Failed to save lldp data %s: %s", lldp_file, strerror(-r));
return 0;
return r;
fail:
if (temp_path)
(void) unlink(temp_path);
return log_error_errno(r, "Failed to save lldp data %s: %m", lldp_file);
}
int sd_lldp_start(sd_lldp *lldp) {

View File

@ -256,9 +256,7 @@ static int kernel_get_list(sd_bus *bus, uint64_t flags, char ***x) {
name_list = (struct kdbus_info *) ((uint8_t *) bus->kdbus_buffer + cmd.offset);
KDBUS_FOREACH(name, name_list, cmd.list_size) {
struct kdbus_item *item;
const char *entry_name = NULL;
if ((flags & KDBUS_LIST_UNIQUE) && name->id != previous_id) {
char *n;
@ -275,15 +273,15 @@ static int kernel_get_list(sd_bus *bus, uint64_t flags, char ***x) {
previous_id = name->id;
}
KDBUS_ITEM_FOREACH(item, name, items)
if (item->type == KDBUS_ITEM_OWNED_NAME)
entry_name = item->name.name;
if (entry_name && service_name_is_valid(entry_name)) {
r = strv_extend(x, entry_name);
if (r < 0) {
r = -ENOMEM;
goto fail;
KDBUS_ITEM_FOREACH(item, name, items) {
if (item->type == KDBUS_ITEM_OWNED_NAME) {
if (service_name_is_valid(item->name.name)) {
r = strv_extend(x, item->name.name);
if (r < 0) {
r = -ENOMEM;
goto fail;
}
}
}
}
}

View File

@ -551,9 +551,8 @@ int bus_pcap_header(size_t snaplen, FILE *f) {
hdr.snaplen = (uint32_t) snaplen;
fwrite(&hdr, 1, sizeof(hdr), f);
fflush(f);
return 0;
return fflush_and_check(f);
}
int bus_message_pcap_frame(sd_bus_message *m, size_t snaplen, FILE *f) {
@ -598,7 +597,5 @@ int bus_message_pcap_frame(sd_bus_message *m, size_t snaplen, FILE *f) {
snaplen -= w;
}
fflush(f);
return 0;
return fflush_and_check(f);
}

View File

@ -75,14 +75,19 @@ int bus_gvariant_get_size(const char *signature) {
case SD_BUS_TYPE_STRUCT_BEGIN:
case SD_BUS_TYPE_DICT_ENTRY_BEGIN: {
char t[n-1];
if (n == 2) {
/* unary type () has fixed size of 1 */
r = 1;
} else {
char t[n-1];
memcpy(t, p + 1, n - 2);
t[n - 2] = 0;
memcpy(t, p + 1, n - 2);
t[n - 2] = 0;
r = bus_gvariant_get_size(t);
if (r < 0)
return r;
r = bus_gvariant_get_size(t);
if (r < 0)
return r;
}
sum += r;
break;

View File

@ -179,10 +179,10 @@ int introspect_finish(struct introspect *i, sd_bus *bus, sd_bus_message *m, sd_b
assert(reply);
fputs("</node>\n", i->f);
fflush(i->f);
if (ferror(i->f))
return -ENOMEM;
r = fflush_and_check(i->f);
if (r < 0)
return r;
r = sd_bus_message_new_method_return(m, &q);
if (r < 0)
@ -204,8 +204,6 @@ void introspect_free(struct introspect *i) {
if (i->f)
fclose(i->f);
if (i->introspection)
free(i->introspection);
free(i->introspection);
zero(*i);
}

View File

@ -914,6 +914,7 @@ char *bus_match_to_string(struct bus_match_component *components, unsigned n_com
char *buffer = NULL;
size_t size = 0;
unsigned i;
int r;
if (n_components <= 0)
return strdup("");
@ -942,8 +943,8 @@ char *bus_match_to_string(struct bus_match_component *components, unsigned n_com
fputc('\'', f);
}
fflush(f);
if (ferror(f))
r = fflush_and_check(f);
if (r < 0)
return NULL;
return buffer;

View File

@ -2209,7 +2209,14 @@ static int bus_message_close_struct(sd_bus_message *m, struct bus_container *c,
assert(!c->need_offsets || i == c->n_offsets);
assert(c->need_offsets || n_variable == 0);
if (n_variable <= 0) {
if (isempty(c->signature)) {
/* The unary type is encoded as fixed 1 byte padding */
a = message_extend_body(m, 1, 1, add_offset, false);
if (!a)
return -ENOMEM;
*a = 0;
} else if (n_variable <= 0) {
int alignment = 1;
/* Structures with fixed-size members only have to be
@ -2899,18 +2906,20 @@ static int bus_message_close_header(sd_bus_message *m) {
signature = strempty(m->root_container.signature);
l = strlen(signature);
sz = bus_gvariant_determine_word_size(sizeof(struct bus_header) + ALIGN8(m->fields_size) + m->body_size + 1 + l, 1);
d = message_extend_body(m, 1, 1 + l + sz, false, true);
sz = bus_gvariant_determine_word_size(sizeof(struct bus_header) + ALIGN8(m->fields_size) + m->body_size + 1 + l + 2, 1);
d = message_extend_body(m, 1, 1 + l + 2 + sz, false, true);
if (!d)
return -ENOMEM;
*(uint8_t*) d = 0;
memcpy((uint8_t*) d + 1, signature, l);
*((uint8_t*) d + 1) = SD_BUS_TYPE_STRUCT_BEGIN;
memcpy((uint8_t*) d + 2, signature, l);
*((uint8_t*) d + 1 + l + 1) = SD_BUS_TYPE_STRUCT_END;
bus_gvariant_write_word_le((uint8_t*) d + 1 + l, sz, sizeof(struct bus_header) + m->fields_size);
bus_gvariant_write_word_le((uint8_t*) d + 1 + l + 2, sz, sizeof(struct bus_header) + m->fields_size);
m->footer = d;
m->footer_accessible = 1 + l + sz;
m->footer_accessible = 1 + l + 2 + sz;
} else {
m->header->dbus1.fields_size = m->fields_size;
m->header->dbus1.body_size = m->body_size;
@ -3814,6 +3823,14 @@ static int build_struct_offsets(
assert(n_offsets);
if (isempty(signature)) {
/* Unary type is encoded as *fixed* 1 byte padding */
r = message_peek_body(m, &m->rindex, 1, 1, &q);
if (r < 0)
return r;
if (*(uint8_t *) q != 0)
return -EBADMSG;
*item_size = 0;
*offsets = NULL;
*n_offsets = 0;
@ -3954,12 +3971,6 @@ static int enter_struct_or_dict_entry(
if (r < 0)
return r;
} else if (c->item_size <= 0) {
/* gvariant empty struct */
*item_size = 0;
*offsets = NULL;
*n_offsets = 0;
} else
/* gvariant with contents */
return build_struct_offsets(m, contents, c->item_size, item_size, offsets, n_offsets);
@ -4146,7 +4157,14 @@ _public_ int sd_bus_message_enter_container(sd_bus_message *m,
w->before = before;
w->begin = m->rindex;
w->end = m->rindex + c->item_size;
/* Unary type has fixed size of 1, but virtual size of 0 */
if (BUS_MESSAGE_IS_GVARIANT(m) &&
type == SD_BUS_TYPE_STRUCT &&
isempty(signature))
w->end = m->rindex + 0;
else
w->end = m->rindex + c->item_size;
w->array_size = array_size;
w->item_size = item_size;
@ -4756,7 +4774,6 @@ _public_ int sd_bus_message_skip(sd_bus_message *m, const char *types) {
r = sd_bus_message_skip(m, s);
if (r < 0)
return r;
assert(r != 0);
r = sd_bus_message_exit_container(m);
if (r < 0)
@ -5164,11 +5181,21 @@ int bus_message_parse_fields(sd_bus_message *m) {
return -EBADMSG;
if (*p == 0) {
size_t l;
char *c;
/* We found the beginning of the signature string, yay! */
/* We found the beginning of the signature
* string, yay! We require the body to be a
* structure, so verify it and then strip the
* opening/closing brackets. */
c = strndup(p + 1, ((char*) m->footer + m->footer_accessible) - p - (1 + sz));
l = ((char*) m->footer + m->footer_accessible) - p - (1 + sz);
if (l < 2 ||
p[1] != SD_BUS_TYPE_STRUCT_BEGIN ||
p[1 + l - 1] != SD_BUS_TYPE_STRUCT_END)
return -EBADMSG;
c = strndup(p + 1 + 1, l - 2);
if (!c)
return -ENOMEM;

View File

@ -896,10 +896,9 @@ static int parse_container_kernel_address(sd_bus *b, const char **p, char **guid
} else
b->nspid = 0;
free(b->kernel);
b->kernel = strdup("/sys/fs/kdbus/0-system/bus");
if (!b->kernel)
return -ENOMEM;
r = free_and_strdup(&b->kernel, "/sys/fs/kdbus/0-system/bus");
if (r < 0)
return r;
return 0;
}

View File

@ -59,7 +59,7 @@ static void test_bus_gvariant_is_fixed_size(void) {
static void test_bus_gvariant_get_size(void) {
assert_se(bus_gvariant_get_size("") == 0);
assert_se(bus_gvariant_get_size("()") == 0);
assert_se(bus_gvariant_get_size("()") == 1);
assert_se(bus_gvariant_get_size("y") == 1);
assert_se(bus_gvariant_get_size("u") == 4);
assert_se(bus_gvariant_get_size("b") == 1);

View File

@ -134,6 +134,9 @@ int main(int argc, char *argv[]) {
r = sd_bus_message_append(m, "y(ty)y(yt)y", 8, 777ULL, 7, 9, 77, 7777ULL, 10);
assert_se(r >= 0);
r = sd_bus_message_append(m, "()");
assert_se(r >= 0);
r = sd_bus_message_append(m, "ba(ss)", 255, 3, "aaa", "1", "bbb", "2", "ccc", "3");
assert_se(r >= 0);
@ -271,6 +274,9 @@ int main(int argc, char *argv[]) {
assert_se(r > 0);
assert_se(v == 10);
r = sd_bus_message_read(m, "()");
assert_se(r > 0);
r = sd_bus_message_read(m, "ba(ss)", &boolean, 3, &x, &y, &a, &b, &c, &d);
assert_se(r > 0);
assert_se(boolean);
@ -350,7 +356,7 @@ int main(int argc, char *argv[]) {
assert_se(sd_bus_message_verify_type(m, 'a', "{yv}") > 0);
r = sd_bus_message_skip(m, "a{yv}y(ty)y(yt)y");
r = sd_bus_message_skip(m, "a{yv}y(ty)y(yt)y()");
assert_se(r >= 0);
assert_se(sd_bus_message_verify_type(m, 'b', NULL) > 0);

View File

@ -53,7 +53,9 @@ static int test_proxy_acquired(sd_bus_message *m, void *userdata, sd_bus_error *
static void test_proxy_matched(void) {
_cleanup_bus_flush_close_unref_ sd_bus *a = NULL;
_cleanup_free_ char *matchstr = NULL;
TestProxyMatch match = {};
const char *me;
int r;
/* open bus 'a' */
@ -70,10 +72,17 @@ static void test_proxy_matched(void) {
r = sd_bus_start(a);
assert_se(r >= 0);
r = sd_bus_add_match(a, NULL,
"type='signal',"
"member='NameAcquired'",
test_proxy_acquired, &match);
r = sd_bus_get_unique_name(a, &me);
assert_se(r >= 0);
matchstr = strjoin("type='signal',"
"member='NameAcquired',"
"destination='",
me,
"'",
NULL);
assert_se(matchstr);
r = sd_bus_add_match(a, NULL, matchstr, test_proxy_acquired, &match);
assert_se(r >= 0);
r = sd_bus_get_unique_name(a, &match.sender);

View File

@ -1082,12 +1082,10 @@ int device_update_db(sd_device *device) {
return 0;
fail:
log_error_errno(r, "failed to create %s file '%s' for '%s'", has_info ? "db" : "empty",
path, device->devpath);
unlink(path);
unlink(path_tmp);
(void) unlink(path);
(void) unlink(path_tmp);
return r;
return log_error_errno(r, "failed to create %s file '%s' for '%s'", has_info ? "db" : "empty", path, device->devpath);
}
int device_delete_db(sd_device *device) {

View File

@ -262,6 +262,24 @@ int sd_netlink_message_append_string(sd_netlink_message *m, unsigned short type,
return 0;
}
int sd_netlink_message_append_flag(sd_netlink_message *m, unsigned short type) {
size_t size;
int r;
assert_return(m, -EINVAL);
assert_return(!m->sealed, -EPERM);
r = message_attribute_has_type(m, &size, type, NETLINK_TYPE_FLAG);
if (r < 0)
return r;
r = add_rtattr(m, type, NULL, 0);
if (r < 0)
return r;
return 0;
}
int sd_netlink_message_append_u8(sd_netlink_message *m, unsigned short type, uint8_t data) {
int r;

View File

@ -117,20 +117,30 @@ static const NLType rtnl_link_info_data_vlan_types[IFLA_VLAN_MAX + 1] = {
};
static const NLType rtnl_link_info_data_vxlan_types[IFLA_VXLAN_MAX+1] = {
[IFLA_VXLAN_ID] = { .type = NETLINK_TYPE_U32 },
[IFLA_VXLAN_GROUP] = { .type = NETLINK_TYPE_IN_ADDR },
[IFLA_VXLAN_LINK] = { .type = NETLINK_TYPE_U32 },
[IFLA_VXLAN_LOCAL] = { .type = NETLINK_TYPE_U32},
[IFLA_VXLAN_TTL] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_TOS] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_LEARNING] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_AGEING] = { .type = NETLINK_TYPE_U32 },
[IFLA_VXLAN_LIMIT] = { .type = NETLINK_TYPE_U32 },
[IFLA_VXLAN_PORT_RANGE] = { .type = NETLINK_TYPE_U32},
[IFLA_VXLAN_PROXY] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_RSC] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_L2MISS] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_L3MISS] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_ID] = { .type = NETLINK_TYPE_U32 },
[IFLA_VXLAN_GROUP] = { .type = NETLINK_TYPE_IN_ADDR },
[IFLA_VXLAN_LINK] = { .type = NETLINK_TYPE_U32 },
[IFLA_VXLAN_LOCAL] = { .type = NETLINK_TYPE_U32},
[IFLA_VXLAN_TTL] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_TOS] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_LEARNING] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_AGEING] = { .type = NETLINK_TYPE_U32 },
[IFLA_VXLAN_LIMIT] = { .type = NETLINK_TYPE_U32 },
[IFLA_VXLAN_PORT_RANGE] = { .type = NETLINK_TYPE_U32},
[IFLA_VXLAN_PROXY] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_RSC] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_L2MISS] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_L3MISS] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_PORT] = { .type = NETLINK_TYPE_U16 },
[IFLA_VXLAN_GROUP6] = { .type = NETLINK_TYPE_IN_ADDR },
[IFLA_VXLAN_LOCAL6] = { .type = NETLINK_TYPE_IN_ADDR },
[IFLA_VXLAN_UDP_CSUM] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_UDP_ZERO_CSUM6_TX] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_UDP_ZERO_CSUM6_RX] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_REMCSUM_TX] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_REMCSUM_RX] = { .type = NETLINK_TYPE_U8 },
[IFLA_VXLAN_GBP] = { .type = NETLINK_TYPE_FLAG },
[IFLA_VXLAN_REMCSUM_NOPARTIAL] = { .type = NETLINK_TYPE_FLAG },
};
static const NLType rtnl_bond_arp_target_types[BOND_ARP_TARGETS_MAX + 1] = {

View File

@ -28,6 +28,7 @@ enum {
NETLINK_TYPE_U32, /* NLA_U32 */
NETLINK_TYPE_U64, /* NLA_U64 */
NETLINK_TYPE_STRING, /* NLA_STRING */
NETLINK_TYPE_FLAG, /* NLA_FLAG */
NETLINK_TYPE_IN_ADDR,
NETLINK_TYPE_ETHER_ADDR,
NETLINK_TYPE_CACHE_INFO,

View File

@ -476,15 +476,25 @@ static int x11_write_data(Context *c) {
fprintf(f, " Option \"XkbOptions\" \"%s\"\n", c->x11_options);
fputs("EndSection\n", f);
fflush(f);
if (ferror(f) || rename(temp_path, "/etc/X11/xorg.conf.d/00-keyboard.conf") < 0) {
r = fflush_and_check(f);
if (r < 0)
goto fail;
if (rename(temp_path, "/etc/X11/xorg.conf.d/00-keyboard.conf") < 0) {
r = -errno;
unlink("/etc/X11/xorg.conf.d/00-keyboard.conf");
unlink(temp_path);
return r;
} else
return 0;
goto fail;
}
return 0;
fail:
(void) unlink("/etc/X11/xorg.conf.d/00-keyboard.conf");
if (temp_path)
(void) unlink(temp_path);
return r;
}
static int vconsole_reload(sd_bus *bus) {

View File

@ -372,11 +372,9 @@ static int prop_map_first_of_struct(sd_bus *bus, const char *member, sd_bus_mess
if (r < 0)
return r;
free(*p);
*p = strdup(s);
if (!*p)
return -ENOMEM;
r = free_and_strdup(p, s);
if (r < 0)
return r;
} else {
r = sd_bus_message_read_basic(m, contents[0], userdata);
if (r < 0)

View File

@ -1816,17 +1816,22 @@ static int update_schedule_file(Manager *m) {
if (!isempty(m->wall_message))
fprintf(f, "WALL_MESSAGE=%s\n", t);
(void) fflush_and_check(f);
r = fflush_and_check(f);
if (r < 0)
goto fail;
if (ferror(f) || rename(temp_path, "/run/systemd/shutdown/scheduled") < 0) {
log_error_errno(errno, "Failed to write information about scheduled shutdowns: %m");
if (rename(temp_path, "/run/systemd/shutdown/scheduled") < 0) {
r = -errno;
(void) unlink(temp_path);
(void) unlink("/run/systemd/shutdown/scheduled");
goto fail;
}
return r;
return 0;
fail:
(void) unlink(temp_path);
(void) unlink("/run/systemd/shutdown/scheduled");
return log_error_errno(r, "Failed to write information about scheduled shutdowns: %m");
}
static int manager_scheduled_shutdown_handler(

View File

@ -86,11 +86,11 @@ int inhibitor_save(Inhibitor *i) {
r = mkdir_safe_label("/run/systemd/inhibit", 0755, 0, 0);
if (r < 0)
goto finish;
goto fail;
r = fopen_temporary(i->state_file, &f, &temp_path);
if (r < 0)
goto finish;
goto fail;
fchmod(fileno(f), 0644);
@ -128,19 +128,24 @@ int inhibitor_save(Inhibitor *i) {
if (i->fifo_path)
fprintf(f, "FIFO=%s\n", i->fifo_path);
fflush(f);
r = fflush_and_check(f);
if (r < 0)
goto fail;
if (ferror(f) || rename(temp_path, i->state_file) < 0) {
if (rename(temp_path, i->state_file) < 0) {
r = -errno;
unlink(i->state_file);
unlink(temp_path);
goto fail;
}
finish:
if (r < 0)
log_error_errno(r, "Failed to save inhibit data %s: %m", i->state_file);
return 0;
return r;
fail:
(void) unlink(i->state_file);
if (temp_path)
(void) unlink(temp_path);
return log_error_errno(r, "Failed to save inhibit data %s: %m", i->state_file);
}
int inhibitor_start(Inhibitor *i) {

View File

@ -93,11 +93,11 @@ int seat_save(Seat *s) {
r = mkdir_safe_label("/run/systemd/seats", 0755, 0, 0);
if (r < 0)
goto finish;
goto fail;
r = fopen_temporary(s->state_file, &f, &temp_path);
if (r < 0)
goto finish;
goto fail;
fchmod(fileno(f), 0644);
@ -141,19 +141,24 @@ int seat_save(Seat *s) {
i->sessions_by_seat_next ? ' ' : '\n');
}
fflush(f);
r = fflush_and_check(f);
if (r < 0)
goto fail;
if (ferror(f) || rename(temp_path, s->state_file) < 0) {
if (rename(temp_path, s->state_file) < 0) {
r = -errno;
unlink(s->state_file);
unlink(temp_path);
goto fail;
}
finish:
if (r < 0)
log_error_errno(r, "Failed to save seat data %s: %m", s->state_file);
return 0;
return r;
fail:
(void) unlink(s->state_file);
if (temp_path)
(void) unlink(temp_path);
return log_error_errno(r, "Failed to save seat data %s: %m", s->state_file);
}
int seat_load(Seat *s) {

View File

@ -165,11 +165,11 @@ int session_save(Session *s) {
r = mkdir_safe_label("/run/systemd/sessions", 0755, 0, 0);
if (r < 0)
goto finish;
goto fail;
r = fopen_temporary(s->state_file, &f, &temp_path);
if (r < 0)
goto finish;
goto fail;
assert(s->user);
@ -217,7 +217,7 @@ int session_save(Session *s) {
escaped = cescape(s->remote_host);
if (!escaped) {
r = -ENOMEM;
goto finish;
goto fail;
}
fprintf(f, "REMOTE_HOST=%s\n", escaped);
@ -229,7 +229,7 @@ int session_save(Session *s) {
escaped = cescape(s->remote_user);
if (!escaped) {
r = -ENOMEM;
goto finish;
goto fail;
}
fprintf(f, "REMOTE_USER=%s\n", escaped);
@ -241,7 +241,7 @@ int session_save(Session *s) {
escaped = cescape(s->service);
if (!escaped) {
r = -ENOMEM;
goto finish;
goto fail;
}
fprintf(f, "SERVICE=%s\n", escaped);
@ -254,7 +254,7 @@ int session_save(Session *s) {
escaped = cescape(s->desktop);
if (!escaped) {
r = -ENOMEM;
goto finish;
goto fail;
}
fprintf(f, "DESKTOP=%s\n", escaped);
@ -282,21 +282,27 @@ int session_save(Session *s) {
if (s->controller)
fprintf(f, "CONTROLLER=%s\n", s->controller);
fflush(f);
r = fflush_and_check(f);
if (r < 0)
goto fail;
if (ferror(f) || rename(temp_path, s->state_file) < 0) {
if (rename(temp_path, s->state_file) < 0) {
r = -errno;
unlink(s->state_file);
unlink(temp_path);
goto fail;
}
finish:
if (r < 0)
log_error_errno(r, "Failed to save session data %s: %m", s->state_file);
return 0;
return r;
fail:
(void) unlink(s->state_file);
if (temp_path)
(void) unlink(temp_path);
return log_error_errno(r, "Failed to save session data %s: %m", s->state_file);
}
int session_load(Session *s) {
_cleanup_free_ char *remote = NULL,
*seat = NULL,
@ -630,6 +636,9 @@ int session_stop(Session *s, bool force) {
s->timer_event_source = sd_event_source_unref(s->timer_event_source);
if (s->seat)
seat_evict_position(s->seat, s);
/* We are going down, don't care about FIFOs anymore */
session_remove_fifo(s);
@ -666,6 +675,9 @@ int session_finalize(Session *s) {
s->timer_event_source = sd_event_source_unref(s->timer_event_source);
if (s->seat)
seat_evict_position(s->seat, s);
/* Kill session devices */
while ((sd = hashmap_first(s->devices)))
session_device_free(sd);

View File

@ -116,11 +116,11 @@ static int user_save_internal(User *u) {
r = mkdir_safe_label("/run/systemd/users", 0755, 0, 0);
if (r < 0)
goto finish;
goto fail;
r = fopen_temporary(u->state_file, &f, &temp_path);
if (r < 0)
goto finish;
goto fail;
fchmod(fileno(f), 0644);
@ -241,19 +241,24 @@ static int user_save_internal(User *u) {
fputc('\n', f);
}
fflush(f);
r = fflush_and_check(f);
if (r < 0)
goto fail;
if (ferror(f) || rename(temp_path, u->state_file) < 0) {
if (rename(temp_path, u->state_file) < 0) {
r = -errno;
unlink(u->state_file);
unlink(temp_path);
goto fail;
}
finish:
if (r < 0)
log_error_errno(r, "Failed to save user data %s: %m", u->state_file);
return 0;
return r;
fail:
(void) unlink(u->state_file);
if (temp_path)
(void) unlink(temp_path);
return log_error_errno(r, "Failed to save user data %s: %m", u->state_file);
}
int user_save(User *u) {

View File

@ -112,13 +112,13 @@ int machine_save(Machine *m) {
r = mkdir_safe_label("/run/systemd/machines", 0755, 0, 0);
if (r < 0)
goto finish;
goto fail;
r = fopen_temporary(m->state_file, &f, &temp_path);
if (r < 0)
goto finish;
goto fail;
fchmod(fileno(f), 0644);
(void) fchmod(fileno(f), 0644);
fprintf(f,
"# This is private data. Do not parse.\n"
@ -131,7 +131,7 @@ int machine_save(Machine *m) {
escaped = cescape(m->unit);
if (!escaped) {
r = -ENOMEM;
goto finish;
goto fail;
}
fprintf(f, "SCOPE=%s\n", escaped); /* We continue to call this "SCOPE=" because it is internal only, and we want to stay compatible with old files */
@ -146,7 +146,7 @@ int machine_save(Machine *m) {
escaped = cescape(m->service);
if (!escaped) {
r = -ENOMEM;
goto finish;
goto fail;
}
fprintf(f, "SERVICE=%s\n", escaped);
}
@ -157,7 +157,7 @@ int machine_save(Machine *m) {
escaped = cescape(m->root_directory);
if (!escaped) {
r = -ENOMEM;
goto finish;
goto fail;
}
fprintf(f, "ROOT=%s\n", escaped);
}
@ -195,16 +195,13 @@ int machine_save(Machine *m) {
r = fflush_and_check(f);
if (r < 0)
goto finish;
goto fail;
if (rename(temp_path, m->state_file) < 0) {
r = -errno;
goto finish;
goto fail;
}
free(temp_path);
temp_path = NULL;
if (m->unit) {
char *sl;
@ -215,14 +212,15 @@ int machine_save(Machine *m) {
(void) symlink(m->name, sl);
}
finish:
return 0;
fail:
(void) unlink(m->state_file);
if (temp_path)
unlink(temp_path);
(void) unlink(temp_path);
if (r < 0)
log_error_errno(r, "Failed to save machine data %s: %m", m->state_file);
return r;
return log_error_errno(r, "Failed to save machine data %s: %m", m->state_file);
}
static void machine_unlink(Machine *m) {

View File

@ -2059,10 +2059,9 @@ int link_update(Link *link, sd_netlink_message *m) {
link_free_carrier_maps(link);
free(link->ifname);
link->ifname = strdup(ifname);
if (!link->ifname)
return -ENOMEM;
r = free_and_strdup(&link->ifname, ifname);
if (r < 0)
return r;
r = link_new_carrier_maps(link);
if (r < 0)
@ -2388,14 +2387,13 @@ int link_save(Link *link) {
}
return 0;
fail:
log_link_error_errno(link, r, "Failed to save link data to %s: %m", link->state_file);
(void) unlink(link->state_file);
fail:
(void) unlink(link->state_file);
if (temp_path)
(void) unlink(temp_path);
return r;
return log_link_error_errno(link, r, "Failed to save link data to %s: %m", link->state_file);
}
static const char* const link_state_table[_LINK_STATE_MAX] = {

View File

@ -818,10 +818,10 @@ int manager_save(Manager *m) {
return 0;
fail:
log_error_errno(r, "Failed to save network state to %s: %m", m->state_file);
unlink(m->state_file);
unlink(temp_path);
return r;
(void) unlink(m->state_file);
(void) unlink(temp_path);
return log_error_errno(r, "Failed to save network state to %s: %m", m->state_file);
}
int manager_address_pool_acquire(Manager *m, int family, unsigned prefixlen, union in_addr_union *found) {

View File

@ -54,6 +54,7 @@ VXLAN.UDPCheckSum, config_parse_bool, 0,
VXLAN.UDP6ZeroCheckSumRx, config_parse_bool, 0, offsetof(VxLan, udp6zerocsumrx)
VXLAN.UDP6ZeroCheckSumTx, config_parse_bool, 0, offsetof(VxLan, udp6zerocsumtx)
VXLAN.FDBAgeingSec, config_parse_sec, 0, offsetof(VxLan, fdb_ageing)
VXLAN.GroupPolicyExtension, config_parse_bool, 0, offsetof(VxLan, group_policy)
Tun.OneQueue, config_parse_bool, 0, offsetof(TunTap, one_queue)
Tun.MultiQueue, config_parse_bool, 0, offsetof(TunTap, multi_queue)
Tun.PacketInfo, config_parse_bool, 0, offsetof(TunTap, packet_info)

View File

@ -404,12 +404,6 @@ int config_parse_tunnel_address(const char *unit,
return 0;
}
static const char* const ipv6_flowlabel_table[_NETDEV_IPV6_FLOWLABEL_MAX] = {
[NETDEV_IPV6_FLOWLABEL_INHERIT] = "inherit",
};
DEFINE_STRING_TABLE_LOOKUP(ipv6_flowlabel, IPv6FlowLabel);
int config_parse_ipv6_flowlabel(const char* unit,
const char *filename,
unsigned line,
@ -422,7 +416,6 @@ int config_parse_ipv6_flowlabel(const char* unit,
void *userdata) {
IPv6FlowLabel *ipv6_flowlabel = data;
Tunnel *t = userdata;
IPv6FlowLabel s;
int k = 0;
int r;
@ -431,12 +424,11 @@ int config_parse_ipv6_flowlabel(const char* unit,
assert(rvalue);
assert(ipv6_flowlabel);
s = ipv6_flowlabel_from_string(rvalue);
if (s != _NETDEV_IPV6_FLOWLABEL_INVALID) {
if (streq(rvalue, "inherit")) {
*ipv6_flowlabel = IP6_FLOWINFO_FLOWLABEL;
t->flags |= IP6_TNL_F_USE_ORIG_FLOWLABEL;
} else {
r = config_parse_unsigned(unit, filename, line, section, section_line, lvalue, ltype, rvalue, &k, userdata);
r = config_parse_int(unit, filename, line, section, section_line, lvalue, ltype, rvalue, &k, userdata);
if (r >= 0) {
if (k > 0xFFFFF)
log_syntax(unit, LOG_ERR, filename, line, k, "Failed to parse IPv6 flowlabel option, ignoring: %s", rvalue);

View File

@ -45,6 +45,7 @@ struct Tunnel {
uint8_t encap_limit;
int family;
int ipv6_flowlabel;
unsigned ttl;
unsigned tos;
@ -54,7 +55,6 @@ struct Tunnel {
union in_addr_union remote;
Ip6TnlMode ip6tnl_mode;
IPv6FlowLabel ipv6_flowlabel;
bool pmtudisc;
bool copy_dscp;
@ -90,9 +90,6 @@ int config_parse_tunnel_address(const char *unit,
void *data,
void *userdata);
const char *ipv6_flowlabel_to_string(IPv6FlowLabel d) _const_;
IPv6FlowLabel ipv6_flowlabel_from_string(const char *d) _pure_;
int config_parse_ipv6_flowlabel(const char *unit, const char *filename,
unsigned line, const char *section,
unsigned section_line, const char *lvalue,

View File

@ -3,7 +3,7 @@
/***
This file is part of systemd.
Copyright 2014 Susant Sahani <susant@redhat.com>
Copyright 2014 Susant Sahani
systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
@ -101,6 +101,12 @@ static int netdev_vxlan_fill_message_create(NetDev *netdev, Link *link, sd_netli
if (r < 0)
return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_UDP_ZERO_CSUM6_RX attribute: %m");
if (v->group_policy) {
r = sd_netlink_message_append_flag(m, IFLA_VXLAN_GBP);
if (r < 0)
return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_GBP attribute: %m");
}
return r;
}

View File

@ -50,6 +50,7 @@ struct VxLan {
bool udpcsum;
bool udp6zerocsumtx;
bool udp6zerocsumrx;
bool group_policy;
};
extern const NetDevVTable vxlan_vtable;

View File

@ -38,9 +38,15 @@ bool manager_ignore_link(Manager *m, Link *link) {
assert(m);
assert(link);
/* always ignore the loopback interface */
if (link->flags & IFF_LOOPBACK)
return true;
/* if interfaces are given on the command line, ignore all others */
if (m->interfaces && !strv_contains(m->interfaces, link->ifname))
return true;
/* ignore interfaces we explicitly are asked to ignore */
STRV_FOREACH(ignore, m->ignore)
if (fnmatch(*ignore, link->ifname, 0) == 0)
return true;
@ -77,7 +83,7 @@ bool manager_all_configured(Manager *m) {
return false;
}
if (streq(l->state, "configuring")) {
if (STR_IN_SET(l->state, "configuring", "pending")) {
log_debug("link %s is being processed by networkd",
l->ifname);
return false;

View File

@ -503,9 +503,8 @@ static int parse_argv(int argc, char *argv[]) {
break;
case 'u':
free(arg_user);
arg_user = strdup(optarg);
if (!arg_user)
r = free_and_strdup(&arg_user, optarg);
if (r < 0)
return log_oom();
break;

View File

@ -1129,13 +1129,9 @@ int main(int argc, char* argv[]) {
}
if (arg_unit && isempty(description)) {
free(description);
description = strdup(arg_unit);
if (!description) {
r = log_oom();
r = free_and_strdup(&description, arg_unit);
if (r < 0)
goto finish;
}
}
arg_description = description;

View File

@ -382,11 +382,9 @@ int ask_password_agent(
if (id)
fprintf(f, "Id=%s\n", id);
fflush(f);
if (ferror(f)) {
log_error_errno(errno, "Failed to write query file: %m");
r = -errno;
r = fflush_and_check(f);
if (r < 0) {
log_error_errno(r, "Failed to write query file: %m");
goto finish;
}

View File

@ -69,6 +69,7 @@ int sd_netlink_attach_event(sd_netlink *nl, sd_event *e, int priority);
int sd_netlink_detach_event(sd_netlink *nl);
int sd_netlink_message_append_string(sd_netlink_message *m, unsigned short type, const char *data);
int sd_netlink_message_append_flag(sd_netlink_message *m, unsigned short type);
int sd_netlink_message_append_u8(sd_netlink_message *m, unsigned short type, uint8_t data);
int sd_netlink_message_append_u16(sd_netlink_message *m, unsigned short type, uint16_t data);
int sd_netlink_message_append_u32(sd_netlink_message *m, unsigned short type, uint32_t data);

View File

@ -891,8 +891,10 @@ static int add_user(Item *i) {
i->uid = p->pw_uid;
i->uid_set = true;
free(i->description);
i->description = strdup(p->pw_gecos);
r = free_and_strdup(&i->description, p->pw_gecos);
if (r < 0)
return log_oom();
return 0;
}
if (!IN_SET(errno, 0, ENOENT))
@ -1149,9 +1151,8 @@ static int process_item(Item *i) {
}
if (i->gid_path) {
free(j->gid_path);
j->gid_path = strdup(i->gid_path);
if (!j->gid_path)
r = free_and_strdup(&j->gid_path, i->gid_path);
if (r < 0)
return log_oom();
}

View File

@ -113,10 +113,6 @@ int main(int argc, char *argv[]) {
if (r < 0)
goto finish;
/* We need one process for ourselves, plus one thread for the asynchronous resolver */
if (setrlimit(RLIMIT_NPROC, &RLIMIT_MAKE_CONST(2)) < 0)
log_warning_errno(errno, "Failed to lower RLIMIT_NPROC to 2: %m");
assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
r = manager_new(&m);

View File

@ -2429,8 +2429,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules,
rules_str(rules, rule->rule.filename_off), rule->rule.filename_line);
break;
}
free(event->name);
event->name = strdup(name_str);
free_and_strdup(&event->name, name_str);
log_debug("NAME '%s' %s:%u",
event->name,
rules_str(rules, rule->rule.filename_off),