return p;
}
+/**
+ Load a pipe into memory and return an array of pointers to lines in the data
+ must be freed with TALLOC_FREE.
+**/
+
+char **file_lines_ploadv(TALLOC_CTX *mem_ctx,
+ char *const argl[],
+ int *numlines)
+{
+ char *p = NULL;
+ size_t size;
+ char **ret = NULL;
+
+ p = file_ploadv(argl, &size);
+ if (!p) {
+ return NULL;
+ }
+
+ ret = file_lines_parse(p, size, numlines, mem_ctx);
+ TALLOC_FREE(p);
+ return ret;
+}
+
/*
* fopen a dup'ed fd. Prevent fclose to close the fd passed in.
*
*/
char *file_ploadv(char * const argl[], size_t *size);
+char **file_lines_ploadv(TALLOC_CTX *mem_ctx,
+ char *const argl[],
+ int *numlines);
+
FILE *fdopen_keepfd(int fd, const char *mode);
#endif
#include "includes.h"
-#include "lib/util_file.h"
+#include "lib/util/util_file.h"
#include "lib/util/smb_strtox.h"
#undef DBGC_CLASS
return 0;
}
-
-
-/**
- Load a pipe into memory and return an array of pointers to lines in the data
- must be freed with TALLOC_FREE.
-**/
-
-char **file_lines_ploadv(TALLOC_CTX *mem_ctx,
- char * const argl[],
- int *numlines)
-{
- char *p = NULL;
- size_t size;
- char **ret = NULL;
-
- p = file_ploadv(argl, &size);
- if (!p) {
- return NULL;
- }
-
- ret = file_lines_parse(p, size, numlines, mem_ctx);
- TALLOC_FREE(p);
- return ret;
-}
char * const argl[], size_t maxsize);
int file_ploadv_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
uint8_t **buf);
-char **file_lines_ploadv(TALLOC_CTX *mem_ctx,
- char * const argl[],
- int *numlines);
#endif
#include "includes.h"
#include "smbd/smbd.h"
#include "smbd/globals.h"
-#include "lib/util_file.h"
+#include "lib/util/util_file.h"
#include "lib/util/memcache.h"
/****************************************************************************