]>
git.proxmox.com Git - systemd.git/blob - src/libsystemd-network/network-common.c
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
3 #include "format-util.h"
4 #include "network-common.h"
5 #include "string-util.h"
7 const char *get_ifname(int ifindex
, char **ifname
) {
8 char buf
[IF_NAMESIZE
+ 1];
12 /* This sets ifname only when it is not set yet. */
20 if (!format_ifname(ifindex
, buf
))
23 return *ifname
= strdup(buf
);