[Qt-interest] Block Device File I/O
Srdjan Todorovic
todorovic.s at googlemail.com
Tue Jun 1 17:53:28 CEST 2010
On 1 June 2010 04:22, Alex <shao.tu at gmail.com> wrote:
> Yes, the /dev/nstXX is the standard mount point for a tape drive under
> Linux.
No. /dev/nstXX is a device node for a tape drive, not a mount point.
> I agree with you that I may implement my own class inherits QIODevice to
> achieve.
> But, my problem is that I have no idea how to implement the real I/O action
> under QT framework.
> Especially for a block device file.
I would think that it would act like a SCSI device or a tape device.
Something like a data path and an out-of-band path. Data path would be
related to read() and write() syscalls, and out of band path would
perhaps be ioctl() calls to set tape parameters and actual hardware
control.
You could study parts of Linux Device Drivers (3rd edition) to get
more insight on how this works, or also study the source code of mt
and mtx, which are both tape device control programs.
Hope that helps,
Srdjan
More information about the Qt-interest-old
mailing list