* -errno : An error occured.
*
* Command_data is always NULL.
- */
+ */
int smb2_pwrite_async(struct smb2_context *smb2, struct smb2fh *fh,
- uint8_t *buf, uint32_t count, uint64_t offset,
+ const uint8_t *buf, uint32_t count, uint64_t offset,
smb2_command_cb cb, void *cb_data);
/*
* server supports.
*/
int smb2_pwrite(struct smb2_context *smb2, struct smb2fh *fh,
- uint8_t *buf, uint32_t count, uint64_t offset);
+ const uint8_t *buf, uint32_t count, uint64_t offset);
/*
* READ
* Command_data is always NULL.
*/
int smb2_write_async(struct smb2_context *smb2, struct smb2fh *fh,
- uint8_t *buf, uint32_t count,
+ const uint8_t *buf, uint32_t count,
smb2_command_cb cb, void *cb_data);
/*
* Sync write()
*/
int smb2_write(struct smb2_context *smb2, struct smb2fh *fh,
- uint8_t *buf, uint32_t count);
+ const uint8_t *buf, uint32_t count);
/*
* Sync lseek()
struct smb2_write_request {
uint32_t length;
uint64_t offset;
- uint8_t *buf;
+ const uint8_t* buf;
smb2_file_id file_id;
uint32_t channel;
uint32_t remaining_bytes;
int
smb2_pwrite_async(struct smb2_context *smb2, struct smb2fh *fh,
- uint8_t *buf, uint32_t count, uint64_t offset,
+ const uint8_t *buf, uint32_t count, uint64_t offset,
smb2_command_cb cb, void *cb_data)
{
struct smb2_write_request req;
int
smb2_write_async(struct smb2_context *smb2, struct smb2fh *fh,
- uint8_t *buf, uint32_t count,
+ const uint8_t *buf, uint32_t count,
smb2_command_cb cb, void *cb_data)
{
return smb2_pwrite_async(smb2, fh, buf, count, fh->offset,
return NULL;
}
- smb2_add_iovector(smb2, &pdu->out, req->buf,
+ smb2_add_iovector(smb2, &pdu->out, (uint8_t*)req->buf,
req->length, NULL);
if (smb2_pad_to_64bit(smb2, &pdu->out) != 0) {
}
int smb2_pwrite(struct smb2_context *smb2, struct smb2fh *fh,
- uint8_t *buf, uint32_t count, uint64_t offset)
+ const uint8_t *buf, uint32_t count, uint64_t offset)
{
struct sync_cb_data cb_data;
}
int smb2_write(struct smb2_context *smb2, struct smb2fh *fh,
- uint8_t *buf, uint32_t count)
+ const uint8_t *buf, uint32_t count)
{
struct sync_cb_data cb_data;