Last night I got the Ftape tools -- including ftformat and ftmt
to work with the older ftape 3.04 (as I could not find a version of
ftape 4 that would compile).
Ftape tools comes with an "mtio.h" header file, that defines the
structure used to pass ioctl requests to the kernel. Ftape 3 has
a slightly different structure than ftape 4, however; the mtio.h
that comes with ftape tools is based on the ftape 4 structure.
As this has a different size, the constant "_IOWR('m', 10, struct ...)"
will evaluate differently in the kernel and userspace.
The solution is to use the structures defined in the ftape tools
header file instead -- this adds new fields, (specifically to mtftformat),
that the older kernel code will not use, but results in the kernel calls
working.
The second is that the code for ftformat has an error when calling the
older (version 3) API.
File ftfmt-tapelib.c, lines 426 (check_api_version) and 456
(send_format_ioctl) both assume that the older (api_version==0) kernel
takes a pointer to the format opcode (coded as &arg.fmt_op in one,
and &ftmt->fmt_op in the other). It actually takes a pointer to
the format structure (Change to &arg on the first, and ftmt on
the second).
With that change, I could run ftformat --verify-only, and get my
bad block list updated (and my tape more usable).
Q1: Where can I get a working version of ftape 4?
Q2: Attempting to subscribe to "[EMAIL PROTECTED]"
gave a "no such user" error. What's the correct subscribe address?