mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
16 lines
338 B
C
16 lines
338 B
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
|
|
#include "format-util.h"
|
|
#include "network-common.h"
|
|
|
|
int get_ifname(int ifindex, char **ifname) {
|
|
assert(ifname);
|
|
|
|
/* This sets ifname only when it is not set yet. */
|
|
|
|
if (*ifname)
|
|
return 0;
|
|
|
|
return format_ifname_alloc(ifindex, ifname);
|
|
}
|