diff options
| author | Michael Biebl <biebl@debian.org> | 2021-10-01 23:06:08 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2021-10-01 23:06:08 +0200 |
| commit | a3349a04ac4c38885cddefec8515c979d03f9327 (patch) | |
| tree | d3bbee695aa048cb4ec252e7d63515c8376f9006 /src/core/systemd/nm-sd-utils-dhcp.c | |
| parent | 2d5b58e374d67f60880c7689e80c7745aeef3f62 (diff) | |
| parent | e74c568b07b50b97873fb4ee1d776dedefbd54d6 (diff) | |
Update upstream source from tag 'upstream/1.32.12'
Update to upstream version '1.32.12' with Debian dir 6fabefa95c7dcf83371a78eb2c47013a81ff8d86
Diffstat (limited to 'src/core/systemd/nm-sd-utils-dhcp.c')
| -rw-r--r-- | src/core/systemd/nm-sd-utils-dhcp.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/core/systemd/nm-sd-utils-dhcp.c b/src/core/systemd/nm-sd-utils-dhcp.c deleted file mode 100644 index b5aa315a..00000000 --- a/src/core/systemd/nm-sd-utils-dhcp.c +++ /dev/null @@ -1,41 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * Copyright (C) 2019 Red Hat, Inc. - */ - -#include "src/core/systemd/nm-default-systemd.h" - -#include "nm-sd-utils-dhcp.h" - -#include "sd-adapt-core/nm-sd-adapt-core.h" -#include "src/libsystemd-network/dhcp-lease-internal.h" - -int -nm_sd_dhcp_lease_get_private_options(sd_dhcp_lease *lease, nm_sd_dhcp_option **out_options) -{ - struct sd_dhcp_raw_option *raw_option; - int cnt = 0; - - g_return_val_if_fail(lease, -EINVAL); - g_return_val_if_fail(out_options, -EINVAL); - g_return_val_if_fail(*out_options == NULL, -EINVAL); - - if (lease->private_options == NULL) - return -ENODATA; - - LIST_FOREACH(options, raw_option, lease->private_options) - cnt++; - - *out_options = g_new(nm_sd_dhcp_option, cnt); - cnt = 0; - - LIST_FOREACH(options, raw_option, lease->private_options) - { - (*out_options)[cnt].code = raw_option->tag; - (*out_options)[cnt].data = raw_option->data; - (*out_options)[cnt].data_len = raw_option->length; - cnt++; - } - - return cnt; -} |