mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-25 14:48:12 +02:00
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>
26 lines
381 B
C
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_ */
|