diff options
Diffstat (limited to 'source4/client/cifsdd.c')
-rw-r--r-- | source4/client/cifsdd.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/source4/client/cifsdd.c b/source4/client/cifsdd.c index 28c9059efa..5735d127e4 100644 --- a/source4/client/cifsdd.c +++ b/source4/client/cifsdd.c @@ -24,6 +24,7 @@ #include "lib/cmdline/popt_common.h" #include "cifsdd.h" +#include "param/param.h" const char * const PROGNAME = "cifsdd"; @@ -102,7 +103,7 @@ static struct argdef args[] = */ }; -struct argdef * find_named_arg(const char * arg) +static struct argdef * find_named_arg(const char * arg) { int i; @@ -218,7 +219,7 @@ fail: return; } -BOOL check_arg_bool(const char * name) +bool check_arg_bool(const char * name) { struct argdef * arg; @@ -229,7 +230,7 @@ BOOL check_arg_bool(const char * name) DEBUG(0, ("invalid argument name: %s", name)); SMB_ASSERT(0); - return(False); + return(false); } uint64_t check_arg_numeric(const char * name) @@ -394,7 +395,7 @@ static void set_max_xmit(uint64_t iomax) char buf[64]; snprintf(buf, sizeof(buf), "%llu", (unsigned long long)iomax); - lp_set_cmdline("max xmit", buf); + lp_set_cmdline(global_loadparm, "max xmit", buf); } static int copy_files(void) @@ -418,7 +419,7 @@ static int copy_files(void) * could accumulate a remainder if ibs and obs don't match. */ iomax = 2 * MAX(ibs, obs); - if ((iobuf = malloc(iomax)) == NULL) { + if ((iobuf = malloc_array_p(uint8_t, iomax)) == NULL) { fprintf(stderr, "%s: failed to allocate IO buffer of %llu bytes\n", PROGNAME, (unsigned long long)iomax); @@ -428,7 +429,7 @@ static int copy_files(void) set_max_xmit(MAX(ibs, obs)); DEBUG(4, ("IO buffer size is %llu, max xmit is %d\n", - (unsigned long long)iomax, lp_max_xmit())); + (unsigned long long)iomax, lp_max_xmit(global_loadparm))); if (!(ifile = open_file("if"))) { return(FILESYS_EXIT_CODE); @@ -442,7 +443,7 @@ static int copy_files(void) ifile->io_seek(ifile, check_arg_numeric("skip") * ibs); ofile->io_seek(ofile, check_arg_numeric("seek") * obs); - DEBUG(4, ("max xmit was negotiated to be %d\n", lp_max_xmit())); + DEBUG(4, ("max xmit was negotiated to be %d\n", lp_max_xmit(global_loadparm))); for (data_size = 0;;) { @@ -548,9 +549,9 @@ int main(int argc, const char ** argv) set_arg_val("if", NULL); set_arg_val("of", NULL); /* Options. */ - set_arg_val("direct", False); - set_arg_val("sync", False); - set_arg_val("oplock", False); + set_arg_val("direct", false); + set_arg_val("sync", false); + set_arg_val("oplock", false); pctx = poptGetContext(PROGNAME, argc, argv, poptions, 0); while ((i = poptGetNextOpt(pctx)) != -1) { |