tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ados fs and vnd


a few days ago I tried to mount an Amiga floppy disk image via vnd, but
mount_ados failed with EINVAL:

# vnconfig -c vnd0 disk.img 512/11/2/80
# mount_ados /dev/vnd0a /mnt
-> Invalid argument

The reason turned out to be a dependency of the ados filesystem on Amiga-
specific RDB disklabels.

The function adosfs_mountfs() in sys/fs/adosfs/advfsops.c seems to use
partition.p_frag as "sectors per block" and partition.p_cpg for the
"number of reserved blocks". Those fields will only be initialized
correctly by NetBSD/amiga's disksubr.c, and the Amiga floppy disk driver

To make the ados file system work with Amiga disk images on other devices
and non-Amiga platforms I would suggest to test in adosfs_mountfs() if
either p_frag or p_cpg is zero, and initialize both with default values for
a floppy disk in that case, which means p_frag=1 and p_cpg=2.

That wouldn't help much for hard disk images, but better than nothing.

Any objections or comments?

Frank Wille

Home | Main Index | Thread Index | Old Index