mirror of
https://github.com/ericonr/util-linux.git
synced 2024-04-21 09:12:35 -05:00
Use the common path access functions. In order to simplify chcpu also implement and use path_writestr() which writes a string to the path specified. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
18 lines
879 B
C
18 lines
879 B
C
#include <stdio.h>
|
|
|
|
extern FILE *path_fopen(const char *mode, int exit_on_err, const char *path, ...)
|
|
__attribute__ ((__format__ (__printf__, 3, 4)));
|
|
extern void path_getstr(char *result, size_t len, const char *path, ...)
|
|
__attribute__ ((__format__ (__printf__, 3, 4)));
|
|
extern int path_writestr(const char *str, const char *path, ...)
|
|
__attribute__ ((__format__ (__printf__, 2, 3)));
|
|
extern int path_getnum(const char *path, ...)
|
|
__attribute__ ((__format__ (__printf__, 1, 2)));
|
|
extern int path_exist(const char *path, ...)
|
|
__attribute__ ((__format__ (__printf__, 1, 2)));
|
|
extern cpu_set_t *path_cpuset(int, const char *path, ...)
|
|
__attribute__ ((__format__ (__printf__, 2, 3)));
|
|
extern cpu_set_t *path_cpulist(int, const char *path, ...)
|
|
__attribute__ ((__format__ (__printf__, 2, 3)));
|
|
extern void path_setprefix(const char *);
|