diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2021-07-05 20:36:07 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2021-07-05 20:36:07 +0200 |
| commit | 5d67593e4f1329fc32a36adc5dbc445e7c606bd1 (patch) | |
| tree | 5f470f020ca8f1240ddc29b11912fee174f5d68c /src/core/systemd/nm-sd-utils-dhcp.c | |
| parent | 9996e637dc976a77c36f07c6debb737f9a5df0b7 (diff) | |
| parent | 35779c6675728fa6f0fd0a21cefb904408509c23 (diff) | |
Update upstream source from tag 'upstream/1.32.2'
Update to upstream version '1.32.2' with Debian dir db5d9d9657d75d750d835860e38c6af24cc54472
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; -} |