Skip to main content

ubi_volup

Function ubi_volup 

pub fn ubi_volup<Fd: AsFd>(fd: Fd, bytes: i64) -> Result<(), Errno>
Expand description

UBI_IOCVOLUP: starts an update of the volume of the file, /dev/ubi<n>_<m>, with bytes bytes.

Write the bytes to the file afterwards. The update ends after the last byte. Until then, the kernel marks the volume as corrupted. 0 bytes truncate the volume at once. Needs CAP_SYS_RESOURCE and a writable file.

ยงErrors

Returns the error of the ioctl. More bytes than the volume has return EINVAL. Up to Linux 4.8, the kernel miscalculates this limit for a volume with an alignment above 1 and accepts too many bytes.