Rename read_file() to read_text_file()

This commit is contained in:
Joel Rosdahl 2010-08-26 20:40:28 +02:00
parent 4db8870fc3
commit 4ac86e614b
4 changed files with 3 additions and 4 deletions

View File

@ -148,7 +148,7 @@ void *x_fmmap(const char *fname, off_t *size, const char *errstr);
int x_munmap(void *addr, size_t length);
int x_rename(const char *oldpath, const char *newpath);
char *x_readlink(const char *path);
char *read_file(const char *path);
char *read_text_file(const char *path);
/* ------------------------------------------------------------------------- */
/* stats.c */

View File

@ -177,7 +177,7 @@ stats_update_size(enum stats stat, size_t size, unsigned files)
void
stats_read(const char *sfile, struct counters *counters)
{
char *data = read_file(sfile);
char *data = read_text_file(sfile);
if (data) {
parse_stats(counters, data);
} else {

View File

@ -4,6 +4,5 @@
int path_exists(const char *path);
int is_symlink(const char *path);
void create_file(const char *path, const char *content);
char *read_file(const char *path);
#endif

2
util.c
View File

@ -1160,7 +1160,7 @@ x_readlink(const char *path)
/* Return the content of a text file, or NULL on error. Caller frees. */
char *
read_file(const char *path)
read_text_file(const char *path)
{
int fd, ret;
size_t pos = 0, allocated = 1024;