diff options
Diffstat (limited to 'source3/aparser/vluke.c')
-rw-r--r-- | source3/aparser/vluke.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/aparser/vluke.c b/source3/aparser/vluke.c index f5612a773d5..5a64e06eb05 100644 --- a/source3/aparser/vluke.c +++ b/source3/aparser/vluke.c @@ -11,18 +11,19 @@ int main(int argc, char *argv[]) { BOOL ret; - TEST_STRUCT *il; - char *desc = TEST_NAME; - char *fname = argv[1]; + char *fname, *test; int fd; struct stat st; prs_struct ps; - if (argc < 2) { - printf("usage: vluke <file>\n"); + if (argc < 3) { + printf("usage: vluke <structure> <file>\n"); exit(1); } + test = argv[1]; + fname = argv[2]; + fd = open(fname,O_RDONLY); fstat(fd, &st); @@ -31,8 +32,7 @@ int main(int argc, char *argv[]) prs_read(&ps, fd, st.st_size, 0); ps.data_offset = 0; ps.io = UNMARSHALL; - il = (TEST_STRUCT *)malloc(sizeof(*il)); - ret = TEST_FUNC(desc, &ps, 1, il, PARSE_SCALARS|PARSE_BUFFERS); + ret = run_test(test, &ps); printf("\nret=%s\n", ret?"OK":"Bad"); printf("Trailer is %d bytes\n\n", ps.grow_size - ps.data_offset); dump_data(0, ps.data_p, ps.grow_size); |