diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-12 17:34:43 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-12 17:34:43 +0200 |
commit | 1b99d8fbb591bedb375c1251d5d29a5674e1b74a (patch) | |
tree | 5e4cf4d115081057750349373184ad7df8894e61 /lib/util/util.h | |
parent | 652f0e601da0d1d2e2c8b9281bbee9fa399d9877 (diff) | |
download | samba-1b99d8fbb591bedb375c1251d5d29a5674e1b74a.tar.gz samba-1b99d8fbb591bedb375c1251d5d29a5674e1b74a.tar.bz2 samba-1b99d8fbb591bedb375c1251d5d29a5674e1b74a.zip |
Use common util_file code.
Diffstat (limited to 'lib/util/util.h')
-rw-r--r-- | lib/util/util.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/util/util.h b/lib/util/util.h index 5cecad7350..720aa537a7 100644 --- a/lib/util/util.h +++ b/lib/util/util.h @@ -522,12 +522,12 @@ _PUBLIC_ char *afdgets(int fd, TALLOC_CTX *mem_ctx, size_t hint); /** load a file into memory from a fd. **/ -_PUBLIC_ char *fd_load(int fd, size_t *size, TALLOC_CTX *mem_ctx); +_PUBLIC_ char *fd_load(int fd, size_t *size, size_t maxsize, TALLOC_CTX *mem_ctx); /** load a file into memory **/ -_PUBLIC_ char *file_load(const char *fname, size_t *size, TALLOC_CTX *mem_ctx); +_PUBLIC_ char *file_load(const char *fname, size_t *size, size_t maxsize, TALLOC_CTX *mem_ctx); /** mmap (if possible) or read a file @@ -538,14 +538,14 @@ _PUBLIC_ void *map_file(const char *fname, size_t size); load a file into memory and return an array of pointers to lines in the file must be freed with talloc_free(). **/ -_PUBLIC_ char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx); +_PUBLIC_ char **file_lines_load(const char *fname, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx); /** load a fd into memory and return an array of pointers to lines in the file must be freed with talloc_free(). If convert is true calls unix_to_dos on the list. **/ -_PUBLIC_ char **fd_lines_load(int fd, int *numlines, TALLOC_CTX *mem_ctx); +_PUBLIC_ char **fd_lines_load(int fd, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx); /** take a list of lines and modify them to produce a list where \ continues |