New helper functions to read/write /proc and /sys style files

From the Infix project.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2023-06-11 13:19:05 +02:00
1 parent 97a3d43e9c
commit 4dd14dac42
3 files changed
+240 -1

No files matched your search

+10
View File
@@ -90,6 +90,16 @@ int fcopyfile (FILE *src, FILE *dst);
ssize_t fsendfile (FILE *src, FILE *dst, size_t len);
int truncatef (off_t length, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
char *vreadsnf (char *line, size_t len, const char *fmt, va_list ap);
char *readsnf (char *line, size_t len, const char *fmt, ...);
int writesf (const char *str, const char *mode, const char *fmt, ...);
int vreadllf (long long *value, const char *fmt, va_list ap);
int readllf (long long *value, const char *fmt, ...);
int readdf (int *value, const char *fmt, ...);
int writellf (long long value, const char *mode, const char *fmt, ...);
int writedf (int value, const char *mode, const char *fmt, ...);
int ifconfig (const char *ifname, const char *addr, const char *mask, int up);
lfile_t*lfopen (const char *file, const char *sep);