Hello,
it seems that superformat has problems with
the device file system devfs. There the floppy
device files all live under /dev/floppy. With
superformat this leeds to problems like the
following:
mnemaxa:~# strace superformat /dev/floppy/1h1200
execve("/usr/bin/superformat", ["superformat",
"/dev/floppy/1h1200"], [/* 18 vars */]) = 0
uname({sys="Linux", node="mnemaxa", ...}) = 0
.....
open("/dev/floppy/1h1200", O_RDWR|O_NONBLOCK|O_EXCL) = 3
fstat64(0x3, 0xbfffc7bc) = 0
ioctl(3, FDRESET, 0x1) = 0
ioctl(3, FDGETDRVPRM, 0xbfffd2e4) = 0
open("/etc/driveprm", O_RDONLY) = -1 ENOENT (No such file or
directory)
ioctl(3, FDGETPRM, 0xbfffd254) = 0
close(3) = 0
open("/dev/fd1", O_RDWR|O_NONBLOCK|O_EXCL) = -1 ENOENT (No such file or
directory)
write(2, "open: No such file or directory\n", 32open: No such file or
directory
) = 32
_exit(1) = ?
The user tries to format /dev/floppy/1h1200, but superformat
changes this to the non-existent /dev/fd1.
I think that the following code in "superformat.c"
(from fdutils-5.4-20020222) is responsible for this:
Starting at line 734:
/* this is not a generic format device. Close it,
* and open the proper device instead */
if(argc == 0)
ioctl(fd[0].fd, FDGETPRM, &geometry);
have_geom = 1;
close(fd[0].fd);
snprintf(drivename,9,"/dev/fd%d", fd[0].drive);
fd[0].name = drivename;
I think it would help to change this as follows:
1) Check for the existence of /dev/.devfsd
2) If it exists (devfs is used), use "/dev/floppy/%d"
as the device name.
3) If .devfsd does not exist, proceed as in the code sniplet
above.
I hope this helps,
Jochen
--
http://www.mathematik.uni-kl.de/~wwwstoch/voss/