mesa/src/util/os_file.h
Eric Engestrom 316964709e util: add os_read_file() helper
readN() taken from igt.
os_read_file() inspired by igt_sysfs_get()

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2019-04-30 15:40:33 +00:00

26 lines
381 B
C

/*
* Copyright 2019 Intel Corporation
* SPDX-License-Identifier: MIT
*
* File operations helpers
*/
#ifndef _OS_FILE_H_
#define _OS_FILE_H_
#ifdef __cplusplus
extern "C" {
#endif
/*
* Read a file.
* Returns a char* that the caller must free(), or NULL and sets errno.
*/
char *
os_read_file(const char *filename);
#ifdef __cplusplus
}
#endif
#endif /* _OS_FILE_H_ */