From: Thomas Weißschuh Date: Sun, 28 Apr 2024 21:22:13 +0000 (+0200) Subject: lsfd: move interface of decode-file-flags to header X-Git-Tag: v2.42-start~371^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea0c351409b26d1b288442b8cc206bd908e64faf;p=thirdparty%2Futil-linux.git lsfd: move interface of decode-file-flags to header Use a proper header file to declare lsfd_decode_file_flags(). Signed-off-by: Thomas Weißschuh --- diff --git a/lsfd-cmd/Makemodule.am b/lsfd-cmd/Makemodule.am index 577a780f5..d28f86958 100644 --- a/lsfd-cmd/Makemodule.am +++ b/lsfd-cmd/Makemodule.am @@ -9,6 +9,7 @@ lsfd_SOURCES = \ lsfd-cmd/lsfd.c \ lsfd-cmd/lsfd.h \ lsfd-cmd/decode-file-flags.c \ + lsfd-cmd/decode-file-flags.h \ lsfd-cmd/file.c \ lsfd-cmd/cdev.c \ lsfd-cmd/bdev.c \ diff --git a/lsfd-cmd/decode-file-flags.c b/lsfd-cmd/decode-file-flags.c index bd87c7d79..7035d79d1 100644 --- a/lsfd-cmd/decode-file-flags.c +++ b/lsfd-cmd/decode-file-flags.c @@ -50,9 +50,8 @@ #endif #include /* for size_t */ -struct ul_buffer; -void lsfd_decode_file_flags(struct ul_buffer *buf, int flags); +#include "decode-file-flags.h" /* We cannot include buffer.h because buffer.h includes * /usr/include/fcntl.h indirectly. */ diff --git a/lsfd-cmd/decode-file-flags.h b/lsfd-cmd/decode-file-flags.h new file mode 100644 index 000000000..88cd0d0be --- /dev/null +++ b/lsfd-cmd/decode-file-flags.h @@ -0,0 +1,8 @@ +#ifndef UTIL_LINUX_LSFD_DECODE_FILE_FLAGS_H +#define UTIL_LINUX_LSFD_DECODE_FILE_FLAGS_H + +struct ul_buffer; + +void lsfd_decode_file_flags(struct ul_buffer *buf, int flags); + +#endif /* UTIL_LINUX_LSFD_DECODE_FILE_FLAGS_H */ diff --git a/lsfd-cmd/file.c b/lsfd-cmd/file.c index 25477cf2f..02db8da5e 100644 --- a/lsfd-cmd/file.c +++ b/lsfd-cmd/file.c @@ -47,6 +47,7 @@ #include "lsfd.h" #include "pidfd.h" #include "pidfd-utils.h" +#include "decode-file-flags.h" static size_t pagesize; @@ -84,7 +85,6 @@ static const char *assocstr[N_ASSOCS] = { [ASSOC_SHM] = "shm", }; -extern void lsfd_decode_file_flags(struct ul_buffer *buf, int flags); static void file_fill_flags_buf(struct ul_buffer *buf, int flags) { lsfd_decode_file_flags(buf, flags);