return(True);
}
-static BOOL fd_read_func(void * handle, uint8_t * buf, uint64_t wanted, uint64_t * actual)
+static BOOL fd_read_func(void * handle,
+ uint8_t * buf,
+ uint64_t wanted,
+ uint64_t * actual)
{
ssize_t ret;
ret = read(IO_HANDLE_TO_FD(handle), buf, wanted);
if (ret < 0) {
fprintf(stderr, "%s: %llu byte read failed: %s\n",
- PROGNAME, (unsigned long long)wanted, strerror(errno));
+ PROGNAME, (unsigned long long)wanted,
+ strerror(errno));
return(False);
}
return(True);
}
-static BOOL
-fd_write_func(void * handle, uint8_t * buf, uint64_t wanted, uint64_t * actual)
+static BOOL fd_write_func(void * handle,
+ uint8_t * buf,
+ uint64_t wanted,
+ uint64_t * actual)
{
ssize_t ret;
ret = write(IO_HANDLE_TO_FD(handle), buf, wanted);
if (ret < 0) {
fprintf(stderr, "%s: %llu byte write failed: %s\n",
- PROGNAME, (unsigned long long)wanted, strerror(errno));
+ PROGNAME, (unsigned long long)wanted,
+ strerror(errno));
return(False);
}
return(True);
}
-static struct dd_iohandle *
-open_fd_handle(const char * path, uint64_t iosz, int options)
+static struct dd_iohandle * open_fd_handle(const char * path,
+ uint64_t iosz,
+ int options)
{
struct fd_handle * fdh;
int oflags = 0;
return(True);
}
-BOOL smb_read_func(void * handle, uint8_t * buf,
- uint64_t wanted, uint64_t * actual)
+BOOL smb_read_func(void * handle,
+ uint8_t * buf,
+ uint64_t wanted,
+ uint64_t * actual)
{
NTSTATUS ret;
union smb_read r;
ret = smb_raw_read(smbh->cli->tree, &r);
if (!NT_STATUS_IS_OK(ret)) {
fprintf(stderr, "%s: %llu byte read failed: %s\n",
- PROGNAME, (unsigned long long)wanted, nt_errstr(ret));
+ PROGNAME, (unsigned long long)wanted,
+ nt_errstr(ret));
return(False);
}
return(True);
}
-BOOL smb_write_func(void * handle, uint8_t * buf,
- uint64_t wanted, uint64_t * actual)
+BOOL smb_write_func(void * handle,
+ uint8_t * buf,
+ uint64_t wanted,
+ uint64_t * actual)
{
NTSTATUS ret;
union smb_write w;
ret = smb_raw_write(smbh->cli->tree, &w);
if (!NT_STATUS_IS_OK(ret)) {
fprintf(stderr, "%s: %llu byte write failed: %s\n",
- PROGNAME, (unsigned long long)wanted, nt_errstr(ret));
+ PROGNAME, (unsigned long long)wanted,
+ nt_errstr(ret));
return(False);
}
return(True);
}
-static struct smbcli_state * init_smb_session(const char * host, const char * share)
+static struct smbcli_state * init_smb_session(const char * host,
+ const char * share)
{
NTSTATUS ret;
struct smbcli_state * cli = NULL;
return(cli);
}
-static int open_smb_file(struct smbcli_state * cli, const char * path, int options)
+static int open_smb_file(struct smbcli_state * cli,
+ const char * path,
+ int options)
{
NTSTATUS ret;
union smb_open o;
return(o.ntcreatex.out.fnum);
}
-static struct dd_iohandle * open_smb_handle(const char * host, const char * share,
- const char * path, uint64_t iosz, int options)
+static struct dd_iohandle * open_smb_handle(const char * host,
+ const char * share,
+ const char * path,
+ uint64_t iosz,
+ int options)
{
struct smb_handle * smbh;
* NOTE: The IO buffer is guaranteed to be big enough to fit needsz + blocksz
* bytes into it.
*/
-BOOL dd_fill_block(struct dd_iohandle * h, uint8_t * buf,
- uint64_t * bufsz, uint64_t needsz, uint64_t blocksz)
+BOOL dd_fill_block(struct dd_iohandle * h,
+ uint8_t * buf,
+ uint64_t * bufsz,
+ uint64_t needsz,
+ uint64_t blocksz)
{
uint64_t readsz;
* and shift any remaining bytes back to the head of the buffer when there are
* no more blocksz sized IOs left.
*/
-BOOL dd_flush_block(struct dd_iohandle * h, uint8_t * buf,
- uint64_t * bufsz, uint64_t blocksz)
+BOOL dd_flush_block(struct dd_iohandle * h,
+ uint8_t * buf,
+ uint64_t * bufsz,
+ uint64_t blocksz)
{
uint64_t writesz;
uint64_t totalsz = 0;