Control an embedded transaction filesystem
etfsctl [-cDeFfipSs] [-d device] [-l len] [-o offset] [-R file] [-r file] [-W file] [-w file]
QNX Neutrino
If you wish, you can use the -l and -o options to specify the length and offset for the erasure. If used, these options must preceed the -e option.
The data format is endian-neutral and free of any device-specific characteristics such as how it stores CRCs or ECCs. You can now read and write filesystems across different classes of devices, for example for NAND and RAM.
If you wish, you can use the -l and -o options to specify the length and offset for which to read. If used, these options must preceed the -r or -R option. If you specify the -l option, etfsctl doesn't read past this length.
If you wish, you can use the -o option to specify the offset at which to write. If used, this option must preceed the -w or -W option.
The etfsctl utility is used to manage an embedded transaction filesystem (ETFS). The utility interacts with the running filesystem using devctl() messages. Using etfsctl, you can erase and format a partition, read or write an entire transaction log (and thus its entire filesystem) from or to the device, stop the filesystem, make it continue or get statistical information.
Options are processed from left to right in order. The first option must be a -d device where:
The raw partition is used for user extensions, such as boot images, and is always at the start of the device. It may be zero bytes long if you don't need it.
The filesystem partition consists of a series of transactions that together form a filesystem. You can use the -r option to read the transactions from the device and save them to a regular file, typically on another filesystem. You can then use the -w option to write this transaction log to another ETFS filesystem.
The -w option is most often used to write transaction logs created by the mketfs utility.
You can request the filesystem to stop accepting new open requests by using the -s or -S option. Once the last file currently open by any application is closed, the filesystem enters the stopped state. A filesystem partition must be stopped in order for you to write a transaction log to it. You can start the filesystem again using the -c option.
The -i option provides useful statistical information about a running filesystem. This option is so common that it assumes /dev/etfs2, thus saving you from having to enter the -d option before it. The information is displayed in several groups: Device, Pools, Counts, and Errors. The output includes:
Print information about a filesystem. If you omit the -d option, etfsctl assumes /dev/etfs2.
etfsctl -i etfsctl -d /dev/etfs2 -i
Format an empty filesystem:
etfsctl -d /dev/etfs2 -S -f -c
Write a filesystem built by mketfs:
etfsctl -d /dev/etfs2 -S -e -w fsys.etfs -c
Save the entire filesystem. Erase the part, and restore the filesystem:
etfsctl -d /dev/etfs2 -r debug.etfs etfsctl -d /dev/etfs2 -S -e -w debug.etfs -c
Erase part of a raw ETFS partition, without erasing the boot monitor:
etfsctl -d /dev/etfs1 -o 3M -l 6M -e
Read part of a raw partition:
etfsctl -d /dev/etfs1 -o 3m -2k -R /temp/raw.stuff