summaryrefslogtreecommitdiff
path: root/tools/lib/mm/file_utils.h
blob: 50daa82c2b2b48a2246ff9e78358eabb5439a00a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __MM_FILE_UTILS_H__
#define __MM_FILE_UTILS_H__

#include <stddef.h>

int read_file(const char *path, char *buf, size_t buflen);
int write_file(const char *path, const char *buf, size_t buflen);
int read_num(const char *path, unsigned long *num);
int write_num(const char *path, unsigned long num);
int write_num_ignore_einval(const char *path, unsigned long num);

#endif