about summary refs log tree commit diff
path: root/shared/systemd/src/basic/format-util.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2019-12-18 18:30:31 +0100
committerMichael Biebl <biebl@debian.org>2019-12-18 18:30:31 +0100
commit4bde769dba8f804547ce1f5fcda731035d3d45f1 (patch)
tree3a4907fdbf4972fad5a036ef64ce643d704e8733 /shared/systemd/src/basic/format-util.h
parentbbf6329c27676323a899b7328575cc3f6c5f48cc (diff)
parent28028b26b3371756811e95d894f709f4b1207c00 (diff)
Update upstream source from tag 'upstream/1.22.0'
Update to upstream version '1.22.0'
with Debian dir a81ba1028908d08fc4866734c3df4a042bf9a511
Diffstat (limited to 'shared/systemd/src/basic/format-util.h')
-rw-r--r--shared/systemd/src/basic/format-util.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/shared/systemd/src/basic/format-util.h b/shared/systemd/src/basic/format-util.h
index e0d184a5..59622508 100644
--- a/shared/systemd/src/basic/format-util.h
+++ b/shared/systemd/src/basic/format-util.h
@@ -68,7 +68,15 @@
 #  error Unknown ino_t size
 #endif
 
-char *format_ifname(int ifindex, char buf[static IF_NAMESIZE + 1]);
+typedef enum {
+        FORMAT_IFNAME_IFINDEX              = 1 << 0,
+        FORMAT_IFNAME_IFINDEX_WITH_PERCENT = (1 << 1) | FORMAT_IFNAME_IFINDEX,
+} FormatIfnameFlag;
+
+char *format_ifname_full(int ifindex, char buf[static IF_NAMESIZE + 1], FormatIfnameFlag flag);
+static inline char *format_ifname(int ifindex, char buf[static IF_NAMESIZE + 1]) {
+        return format_ifname_full(ifindex, buf, 0);
+}
 
 typedef enum {
         FORMAT_BYTES_USE_IEC     = 1 << 0,