pwrite_device


Description:

[ Version ( since = "1.5.20" ) ]
public int32 pwrite_device (string device, uint8[] content, int64 offset) throws Error

write to part of a device

This command writes to part of a device. It writes the data buffer content to device starting at offset offset .

This command implements the pwrite(2) system call, and like that system call it may not write the full data requested (although short writes to disk devices and partitions are probably impossible with standard Linux kernels).

See also pwrite.

Parameters:

this

A GuestfsSession object

content

an array of binary data

content_size

The size of content, in bytes

Returns:

the returned value, or -1 on error