@@ -102,6 +102,7 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_common_errors[] = {
|
||||
|
||||
SD_BUS_ERROR_MAP(BUS_ERROR_NO_PRODUCT_UUID, EOPNOTSUPP),
|
||||
|
||||
SD_BUS_ERROR_MAP(BUS_ERROR_SPEED_METER_INACTIVE, EOPNOTSUPP),
|
||||
SD_BUS_ERROR_MAP(BUS_ERROR_UNMANAGED_INTERFACE, EOPNOTSUPP),
|
||||
|
||||
SD_BUS_ERROR_MAP_END
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
|
||||
#define BUS_ERROR_NO_PRODUCT_UUID "org.freedesktop.hostname1.NoProductUUID"
|
||||
|
||||
#define BUS_ERROR_SPEED_METER_INACTIVE "org.freedesktop.network1.SpeedMeterInactive"
|
||||
#define BUS_ERROR_UNMANAGED_INTERFACE "org.freedesktop.network1.UnmanagedInterface"
|
||||
|
||||
BUS_ERROR_MAP_ELF_USE(bus_common_errors);
|
||||
|
||||
@@ -366,7 +366,8 @@ static int acquire_link_bitrates(sd_bus *bus, LinkInfo *link) {
|
||||
"org.freedesktop.network1.Link",
|
||||
"BitRates");
|
||||
if (r < 0) {
|
||||
bool quiet = sd_bus_error_has_name(&error, SD_BUS_ERROR_UNKNOWN_PROPERTY);
|
||||
bool quiet = sd_bus_error_has_name(&error, SD_BUS_ERROR_UNKNOWN_PROPERTY) ||
|
||||
sd_bus_error_has_name(&error, BUS_ERROR_SPEED_METER_INACTIVE);
|
||||
|
||||
return log_full_errno(quiet ? LOG_DEBUG : LOG_WARNING,
|
||||
r, "Failed to query link bit rates: %s", bus_error_message(&error, r));
|
||||
|
||||
@@ -29,7 +29,7 @@ static void cleanup_clear_loop_close(int *fd) {
|
||||
}
|
||||
}
|
||||
|
||||
int loop_device_make_full(
|
||||
int loop_device_make(
|
||||
int fd,
|
||||
int open_flags,
|
||||
uint64_t offset,
|
||||
@@ -166,7 +166,7 @@ int loop_device_make_by_path(const char *path, int open_flags, uint32_t loop_fla
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
|
||||
return loop_device_make_full(fd, open_flags, 0, 0, loop_flags, ret);
|
||||
return loop_device_make(fd, open_flags, 0, 0, loop_flags, ret);
|
||||
}
|
||||
|
||||
LoopDevice* loop_device_unref(LoopDevice *d) {
|
||||
|
||||
@@ -14,7 +14,7 @@ struct LoopDevice {
|
||||
bool relinquished;
|
||||
};
|
||||
|
||||
int loop_device_make_full(int fd, int open_flags, uint64_t offset, uint64_t size, uint32_t loop_flags, LoopDevice **ret);
|
||||
int loop_device_make(int fd, int open_flags, uint64_t offset, uint64_t size, uint32_t loop_flags, LoopDevice **ret);
|
||||
int loop_device_make_by_path(const char *path, int open_flags, uint32_t loop_flags, LoopDevice **ret);
|
||||
int loop_device_open(const char *loop_path, int open_flags, LoopDevice **ret);
|
||||
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
#pragma once
|
||||
|
||||
#include <openssl/pem.h>
|
||||
#if HAVE_OPENSSL
|
||||
# include <openssl/pem.h>
|
||||
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(X509*, X509_free);
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(X509_NAME*, X509_NAME_free);
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(EVP_PKEY_CTX*, EVP_PKEY_CTX_free);
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(EVP_CIPHER_CTX*, EVP_CIPHER_CTX_free);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,15 +4,12 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#if HAVE_P11KIT
|
||||
#include <p11-kit/p11-kit.h>
|
||||
#include <p11-kit/uri.h>
|
||||
|
||||
#if HAVE_OPENSSL
|
||||
#include <openssl/pem.h>
|
||||
#endif
|
||||
# include <p11-kit/p11-kit.h>
|
||||
# include <p11-kit/uri.h>
|
||||
#endif
|
||||
|
||||
#include "macro.h"
|
||||
#include "openssl-util.h"
|
||||
#include "time-util.h"
|
||||
|
||||
bool pkcs11_uri_valid(const char *uri);
|
||||
|
||||
Reference in New Issue
Block a user