DCMD_FSYS_MAP_OFFSET
QNX SDP8.0Devctl and Ioctl CommandsDeveloper
Map a logical filesystem offset to a physical filesystem or device offset
Synopsis:
#include <sys/dcmd_blk.h>
#define DCMD_FSYS_MAP_OFFSET __DIOTF(_DCMD_FSYS, 21, union fs_blkmap)
Arguments to devctl():
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device. |
dcmd | DCMD_FSYS_MAP_OFFSET |
dev_data_ptr | A pointer to a union fs_blkmap |
n_bytes | sizeof(union fs_blkmap) |
dev_info_ptr | NULL |
Description:
This command maps a logical filesystem offset to a physical filesystem or device offset, depending on the flag specified in the input. It uses a union fs_blkmap for both input and output:
union fs_blkmap {
struct {
off64_t logical;
uint32_t flags;
} i;
struct {
off64_t physical;
uint32_t nbytes;
} o;
};
Input:
The i (input) member includes:
- logical
- The logical offset.
- flags
- One of the following:
- FS_BMAP_FSYS — map to the filesystem.
- FS_BMAP_DEVICE — map to the physical device.
Output:
The o (output) member includes:
- physical
- The starting offset, in bytes.
- nbytes
- The length of the extent.
Errors:
The devctl() function can return the following, in addition to the error codes listed in its entry in the C Library Reference:
- ENXIO
- There are no more extents.
See also:
devctl() in the QNX OS C Library Reference
Page updated: