diff options
author | Jeremy Allison <jra@samba.org> | 2019-05-16 22:10:51 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-05-24 19:00:05 +0000 |
commit | 3b19412baedfffb7adc2a79471f5b17990259c31 (patch) | |
tree | b63f1f6dbba4092882f7d38cc25594447484b1f3 /source3/lib | |
parent | 5c34fa0b85e4d9a3c5fd4fa0b39af4772ec023db (diff) | |
download | samba-3b19412baedfffb7adc2a79471f5b17990259c31.tar.gz |
s3: lib: util: Add file_lines_ploadv().
Not yet used.
Duplicate code to file_lines_pload() except uses vectored
argument list. file_lines_pload() will be removed once all
callers are converted.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13964
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util_file.c | 15 | ||||
-rw-r--r-- | source3/lib/util_file.h | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/source3/lib/util_file.c b/source3/lib/util_file.c index cfbcf278caa..eeb749be36c 100644 --- a/source3/lib/util_file.c +++ b/source3/lib/util_file.c @@ -170,3 +170,18 @@ char **file_lines_pload(TALLOC_CTX *mem_ctx, const char *syscmd, return file_lines_parse(p, size, numlines, mem_ctx); } + +char **file_lines_ploadv(TALLOC_CTX *mem_ctx, + char * const argl[], + int *numlines) +{ + char *p = NULL; + size_t size; + + p = file_ploadv(argl, &size); + if (!p) { + return NULL; + } + + return file_lines_parse(p, size, numlines, mem_ctx); +} diff --git a/source3/lib/util_file.h b/source3/lib/util_file.h index 9175ed0dcee..85bcf06f38c 100644 --- a/source3/lib/util_file.h +++ b/source3/lib/util_file.h @@ -31,5 +31,8 @@ int file_pload_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, char **file_lines_pload(TALLOC_CTX *mem_ctx, const char *syscmd, int *numlines); +char **file_lines_ploadv(TALLOC_CTX *mem_ctx, + char * const argl[], + int *numlines); #endif |