Lines Matching refs:io
65 struct dm_ioctl *io = (struct dm_ioctl *) buffer; in dumpState() local
66 ioctlInit(io, (1024 * 64), NULL, 0); in dumpState()
68 if (ioctl(fd, DM_LIST_DEVICES, io)) { in dumpState()
76 struct dm_name_list *n = (struct dm_name_list *) (((char *) buffer) + io->data_start); in dumpState()
117 void Devmapper::ioctlInit(struct dm_ioctl *io, size_t dataSize, in ioctlInit() argument
119 memset(io, 0, dataSize); in ioctlInit()
120 io->data_size = dataSize; in ioctlInit()
121 io->data_start = sizeof(struct dm_ioctl); in ioctlInit()
122 io->version[0] = 4; in ioctlInit()
123 io->version[1] = 0; in ioctlInit()
124 io->version[2] = 0; in ioctlInit()
125 io->flags = flags; in ioctlInit()
127 size_t ret = strlcpy(io->name, name, sizeof(io->name)); in ioctlInit()
128 if (ret >= sizeof(io->name)) in ioctlInit()
147 struct dm_ioctl *io = (struct dm_ioctl *) buffer; in lookupActive() local
149 ioctlInit(io, DEVMAPPER_BUFFER_SIZE, name, 0); in lookupActive()
150 if (ioctl(fd, DM_DEV_STATUS, io)) { in lookupActive()
160 unsigned minor = (io->dev & 0xff) | ((io->dev >> 12) & 0xfff00); in lookupActive()
181 struct dm_ioctl *io = (struct dm_ioctl *) buffer; in create() local
184 ioctlInit(io, DEVMAPPER_BUFFER_SIZE, name, 0); in create()
186 if (ioctl(fd, DM_DEV_CREATE, io)) { in create()
194 ioctlInit(io, DEVMAPPER_BUFFER_SIZE, name, 0); in create()
201 if (ioctl(fd, DM_DEV_SET_GEOMETRY, io)) { in create()
209 ioctlInit(io, DEVMAPPER_BUFFER_SIZE, name, 0); in create()
210 if (ioctl(fd, DM_DEV_STATUS, io)) { in create()
217 unsigned minor = (io->dev & 0xff) | ((io->dev >> 12) & 0xfff00); in create()
224 ioctlInit(io, DEVMAPPER_BUFFER_SIZE, name, DM_STATUS_TABLE_FLAG); in create()
225 io->target_count = 1; in create()
241 if (ioctl(fd, DM_TABLE_LOAD, io)) { in create()
249 ioctlInit(io, DEVMAPPER_BUFFER_SIZE, name, 0); in create()
251 if (ioctl(fd, DM_DEV_SUSPEND, io)) { in create()
278 struct dm_ioctl *io = (struct dm_ioctl *) buffer; in destroy() local
281 ioctlInit(io, DEVMAPPER_BUFFER_SIZE, name, 0); in destroy()
283 if (ioctl(fd, DM_DEV_REMOVE, io)) { in destroy()