1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-22 16:42:56 -08:00

Deprecate vnds in favour of svnds.

In effect, this removes the "old" vndX nodes, and renames
the svndX nodes to vndX.

Old svndX nodes will still continue to work though, for now.

Cleanup accordingly.

ok deraadt@, todd@
comments and ok on the man page bits from jmc@
This commit is contained in:
thib 2011-04-18 16:52:09 +00:00
parent ad08565a1e
commit a4975643f9
99 changed files with 407 additions and 473 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.17 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.18 2011/04/18 16:52:09 thib Exp $
TOP= ${.CURDIR}/..
@ -7,7 +7,7 @@ IMAGE= ramdisk${REV}.fs
MOUNT_POINT= /mnt
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.7 2010/08/26 01:35:44 krw Exp $
# $OpenBSD: Makefile,v 1.8 2011/04/18 16:52:09 thib Exp $
TOP= ${.CURDIR}/..
@ -27,14 +27,14 @@ ${CDROM}:
-p "Theo de Raadt <deraadt@openbsd.org>" \
-V "OpenBSD/${MACHINE} ${OSREV} boot-only CD" \
${.OBJDIR}/cd-dir 2>&1) | tee log
vnconfig -v -c svnd0 ${.OBJDIR}/${CDROM}
mount -t cd9660 /dev/svnd0a /mnt
vnconfig -v -c vnd0 ${.OBJDIR}/${CDROM}
mount -t cd9660 /dev/vnd0a /mnt
/usr/mdec/installboot -v \
-s `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/${MACHINE}/boot$$" | cut -d' ' -f1` \
-e `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/${MACHINE}/boot$$" | cut -d' ' -f2` \
/mnt/${OSREV}/${MACHINE}/boot /usr/mdec/bootxx /dev/rsvnd0c
/mnt/${OSREV}/${MACHINE}/boot /usr/mdec/bootxx /dev/rvnd0c
umount /mnt
vnconfig -u svnd0
vnconfig -u vnd0
.ifdef RELEASEDIR
install:
@ -47,7 +47,7 @@ clean cleandir:
unconfig:
-umount /mnt
-vnconfig -u svnd0
-vnconfig -u vnd0
.include <bsd.obj.mk>
.include <bsd.subdir.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.22 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile.inc,v 1.23 2011/04/18 16:52:09 thib Exp $
TOP= ${.CURDIR}/..
@ -7,7 +7,7 @@ IMAGE= ramdisk${REV}.fs
MOUNT_POINT= /mnt
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.8 2010/10/18 05:40:47 deraadt Exp $
# $OpenBSD: Makefile,v 1.9 2011/04/18 16:52:09 thib Exp $
TOP= ${.CURDIR}/..
@ -39,14 +39,14 @@ ${CDROM}: ${BASE} ${XBASE}
-p "Theo de Raadt <deraadt@openbsd.org>" \
-V "OpenBSD/${MACHINE} ${OSREV} Install CD" \
${.OBJDIR}/cd-dir 2>&1) | tee log
vnconfig -v -c svnd0 ${.OBJDIR}/${CDROM}
mount -t cd9660 /dev/svnd0a /mnt
vnconfig -v -c vnd0 ${.OBJDIR}/${CDROM}
mount -t cd9660 /dev/vnd0a /mnt
/usr/mdec/installboot -v \
-s `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/${MACHINE}/boot$$" | cut -d' ' -f1` \
-e `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/${MACHINE}/boot$$" | cut -d' ' -f2` \
/mnt/${OSREV}/${MACHINE}/boot /usr/mdec/bootxx /dev/rsvnd0c
/mnt/${OSREV}/${MACHINE}/boot /usr/mdec/bootxx /dev/rvnd0c
umount /mnt
vnconfig -u svnd0
vnconfig -u vnd0
install:
cp ${CDROM} ${RELDIR}/
@ -62,7 +62,7 @@ clean cleandir:
unconfig:
-umount /mnt
-vnconfig -u svnd0
-vnconfig -u vnd0
.include <bsd.obj.mk>
.include <bsd.subdir.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.15 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile.inc,v 1.16 2011/04/18 16:52:09 thib Exp $
TOP= ${.CURDIR}/..
@ -14,7 +14,7 @@ MTREE= ${UTILS}/mtree.conf
XNAME?= floppy
FS?= ${XNAME}${REV}.fs
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.8 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.9 2011/04/18 16:52:09 thib Exp $
REV= ${OSrev}
@ -15,7 +15,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.3 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.4 2011/04/18 16:52:09 thib Exp $
REV= ${OSrev}
@ -15,7 +15,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.28 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.29 2011/04/18 16:52:09 thib Exp $
# $NetBSD: Makefile,v 1.1 1995/07/18 04:13:06 briggs Exp $
TOP= ${.CURDIR}/..
@ -10,7 +10,7 @@ BASE= ramdisk
MOUNT_POINT= /mnt
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.8 2011/02/17 20:24:11 jasper Exp $
# $OpenBSD: Makefile,v 1.9 2011/04/18 16:52:09 thib Exp $
TOP= ${.CURDIR}/..
@ -51,7 +51,7 @@ clean cleandir:
/bin/rm -rf cd-dir ${CDROM}
unconfig:
-vnconfig -u svnd0
-vnconfig -u vnd0
.include <bsd.obj.mk>
.include <bsd.subdir.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.22 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.23 2011/04/18 16:52:09 thib Exp $
CBIN= instbin
ARCHDIR= ${.CURDIR}/..
@ -11,7 +11,7 @@ SRCDIR= ${.CURDIR}/../../..
.endif
MOUNT_POINT?= /mnt
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
DISKTYPE= rdroot

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.28 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile.inc,v 1.29 2011/04/18 16:52:09 thib Exp $
TOP= ${.CURDIR}/..
@ -14,7 +14,7 @@ MTREE= ${UTILS}/mtree.conf
XNAME?= floppy
FS?= ${XNAME}${REV}.fs
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -6,7 +6,7 @@ IMAGE= miniroot${REV}.fs
MOUNT_POINT= /mnt
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.13 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.14 2011/04/18 16:52:09 thib Exp $
REV= ${OSrev}
@ -15,7 +15,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -6,7 +6,7 @@ IMAGE= miniroot${REV}.fs
MOUNT_POINT= /mnt
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_CDEV= /dev/${VND}c
VND_IDEV= /dev/${VND}i

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.5 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.6 2011/04/18 16:52:09 thib Exp $
REV= ${OSrev}
@ -15,7 +15,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.11 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.12 2011/04/18 16:52:09 thib Exp $
TOP= ${.CURDIR}/..
@ -12,7 +12,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.15 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.16 2011/04/18 16:52:09 thib Exp $
TOP= ${.CURDIR}/..
@ -13,7 +13,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.25 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.26 2011/04/18 16:52:09 thib Exp $
REV= ${OSrev}
@ -15,7 +15,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.32 2010/10/18 04:07:48 deraadt Exp $
# $OpenBSD: Makefile,v 1.33 2011/04/18 16:52:10 thib Exp $
REV= ${OSrev}
@ -14,7 +14,7 @@ ARCHDIR= ${.CURDIR}/../${MACHINE}/miniroot
UTILS= ${.CURDIR}
MOUNT_POINT?= /mnt
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
DISKTYPE= miniroot

View File

@ -1,4 +1,4 @@
# $OpenBSD: install.sub,v 1.637 2011/04/17 20:57:10 krw Exp $
# $OpenBSD: install.sub,v 1.638 2011/04/18 16:52:10 thib Exp $
# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
@ -1630,7 +1630,7 @@ install_sets() {
# 2) have 'xx' in the option field (usually /altroot),
# 3) have 'noauto' in the option field,
# 4) are nfs (since name resolution may not be present),
# 5) are on a svnd device.
# 5) are on a vnd device.
#
# In addition,
#
@ -1645,7 +1645,7 @@ munge_fstab() {
while read _dev _mp _fstype _opt _rest; do
# Drop irrelevant lines and filesystems.
[[ $_dev == @(/dev/svnd*|\#*) || \
[[ $_dev == @(/dev/vnd*|\#*) || \
$_fstype == nfs || \
! -f /sbin/mount_$_fstype || \
$_opt == *noauto* || \

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.27 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.28 2011/04/18 16:52:10 thib Exp $
TOP= ${.CURDIR}/..
@ -12,7 +12,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.16 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.17 2011/04/18 16:52:10 thib Exp $
TOP= ${.CURDIR}/..
@ -12,7 +12,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.16 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.17 2011/04/18 16:52:10 thib Exp $
TOP= ${.CURDIR}/..
@ -12,7 +12,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.3 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.4 2011/04/18 16:52:10 thib Exp $
REV= ${OSrev}
@ -15,7 +15,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.37 2010/10/18 04:07:51 deraadt Exp $
# $OpenBSD: Makefile,v 1.38 2011/04/18 16:52:10 thib Exp $
REV= ${OSrev}
@ -12,7 +12,7 @@ ARCHDIR= ${.CURDIR}/../${MACHINE}/ramdisk
.endif
MOUNT_POINT?= /mnt
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
DISKTYPE= rdroot

View File

@ -2255,7 +2255,7 @@
./usr/share/man/cat4/stp.0
./usr/share/man/cat4/sv.0
./usr/share/man/cat4/svlan.0
./usr/share/man/cat4/svnd.0
./usr/share/man/cat4/vnd.0
./usr/share/man/cat4/sym.0
./usr/share/man/cat4/systrace.0
./usr/share/man/cat4/tcic.0

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.10 2010/03/31 19:44:33 miod Exp $
# $OpenBSD: Makefile,v 1.11 2011/04/18 16:52:10 thib Exp $
TOP= ${.CURDIR}/..
@ -15,10 +15,10 @@ ${CDROM}:
-rm -rf ${.OBJDIR}/cd-dir
mkdir -p ${.OBJDIR}/cd-dir/
dd if=/dev/zero of=${.OBJDIR}/${FFS} bs=1m count=${CDFSMB}
vnconfig -v -c svnd0 ${.OBJDIR}/${FFS}
disklabel -w svnd0 minicdroot "OpenBSD/sgi "
newfs /dev/rsvnd0a
mount /dev/svnd0a ${.OBJDIR}/cd-dir
vnconfig -v -c vnd0 ${.OBJDIR}/${FFS}
disklabel -w vnd0 minicdroot "OpenBSD/sgi "
newfs /dev/rvnd0a
mount /dev/vnd0a ${.OBJDIR}/cd-dir
mkdir -p ${.OBJDIR}/cd-dir/${OSrev}/sgi
gzip -9f < ${.OBJDIR}/../ramdisk/${BSDRD}.IP27 > \
${.OBJDIR}/cd-dir/bsd.IP27
@ -38,17 +38,17 @@ ${CDROM}:
cp ${DESTDIR}/usr/mdec/boot32 ${.OBJDIR}/cd-dir/boot32
cp ${DESTDIR}/usr/mdec/boot64 ${.OBJDIR}/cd-dir/boot64
umount ${.OBJDIR}/cd-dir
@df /dev/svnd0a
vnconfig -u svnd0
@df /dev/vnd0a
vnconfig -u vnd0
dd if=/dev/zero of=${.OBJDIR}/${CDROM} bs=1m count=`expr ${CDFSMB} + 2`
vnconfig -v -c svnd0 ${.OBJDIR}/${CDROM}
vnconfig -v -c vnd0 ${.OBJDIR}/${CDROM}
# boot32 needs 77, boot64 needs 173, and add some room for growth
/usr/mdec/sgivol -i -h 320 svnd0 > ${.OBJDIR}/volhdr
/usr/mdec/sgivol -w boot32 ${DESTDIR}/usr/mdec/boot32 svnd0
/usr/mdec/sgivol -l boot32 sashARCS svnd0
/usr/mdec/sgivol -w boot64 ${DESTDIR}/usr/mdec/boot64 svnd0
/usr/mdec/sgivol -l boot64 sash64 svnd0
vnconfig -u svnd0
/usr/mdec/sgivol -i -h 320 vnd0 > ${.OBJDIR}/volhdr
/usr/mdec/sgivol -w boot32 ${DESTDIR}/usr/mdec/boot32 vnd0
/usr/mdec/sgivol -l boot32 sashARCS vnd0
/usr/mdec/sgivol -w boot64 ${DESTDIR}/usr/mdec/boot64 vnd0
/usr/mdec/sgivol -l boot64 sash64 vnd0
vnconfig -u vnd0
dd if=${.OBJDIR}/${FFS} of=${.OBJDIR}/${CDROM} bs=512 \
seek=`cat ${.OBJDIR}/volhdr | grep 'Volume Header' | awk '{print $$3}'`
@ -60,7 +60,7 @@ install:
unconfig:
-umount /mnt
-umount ${.OBJDIR}/cd-dir
-vnconfig -u svnd0
-vnconfig -u vnd0
clean cleandir:
/bin/rm -f ${CDROM} ${FFS} volhdr

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.16 2010/10/18 05:40:47 deraadt Exp $
# $OpenBSD: Makefile,v 1.17 2011/04/18 16:52:10 thib Exp $
TOP= ${.CURDIR}/..
@ -31,17 +31,17 @@ ${CDROM}:
mkdir -p ${.OBJDIR}/cd-dir/
dd if=/dev/zero of=${.OBJDIR}/${CDROM} bs=2048b count=280
vnconfig -v -c -t cdroot svnd0 ${.OBJDIR}/${CDROM}
vnconfig -v -c -t cdroot vnd0 ${.OBJDIR}/${CDROM}
/usr/mdec/sgivol -i -h 80 svnd0
/usr/mdec/sgivol -w boot32 ${DESTDIR}/usr/mdec/boot32 svnd0
/usr/mdec/sgivol -l boot32 sashARCS svnd0
/usr/mdec/sgivol -w boot64 ${DESTDIR}/usr/mdec/boot64 svnd0
/usr/mdec/sgivol -l boot64 sash64 svnd0
/usr/mdec/sgivol -i -h 80 vnd0
/usr/mdec/sgivol -w boot32 ${DESTDIR}/usr/mdec/boot32 vnd0
/usr/mdec/sgivol -l boot32 sashARCS vnd0
/usr/mdec/sgivol -w boot64 ${DESTDIR}/usr/mdec/boot64 vnd0
/usr/mdec/sgivol -l boot64 sash64 vnd0
disklabel -w svnd0 cdroot "OpenBSD/sgi "
newfs /dev/rsvnd0a
mount /dev/svnd0a ${.OBJDIR}/cd-dir
disklabel -w vnd0 cdroot "OpenBSD/sgi "
newfs /dev/rvnd0a
mount /dev/vnd0a ${.OBJDIR}/cd-dir
mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}
cp ${DESTDIR}/usr/mdec/boot32 ${.OBJDIR}/cd-dir/boot32
@ -62,7 +62,7 @@ ${CDROM}:
cp -p ${XBASE} ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}
umount ${.OBJDIR}/cd-dir
vnconfig -u svnd0
vnconfig -u vnd0
install:
cp ${CDROM} ${RELDIR}/
@ -75,7 +75,7 @@ install:
unconfig:
-umount /mnt
-umount ${.OBJDIR}/cd-dir
-vnconfig -u svnd0
-vnconfig -u vnd0
clean cleandir:
/bin/rm -f ${CDROM}

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.13 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.14 2011/04/18 16:52:10 thib Exp $
REV= ${OSrev}
@ -15,7 +15,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -6,7 +6,7 @@ IMAGE= miniroot${REV}.fs
MOUNT_POINT= /mnt
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_CDEV= /dev/${VND}c
VND_IDEV= /dev/${VND}i

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.9 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.10 2011/04/18 16:52:10 thib Exp $
REV= ${OSrev}
@ -16,7 +16,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.7 2011/04/10 20:00:43 krw Exp $
# $OpenBSD: Makefile,v 1.8 2011/04/18 16:52:10 thib Exp $
TOP= ${.CURDIR}/..
@ -21,14 +21,14 @@ ${CDROM}:
-p "Theo de Raadt <deraadt@openbsd.org>" \
-V "OpenBSD/sparc ${OSREV} boot-only CD" \
${.OBJDIR}/cd-dir 2>&1) | tee log
vnconfig -v -c svnd0 ${.OBJDIR}/${CDROM}
mount -t cd9660 /dev/svnd0a /mnt
vnconfig -v -c vnd0 ${.OBJDIR}/${CDROM}
mount -t cd9660 /dev/vnd0a /mnt
/usr/mdec/installboot -v \
-s `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/sparc/boot$$" | cut -d' ' -f1` \
-e `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/sparc/boot$$" | cut -d' ' -f2` \
/mnt/${OSREV}/sparc/boot /usr/mdec/bootxx /dev/rsvnd0c
/mnt/${OSREV}/sparc/boot /usr/mdec/bootxx /dev/rvnd0c
umount /mnt
vnconfig -u svnd0
vnconfig -u vnd0
# XXX Some sparc machines fail to load the kernel correctly if the
# XXX cd image is truncated. It is not yet known why this happens.
# XXX For now we pad the image.
@ -45,7 +45,7 @@ clean cleandir:
unconfig:
-umount /mnt
-vnconfig -u svnd0
-vnconfig -u vnd0
.include <bsd.obj.mk>
.include <bsd.subdir.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.7 2011/04/10 20:00:43 krw Exp $
# $OpenBSD: Makefile,v 1.8 2011/04/18 16:52:10 thib Exp $
TOP= ${.CURDIR}/..
@ -39,14 +39,14 @@ ${CDROM}: ${BASE} ${XBASE}
-p "Theo de Raadt <deraadt@openbsd.org>" \
-V "OpenBSD/${MACHINE} ${OSREV} Install CD" \
${.OBJDIR}/cd-dir 2>&1) | tee log
vnconfig -v -c svnd0 ${.OBJDIR}/${CDROM}
mount -t cd9660 /dev/svnd0a /mnt
vnconfig -v -c vnd0 ${.OBJDIR}/${CDROM}
mount -t cd9660 /dev/vnd0a /mnt
/usr/mdec/installboot -v \
-s `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/${MACHINE}/boot$$" | cut -d' ' -f1` \
-e `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/${MACHINE}/boot$$" | cut -d' ' -f2` \
/mnt/${OSREV}/${MACHINE}/boot /usr/mdec/bootxx /dev/rsvnd0c
/mnt/${OSREV}/${MACHINE}/boot /usr/mdec/bootxx /dev/rvnd0c
umount /mnt
vnconfig -u svnd0
vnconfig -u vnd0
# XXX Some ${MACHINE} machines fail to load the kernel correctly if the
# XXX cd image is truncated. It is not yet known why this happens.
# XXX For now we pad the image.
@ -66,7 +66,7 @@ clean cleandir:
unconfig:
-umount /mnt
-vnconfig -u svnd0
-vnconfig -u vnd0
.include <bsd.obj.mk>
.include <bsd.subdir.mk>

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.21 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.22 2011/04/18 16:52:10 thib Exp $
TOP= ${.CURDIR}/..
@ -10,7 +10,7 @@ UTILS?= ${TOP}/../miniroot
MOUNT_POINT= /mnt
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.11 2009/04/17 03:58:55 deraadt Exp $
# $OpenBSD: Makefile.inc,v 1.12 2011/04/18 16:52:10 thib Exp $
TOP= ${.CURDIR}/..
@ -14,7 +14,7 @@ MTREE= ${UTILS}/mtree.conf
XNAME?= floppy
FS?= ${XNAME}${REV}.fs
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.5 2010/02/26 23:15:48 deraadt Exp $
# $OpenBSD: Makefile,v 1.6 2011/04/18 16:52:10 thib Exp $
TOP= ${.CURDIR}/..
@ -17,17 +17,17 @@ all: ${TARGET}
${TARGET}: vn_up install_files installboot showit vn_down
vn_up: blank_filesystem
vnconfig svnd0 ${TARGET}
disklabel -w svnd0 fakeramdisk
newfs -m 0 /dev/rsvnd0a
mount /dev/svnd0a /mnt
vnconfig vnd0 ${TARGET}
disklabel -w vnd0 fakeramdisk
newfs -m 0 /dev/rvnd0a
mount /dev/vnd0a /mnt
showit:
df -ki /mnt
vn_down:
-umount /mnt
-vnconfig -u svnd0
-vnconfig -u vnd0
install_files: bsd.rd ofwboot
@ -40,7 +40,7 @@ ofwboot:
${DESTDIR}/usr/mdec/ofwboot /mnt/ofwboot
installboot:
/usr/mdec/installboot -v ${DESTDIR}/usr/mdec/bootblk /dev/svnd0c
/usr/mdec/installboot -v ${DESTDIR}/usr/mdec/bootblk /dev/vnd0c
blank_filesystem:
dd if=/dev/zero of=${TARGET} bs=512 count=5760
@ -49,7 +49,7 @@ blank_filesystem:
unconfig:
-umount -f /mnt
-vnconfig -u /dev/svnd0a
-vnconfig -u /dev/vnd0a
.ifdef RELEASEDIR
install:

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.24 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.25 2011/04/18 16:52:10 thib Exp $
TOP= ${.CURDIR}/..
@ -17,7 +17,7 @@ FLOPPYSIZE?= 2880
FLOPPYTYPE?= floppy
INSTALLBOOT?= /usr/mdec/installboot
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.17 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.18 2011/04/18 16:52:10 thib Exp $
TOP= ${.CURDIR}/..
@ -17,7 +17,7 @@ FLOPPYSIZE?= 2880
FLOPPYTYPE?= floppy
INSTALLBOOT?= /usr/mdec/installboot
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.6 2009/04/17 03:58:55 deraadt Exp $
# $OpenBSD: Makefile.inc,v 1.7 2011/04/18 16:52:10 thib Exp $
# TOP is assumed to be defined by Makefile including this one.
@ -7,7 +7,7 @@ COMMONDIR= ${TOP}/common
UTILS= ${TOP}/../miniroot
MOUNT_POINT?= /mnt
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
IMAGE?= miniroot-${REV}.fs

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.6 2010/10/18 05:40:47 deraadt Exp $
# $OpenBSD: Makefile,v 1.7 2011/04/18 16:52:10 thib Exp $
TOP= ${.CURDIR}/..
@ -18,7 +18,7 @@ XBASE= ${RELXDIR}/xbase${OSrev}.tgz ${RELXDIR}/xetc${OSrev}.tgz \
${RELXDIR}/xserv${OSrev}.tgz
MOUNT_POINT?= /mnt
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
DISKTYPE= isoroot

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.8 2011/04/15 03:11:22 deraadt Exp $
# $OpenBSD: Makefile,v 1.9 2011/04/18 16:52:10 thib Exp $
REV= ${OSrev}
@ -15,7 +15,7 @@ UTILS?= ${.CURDIR}/../../miniroot
MOUNT_POINT= /mnt
MTREE= ${UTILS}/mtree.conf
VND?= svnd0
VND?= vnd0
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
VND_CRDEV= /dev/r${VND}c

View File

@ -1,4 +1,4 @@
vers(a, {-$OpenBSD: MAKEDEV.common,v 1.53 2010/09/30 15:27:54 claudio Exp $-})dnl
vers(a, {-$OpenBSD: MAKEDEV.common,v 1.54 2011/04/18 16:52:10 thib Exp $-})dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
dnl
@ -283,8 +283,7 @@ __devitem(wd, {-wd*-}, {-quote(winchester)disk drives (ST506{-,-} IDE{-,-} ESDI{
__devitem(ccd, ccd*, Concatenated disk devices)dnl
__devitem(raid, raid*, RAIDframe disk devices)dnl
__devitem(vnd, vnd*, quote(file)pseudo-disk devices)dnl
_mkdev(vnd, vnd*, {-dodisk vnd $U major_vnd_b major_vnd_c $U 0{--}ifstep(vnd)
dodisk svnd $U major_vnd_b major_vnd_c $U 2048{--}ifstep(vnd)-})dnl
_mkdev(vnd, vnd*, {-dodisk vnd $U major_vnd_b major_vnd_c $U 0{--}ifstep(vnd)-})dnl
__devitem(ra, ra*, {-MSCP disks-})dnl
__devitem(hp, hp*, {-MASSBUS disks-})dnl
__devitem(hk, hk*, {-UNIBUS RK06 and RK07 disks-})dnl

View File

@ -1,7 +1,7 @@
define(COMM,`#')dnl
include(MAKEDEV.sub)dnl
dnl
vers(a, {-$OpenBSD: MAKEDEV.mi,v 1.79 2009/01/25 17:30:48 miod Exp $-})dnl
vers(a, {-$OpenBSD: MAKEDEV.mi,v 1.80 2011/04/18 16:52:10 thib Exp $-})dnl
dnl
divert(1)dnl
{-#-}
@ -152,7 +152,7 @@ dnl 2. unit - beginning unit number for block devices
dnl 3. blkmaj - block device major number
dnl 4. chrmaj - character device major number
dnl 5. unit - beginning unit number for character devices
dnl 6. off - offset from 0 for all minor numbers (see svnd for an example)
dnl 6. off - offset from 0 for all minor numbers
dnl 7. step - optional, defaults to 16, number of partitions per device
dnl

View File

@ -511,7 +511,6 @@ ch*)
vnd*)
dodisk vnd $U 9 9 $U 0
dodisk svnd $U 9 9 $U 2048
;;
rd*)

View File

@ -542,7 +542,6 @@ ch*)
vnd*)
dodisk vnd $U 14 41 $U 0
dodisk svnd $U 14 41 $U 2048
;;
rd*)

View File

@ -482,7 +482,6 @@ st*)
vnd*)
dodisk vnd $U 19 19 $U 0
dodisk svnd $U 19 19 $U 2048
;;
rd*)

View File

@ -320,7 +320,6 @@ ch*)
vnd*)
dodisk vnd $U 8 19 $U 0
dodisk svnd $U 8 19 $U 2048
;;
rd*)

View File

@ -446,7 +446,6 @@ ch*)
vnd*)
dodisk vnd $U 6 19 $U 0
dodisk svnd $U 6 19 $U 2048
;;
rd*)

View File

@ -459,7 +459,6 @@ ch*)
vnd*)
dodisk vnd $U 2 8 $U 0
dodisk svnd $U 2 8 $U 2048
;;
rd*)

View File

@ -449,7 +449,6 @@ ch*)
vnd*)
dodisk vnd $U 2 8 $U 0
dodisk svnd $U 2 8 $U 2048
;;
rd*)

View File

@ -1,4 +1,4 @@
$OpenBSD: INSTALL.linux,v 1.15 2010/02/22 10:44:07 giovanni Exp $
$OpenBSD: INSTALL.linux,v 1.16 2011/04/18 16:52:10 thib Exp $
Linux + OpenBSD: it's possible
@ -55,7 +55,7 @@ contents are unimportant (or whose backups are always up-to-date) next to
the frontier between OpenBSD and Linux. For instance, it's usually a good
idea to locate the swap area such that you can grow or shrink it. Keep in
mind that exceptional usage (very large, temporary swaps) can use a
temporary file instead of a partition, under both OpenBSD (svnd) and Linux.
temporary file instead of a partition, under both OpenBSD (vnd) and Linux.
First principles
----------------

View File

@ -553,7 +553,6 @@ ch*)
vnd*)
dodisk vnd $U 14 41 $U 0
dodisk svnd $U 14 41 $U 2048
;;
rd*)

View File

@ -458,7 +458,6 @@ st*)
vnd*)
dodisk vnd $U 19 19 $U 0
dodisk svnd $U 19 19 $U 2048
;;
rd*)

View File

@ -442,7 +442,6 @@ ch*)
vnd*)
dodisk vnd $U 2 11 $U 0
dodisk svnd $U 2 11 $U 2048
;;
rd*)

View File

@ -354,7 +354,6 @@ ch*)
vnd*)
dodisk vnd $U 8 19 $U 0
dodisk svnd $U 8 19 $U 2048
;;
rd*)

View File

@ -374,7 +374,6 @@ ch*)
vnd*)
dodisk vnd $U 8 19 $U 0
dodisk svnd $U 8 19 $U 2048
;;
rd*)

View File

@ -499,7 +499,6 @@ ch*)
vnd*)
dodisk vnd $U 14 19 $U 0
dodisk svnd $U 14 19 $U 2048
;;
rd*)

View File

@ -403,7 +403,6 @@ ch*)
vnd*)
dodisk vnd $U 6 19 $U 0
dodisk svnd $U 6 19 $U 2048
;;
rd*)

View File

@ -358,7 +358,6 @@ ch*)
vnd*)
dodisk vnd $U 8 19 $U 0
dodisk svnd $U 8 19 $U 2048
;;
rd*)

View File

@ -1,5 +1,5 @@
#!/bin/sh -
# $OpenBSD: MAKEDEV,v 1.13 2009/06/03 14:45:40 jj Exp $
# $OpenBSD: MAKEDEV,v 1.14 2011/04/18 16:52:11 thib Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@ -268,48 +268,42 @@ sd*|wd*|ccd*|ofdisk*|raid*)
vnd*)
umask 2 ; unit=${i##*[a-z]}
for name in vnd svnd; do
blk=14; chr=19;
case $name in
vnd) off=0;;
svnd) off=2048;;
esac
rm -f $name$unit? r$name$unit?
mknod ${name}${unit}a b $blk $(( $unit * 16 + $off + 0 ))
mknod ${name}${unit}b b $blk $(( $unit * 16 + $off + 1 ))
mknod ${name}${unit}c b $blk $(( $unit * 16 + $off + 2 ))
mknod ${name}${unit}d b $blk $(( $unit * 16 + $off + 3 ))
mknod ${name}${unit}e b $blk $(( $unit * 16 + $off + 4 ))
mknod ${name}${unit}f b $blk $(( $unit * 16 + $off + 5 ))
mknod ${name}${unit}g b $blk $(( $unit * 16 + $off + 6 ))
mknod ${name}${unit}h b $blk $(( $unit * 16 + $off + 7 ))
mknod ${name}${unit}i b $blk $(( $unit * 16 + $off + 8 ))
mknod ${name}${unit}j b $blk $(( $unit * 16 + $off + 9 ))
mknod ${name}${unit}k b $blk $(( $unit * 16 + $off + 10 ))
mknod ${name}${unit}l b $blk $(( $unit * 16 + $off + 11 ))
mknod ${name}${unit}m b $blk $(( $unit * 16 + $off + 12 ))
mknod ${name}${unit}n b $blk $(( $unit * 16 + $off + 13 ))
mknod ${name}${unit}o b $blk $(( $unit * 16 + $off + 14 ))
mknod ${name}${unit}p b $blk $(( $unit * 16 + $off + 15 ))
mknod r${name}${unit}a c $chr $(( $unit * 16 + $off + 0 ))
mknod r${name}${unit}b c $chr $(( $unit * 16 + $off + 1 ))
mknod r${name}${unit}c c $chr $(( $unit * 16 + $off + 2 ))
mknod r${name}${unit}d c $chr $(( $unit * 16 + $off + 3 ))
mknod r${name}${unit}e c $chr $(( $unit * 16 + $off + 4 ))
mknod r${name}${unit}f c $chr $(( $unit * 16 + $off + 5 ))
mknod r${name}${unit}g c $chr $(( $unit * 16 + $off + 6 ))
mknod r${name}${unit}h c $chr $(( $unit * 16 + $off + 7 ))
mknod r${name}${unit}i c $chr $(( $unit * 16 + $off + 8 ))
mknod r${name}${unit}j c $chr $(( $unit * 16 + $off + 9 ))
mknod r${name}${unit}k c $chr $(( $unit * 16 + $off + 10 ))
mknod r${name}${unit}l c $chr $(( $unit * 16 + $off + 11 ))
mknod r${name}${unit}m c $chr $(( $unit * 16 + $off + 12 ))
mknod r${name}${unit}n c $chr $(( $unit * 16 + $off + 13 ))
mknod r${name}${unit}o c $chr $(( $unit * 16 + $off + 14 ))
mknod r${name}${unit}p c $chr $(( $unit * 16 + $off + 15 ))
chown root.operator ${name}${unit}[a-p] r${name}${unit}[a-p]
chmod 640 ${name}${unit}[a-p] r${name}${unit}[a-p]
done
blk=14; chr=19;
rm -f $name$unit? r$name$unit?
mknod ${name}${unit}a b $blk $(( $unit * 16 + 0 ))
mknod ${name}${unit}b b $blk $(( $unit * 16 + 1 ))
mknod ${name}${unit}c b $blk $(( $unit * 16 + 2 ))
mknod ${name}${unit}d b $blk $(( $unit * 16 + 3 ))
mknod ${name}${unit}e b $blk $(( $unit * 16 + 4 ))
mknod ${name}${unit}f b $blk $(( $unit * 16 + 5 ))
mknod ${name}${unit}g b $blk $(( $unit * 16 + 6 ))
mknod ${name}${unit}h b $blk $(( $unit * 16 + 7 ))
mknod ${name}${unit}i b $blk $(( $unit * 16 + 8 ))
mknod ${name}${unit}j b $blk $(( $unit * 16 + 9 ))
mknod ${name}${unit}k b $blk $(( $unit * 16 + 10 ))
mknod ${name}${unit}l b $blk $(( $unit * 16 + 11 ))
mknod ${name}${unit}m b $blk $(( $unit * 16 + 12 ))
mknod ${name}${unit}n b $blk $(( $unit * 16 + 13 ))
mknod ${name}${unit}o b $blk $(( $unit * 16 + 14 ))
mknod ${name}${unit}p b $blk $(( $unit * 16 + 15 ))
mknod r${name}${unit}a c $chr $(( $unit * 16 + 0 ))
mknod r${name}${unit}b c $chr $(( $unit * 16 + 1 ))
mknod r${name}${unit}c c $chr $(( $unit * 16 + 2 ))
mknod r${name}${unit}d c $chr $(( $unit * 16 + 3 ))
mknod r${name}${unit}e c $chr $(( $unit * 16 + 4 ))
mknod r${name}${unit}f c $chr $(( $unit * 16 + 5 ))
mknod r${name}${unit}g c $chr $(( $unit * 16 + 6 ))
mknod r${name}${unit}h c $chr $(( $unit * 16 + 7 ))
mknod r${name}${unit}i c $chr $(( $unit * 16 + 8 ))
mknod r${name}${unit}j c $chr $(( $unit * 16 + 9 ))
mknod r${name}${unit}k c $chr $(( $unit * 16 + 10 ))
mknod r${name}${unit}l c $chr $(( $unit * 16 + 11 ))
mknod r${name}${unit}m c $chr $(( $unit * 16 + 12 ))
mknod r${name}${unit}n c $chr $(( $unit * 16 + 13 ))
mknod r${name}${unit}o c $chr $(( $unit * 16 + 14 ))
mknod r${name}${unit}p c $chr $(( $unit * 16 + 15 ))
chown root.operator ${name}${unit}[a-p] r${name}${unit}[a-p]
chmod 640 ${name}${unit}[a-p] r${name}${unit}[a-p]
umask 77
;;

View File

@ -1,6 +1,6 @@
define(MACHINE,macppc)dnl
vers(__file__,
{-$OpenBSD: MAKEDEV.md,v 1.34 2010/09/30 15:27:54 claudio Exp $-},
{-$OpenBSD: MAKEDEV.md,v 1.35 2011/04/18 16:52:11 thib Exp $-},
etc.MACHINE)dnl
dnl
dnl Copyright (c) 2001-2006 Todd T. Fries <todd@OpenBSD.org>
@ -118,48 +118,42 @@ sd*|wd*|ccd*|ofdisk*|raid*)
vnd*)
umask 2 ; unit=${i##*[a-z]}
for name in vnd svnd; do
blk=14; chr=19;
case $name in
vnd) off=0;;
svnd) off=128;;
esac
rm -f $name$unit? r$name$unit?
mknod ${name}${unit}a b $blk $(( $unit * 16 + $off + 0 ))
mknod ${name}${unit}b b $blk $(( $unit * 16 + $off + 1 ))
mknod ${name}${unit}c b $blk $(( $unit * 16 + $off + 2 ))
mknod ${name}${unit}d b $blk $(( $unit * 16 + $off + 3 ))
mknod ${name}${unit}e b $blk $(( $unit * 16 + $off + 4 ))
mknod ${name}${unit}f b $blk $(( $unit * 16 + $off + 5 ))
mknod ${name}${unit}g b $blk $(( $unit * 16 + $off + 6 ))
mknod ${name}${unit}h b $blk $(( $unit * 16 + $off + 7 ))
mknod ${name}${unit}i b $blk $(( $unit * 16 + $off + 8 ))
mknod ${name}${unit}j b $blk $(( $unit * 16 + $off + 9 ))
mknod ${name}${unit}k b $blk $(( $unit * 16 + $off + 10 ))
mknod ${name}${unit}l b $blk $(( $unit * 16 + $off + 11 ))
mknod ${name}${unit}m b $blk $(( $unit * 16 + $off + 12 ))
mknod ${name}${unit}n b $blk $(( $unit * 16 + $off + 13 ))
mknod ${name}${unit}o b $blk $(( $unit * 16 + $off + 14 ))
mknod ${name}${unit}p b $blk $(( $unit * 16 + $off + 15 ))
mknod r${name}${unit}a c $chr $(( $unit * 16 + $off + 0 ))
mknod r${name}${unit}b c $chr $(( $unit * 16 + $off + 1 ))
mknod r${name}${unit}c c $chr $(( $unit * 16 + $off + 2 ))
mknod r${name}${unit}d c $chr $(( $unit * 16 + $off + 3 ))
mknod r${name}${unit}e c $chr $(( $unit * 16 + $off + 4 ))
mknod r${name}${unit}f c $chr $(( $unit * 16 + $off + 5 ))
mknod r${name}${unit}g c $chr $(( $unit * 16 + $off + 6 ))
mknod r${name}${unit}h c $chr $(( $unit * 16 + $off + 7 ))
mknod r${name}${unit}i c $chr $(( $unit * 16 + $off + 8 ))
mknod r${name}${unit}j c $chr $(( $unit * 16 + $off + 9 ))
mknod r${name}${unit}k c $chr $(( $unit * 16 + $off + 10 ))
mknod r${name}${unit}l c $chr $(( $unit * 16 + $off + 11 ))
mknod r${name}${unit}m c $chr $(( $unit * 16 + $off + 12 ))
mknod r${name}${unit}n c $chr $(( $unit * 16 + $off + 13 ))
mknod r${name}${unit}o c $chr $(( $unit * 16 + $off + 14 ))
mknod r${name}${unit}p c $chr $(( $unit * 16 + $off + 15 ))
chown root:operator ${name}${unit}[a-p] r${name}${unit}[a-p]
chmod 640 ${name}${unit}[a-p] r${name}${unit}[a-p]
done
blk=14; chr=19;
rm -f $name$unit? r$name$unit?
mknod ${name}${unit}a b $blk $(( $unit * 16 + 0 ))
mknod ${name}${unit}b b $blk $(( $unit * 16 + 1 ))
mknod ${name}${unit}c b $blk $(( $unit * 16 + 2 ))
mknod ${name}${unit}d b $blk $(( $unit * 16 + 3 ))
mknod ${name}${unit}e b $blk $(( $unit * 16 + 4 ))
mknod ${name}${unit}f b $blk $(( $unit * 16 + 5 ))
mknod ${name}${unit}g b $blk $(( $unit * 16 + 6 ))
mknod ${name}${unit}h b $blk $(( $unit * 16 + 7 ))
mknod ${name}${unit}i b $blk $(( $unit * 16 + 8 ))
mknod ${name}${unit}j b $blk $(( $unit * 16 + 9 ))
mknod ${name}${unit}k b $blk $(( $unit * 16 + 10 ))
mknod ${name}${unit}l b $blk $(( $unit * 16 + 11 ))
mknod ${name}${unit}m b $blk $(( $unit * 16 + 12 ))
mknod ${name}${unit}n b $blk $(( $unit * 16 + 13 ))
mknod ${name}${unit}o b $blk $(( $unit * 16 + 14 ))
mknod ${name}${unit}p b $blk $(( $unit * 16 + 15 ))
mknod r${name}${unit}a c $chr $(( $unit * 16 + 0 ))
mknod r${name}${unit}b c $chr $(( $unit * 16 + 1 ))
mknod r${name}${unit}c c $chr $(( $unit * 16 + 2 ))
mknod r${name}${unit}d c $chr $(( $unit * 16 + 3 ))
mknod r${name}${unit}e c $chr $(( $unit * 16 + 4 ))
mknod r${name}${unit}f c $chr $(( $unit * 16 + 5 ))
mknod r${name}${unit}g c $chr $(( $unit * 16 + 6 ))
mknod r${name}${unit}h c $chr $(( $unit * 16 + 7 ))
mknod r${name}${unit}i c $chr $(( $unit * 16 + 8 ))
mknod r${name}${unit}j c $chr $(( $unit * 16 + 9 ))
mknod r${name}${unit}k c $chr $(( $unit * 16 + 10 ))
mknod r${name}${unit}l c $chr $(( $unit * 16 + 11 ))
mknod r${name}${unit}m c $chr $(( $unit * 16 + 12 ))
mknod r${name}${unit}n c $chr $(( $unit * 16 + 13 ))
mknod r${name}${unit}o c $chr $(( $unit * 16 + 14 ))
mknod r${name}${unit}p c $chr $(( $unit * 16 + 15 ))
chown root:operator ${name}${unit}[a-p] r${name}${unit}[a-p]
chmod 640 ${name}${unit}[a-p] r${name}${unit}[a-p]
umask 77
;;

View File

@ -471,7 +471,6 @@ st*)
vnd*)
dodisk vnd $U 19 19 $U 0
dodisk svnd $U 19 19 $U 2048
;;
rd*)

View File

@ -435,7 +435,6 @@ ch*)
vnd*)
dodisk vnd $U 2 11 $U 0
dodisk svnd $U 2 11 $U 2048
;;
rd*)

View File

@ -411,7 +411,6 @@ ch*)
vnd*)
dodisk vnd $U 14 19 $U 0
dodisk svnd $U 14 19 $U 2048
;;
rd*)

View File

@ -475,7 +475,6 @@ ch*)
vnd*)
dodisk vnd $U 8 110 $U 0
dodisk svnd $U 8 110 $U 2048
;;
rd*)

View File

@ -571,7 +571,6 @@ ch*)
vnd*)
dodisk vnd $U 8 110 $U 0
dodisk svnd $U 8 110 $U 2048
;;
rd*)

View File

@ -473,7 +473,6 @@ ch*)
vnd*)
dodisk vnd $U 18 55 $U 0
dodisk svnd $U 18 55 $U 2048
;;
rd*)

View File

@ -471,7 +471,6 @@ st*)
vnd*)
dodisk vnd $U 19 19 $U 0
dodisk svnd $U 19 19 $U 2048
;;
rd*)

View File

@ -42,18 +42,18 @@ D="\
"
for i in $D; do
vnconfig -u svnd0 > /dev/null 2>&1
vnconfig -u vnd0 > /dev/null 2>&1
echo "${i}MB disk"
rm -f /tmp/image f
dd if=/dev/zero of=/tmp/image bs=1m count=1 seek=${i} > /dev/null 2>&1
ls -lh /tmp/image
vnconfig svnd0 /tmp/image
fdisk -iy svnd0 > /dev/null
(disklabel -A -p g svnd0; \
disklabel -Aw -f f svnd0; \
disklabel svnd0) | grep '^ [a-p]: ' \
vnconfig vnd0 /tmp/image
fdisk -iy vnd0 > /dev/null
(disklabel -A -p g vnd0; \
disklabel -Aw -f f vnd0; \
disklabel vnd0) | grep '^ [a-p]: ' \
| egrep -v "unused" | sort; cat f
vnconfig -u svnd0 > /dev/null 2>&1
vnconfig -u vnd0 > /dev/null 2>&1
read
done
vnconfig -u svnd0 > /dev/null 2>&1
vnconfig -u vnd0 > /dev/null 2>&1

View File

@ -1,10 +1,10 @@
#!/bin/ksh
# $OpenBSD: checknewfs,v 1.3 2009/04/26 21:32:31 okan Exp $
# $OpenBSD: checknewfs,v 1.4 2011/04/18 16:52:11 thib Exp $
# Written by Otto Moerbeek, 2007, Public domain
cleanup() {
vnconfig -u svnd0
vnconfig -u vnd0
rm -f $image
}
@ -13,14 +13,14 @@ trap 'cleanup' INT
dotest() {
image=$(mktemp -t imageXXXXXXXXXX);
dd if=/dev/prandom of=$image bs=512 count=$1 2>/dev/null &&
vnconfig svnd0 $image &&
disklabel -w svnd0 $2 &&
newfs $3 /dev/rsvnd0a
vnconfig vnd0 $image &&
disklabel -w vnd0 $2 &&
newfs $3 /dev/rvnd0a
if [ $? != 0 ]; then
ret=$(($ret + 1))
echo TEST $1 $2 \"$3\" failed
else
(fsck -nf /dev/svnd0a | fgrep SALVAGE)
(fsck -nf /dev/vnd0a | fgrep SALVAGE)
if [ $? == 0 ]; then
ret=$(($ret + 1))
echo TEST $1 $2 \"$3\" failed
@ -36,7 +36,7 @@ dotest() {
ret=0
vnconfig -u svnd0 > /dev/null 2>&1
vnconfig -u vnd0 > /dev/null 2>&1
if [ $# == 0 ]; then
clean=1
dotest 3800 rdroot "-m 0 -o space -i 4096"

View File

@ -1,17 +1,17 @@
# $OpenBSD: Makefile,v 1.3 2007/04/10 11:23:38 pedro Exp $
# $OpenBSD: Makefile,v 1.4 2011/04/18 16:52:11 thib Exp $
PROG= fstest
mount:
dd if=/dev/zero of=${.CURDIR}/fakeobj bs=512 count=4k
vnconfig svnd0 ${.CURDIR}/fakeobj
newfs /dev/rsvnd0c
mount /dev/svnd0c /mnt
vnconfig vnd0 ${.CURDIR}/fakeobj
newfs /dev/rvnd0c
mount /dev/vnd0c /mnt
clean:
-umount /mnt
-vnconfig -u svnd0
-vnconfig -u svnd1
-vnconfig -u vnd0
-vnconfig -u vnd1
-rm -f ${.CURDIR}/fakeobj
-rm -f ${.OBJDIR}/fstest
-rm -f ${.OBJDIR}/fstest.o

View File

@ -1,4 +1,4 @@
$OpenBSD: README,v 1.1 2007/03/30 19:02:51 pedro Exp $
$OpenBSD: README,v 1.2 2011/04/18 16:52:11 thib Exp $
These tests must be run as root, on a system with free svnd0 and svnd1 slots.
These tests must be run as root, on a system with free vnd0 and vnd1 slots.
It is also advised that /mnt be unmounted, and clean.

View File

@ -8,24 +8,24 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
expect 0 chflags ${n0}/${n1} UF_IMMUTABLE
expect UF_IMMUTABLE stat ${n0}/${n1} flags
expect 0 chflags ${n0}/${n1} none
expect none stat ${n0}/${n1} flags
mount -ur /dev/svnd1c
mount -ur /dev/vnd1c
expect EROFS chflags ${n0}/${n1} UF_IMMUTABLE
expect none stat ${n0}/${n1} flags
mount -uw /dev/svnd1c
mount -uw /dev/vnd1c
expect 0 chflags ${n0}/${n1} UF_IMMUTABLE
expect UF_IMMUTABLE stat ${n0}/${n1} flags
expect 0 chflags ${n0}/${n1} none
expect none stat ${n0}/${n1} flags
expect 0 unlink ${n0}/${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -8,20 +8,20 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
expect 0 chmod ${n0}/${n1} 0640
expect 0640 stat ${n0}/${n1} mode
mount -ur /dev/svnd1c
mount -ur /dev/vnd1c
expect EROFS chmod ${n0}/${n1} 0600
expect 0640 stat ${n0}/${n1} mode
mount -uw /dev/svnd1c
mount -uw /dev/vnd1c
expect 0 chmod ${n0}/${n1} 0600
expect 0600 stat ${n0}/${n1} mode
expect 0 unlink ${n0}/${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -8,20 +8,20 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
expect 0 chown ${n0}/${n1} 65534 65534
expect 65534,65534 stat ${n0}/${n1} uid,gid
mount -ur /dev/svnd1c
mount -ur /dev/vnd1c
expect EROFS chown ${n0}/${n1} 65533 65533
expect 65534,65534 stat ${n0}/${n1} uid,gid
mount -uw /dev/svnd1c
mount -uw /dev/vnd1c
expect 0 chown ${n0}/${n1} 65533 65533
expect 65533,65533 stat ${n0}/${n1} uid,gid
expect 0 unlink ${n0}/${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -9,9 +9,9 @@ n2=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs -i 1 /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs -i 1 /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
i=1
while :; do
@ -25,7 +25,7 @@ test_check $i -eq 32767
expect EMLINK link ${n0}/${n1} ${n0}/${n2}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -9,16 +9,16 @@ n2=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
expect EXDEV link ${n0}/${n1} ${n2}
expect 0 unlink ${n0}/${n1}
expect 0 create ${n1} 0644
expect EXDEV link ${n1} ${n0}/${n2}
expect 0 unlink ${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -9,9 +9,9 @@ n2=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=256 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
i=0
while :; do
@ -22,7 +22,7 @@ while :; do
i=`expr $i + 1`
done
expect ENOSPC link ${n0}/${n1} ${n0}/${n2}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -9,21 +9,21 @@ n2=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
expect 0 link ${n0}/${n1} ${n0}/${n2}
expect 0 unlink ${n0}/${n2}
mount -ur /dev/svnd1c
mount -ur /dev/vnd1c
expect EROFS link ${n0}/${n1} ${n0}/${n2}
mount -uw /dev/svnd1c
mount -uw /dev/vnd1c
expect 0 link ${n0}/${n1} ${n0}/${n2}
expect 0 unlink ${n0}/${n2}
expect 0 unlink ${n0}/${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -8,17 +8,17 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 mkdir ${n0}/${n1} 0755
expect 0 rmdir ${n0}/${n1}
mount -ur /dev/svnd1c
mount -ur /dev/vnd1c
expect EROFS mkdir ${n0}/${n1} 0755
mount -uw /dev/svnd1c
mount -uw /dev/vnd1c
expect 0 mkdir ${n0}/${n1} 0755
expect 0 rmdir ${n0}/${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -8,9 +8,9 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=256 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
i=0
while :; do
mkdir ${n0}/${i} >/dev/null 2>&1
@ -20,7 +20,7 @@ while :; do
i=`expr $i + 1`
done
expect ENOSPC mkdir ${n0}/${n1} 0755
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -8,17 +8,17 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 mkfifo ${n0}/${n1} 0644
expect 0 unlink ${n0}/${n1}
mount -ur /dev/svnd1c
mount -ur /dev/vnd1c
expect EROFS mkfifo ${n0}/${n1} 0644
#mount -uw /dev/svnd1c
#mount -uw /dev/vnd1c
expect 0 mkfifo ${n0}/${n1} 0644
expect 0 unlink ${n0}/${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -8,9 +8,9 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=256 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
i=0
while :; do
mkfifo ${n0}/${i} >/dev/null 2>&1
@ -20,7 +20,7 @@ while :; do
i=`expr $i + 1`
done
expect ENOSPC mkfifo ${n0}/${n1} 0644
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -8,20 +8,20 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
expect 0 open ${n0}/${n1} O_WRONLY
expect 0 open ${n0}/${n1} O_RDWR
expect 0 open ${n0}/${n1} O_RDONLY,O_TRUNC
mount -ur /dev/svnd1c
mount -ur /dev/vnd1c
expect EROFS open ${n0}/${n1} O_WRONLY
expect EROFS open ${n0}/${n1} O_RDWR
expect EROFS open ${n0}/${n1} O_RDONLY,O_TRUNC
mount -uw /dev/svnd1c
mount -uw /dev/vnd1c
expect 0 unlink ${n0}/${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -8,15 +8,15 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 open ${n0}/${n1} O_RDONLY,O_CREAT 0644
expect 0 unlink ${n0}/${n1}
mount -ur /dev/svnd1c
mount -ur /dev/vnd1c
expect EROFS open ${n0}/${n1} O_RDONLY,O_CREAT 0644
mount -uw /dev/svnd1c
umount /dev/svnd1c
vnconfig -u svnd1
mount -uw /dev/vnd1c
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -8,9 +8,9 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=256 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
i=0
while :; do
touch ${n0}/${i} >/dev/null 2>&1
@ -20,7 +20,7 @@ while :; do
i=`expr $i + 1`
done
expect ENOSPC open ${n0}/${i} O_RDONLY,O_CREAT 0644
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -9,9 +9,9 @@ n2=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
expect EXDEV rename ${n0}/${n1} ${n2}
@ -29,7 +29,7 @@ expect 0 symlink test ${n0}/${n1}
expect EXDEV rename ${n0}/${n1} ${n2}
expect 0 unlink ${n0}/${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -9,11 +9,11 @@ n2=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
mount -ur /dev/svnd1c
mount -ur /dev/vnd1c
expect EROFS rename ${n0}/${n1} ${n0}/${n2}
expect EROFS rename ${n0}/${n1} ${n2}
@ -21,7 +21,7 @@ expect 0 create ${n2} 0644
expect EROFS rename ${n2} ${n0}/${n2}
expect 0 unlink ${n2}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -7,11 +7,11 @@ n0=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect EBUSY rmdir ${n0}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -8,15 +8,15 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 mkdir ${n0}/${n1} 0755
mount -ur /dev/svnd1c
mount -ur /dev/vnd1c
expect EROFS rmdir ${n0}/${n1}
mount -uw /dev/svnd1c
mount -uw /dev/vnd1c
expect 0 rmdir ${n0}/${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -9,19 +9,19 @@ n2=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 symlink test ${n0}/${n1}
expect 0 unlink ${n0}/${n1}
mount -ur /dev/svnd1c
mount -ur /dev/vnd1c
expect EROFS symlink test ${n0}/${n1}
mount -uw /dev/svnd1c
mount -uw /dev/vnd1c
expect 0 symlink test ${n0}/${n1}
expect 0 unlink ${n0}/${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -8,9 +8,9 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=256 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
i=0
while :; do
@ -21,7 +21,7 @@ while :; do
i=`expr $i + 1`
done
expect ENOSPC symlink test ${n0}/${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -8,20 +8,20 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
expect 0 truncate ${n0}/${n1} 123
expect 123 stat ${n0}/${n1} size
mount -ur /dev/svnd1c
mount -ur /dev/vnd1c
expect EROFS truncate ${n0}/${n1} 1234
expect 123 stat ${n0}/${n1} size
mount -uw /dev/svnd1c
mount -uw /dev/vnd1c
expect 0 truncate ${n0}/${n1} 1234
expect 1234 stat ${n0}/${n1} size
expect 0 unlink ${n0}/${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -8,15 +8,15 @@ n1=`namegen`
expect 0 mkdir ${n0} 0755
dd if=/dev/zero of=tmpdisk bs=1k count=1024 2>/dev/null
vnconfig svnd1 tmpdisk
newfs /dev/rsvnd1c >/dev/null
mount /dev/svnd1c ${n0}
vnconfig vnd1 tmpdisk
newfs /dev/rvnd1c >/dev/null
mount /dev/vnd1c ${n0}
expect 0 create ${n0}/${n1} 0644
mount -ur /dev/svnd1c
mount -ur /dev/vnd1c
expect EROFS unlink ${n0}/${n1}
mount -uw /dev/svnd1c
mount -uw /dev/vnd1c
expect 0 unlink ${n0}/${n1}
umount /dev/svnd1c
vnconfig -u svnd1
umount /dev/vnd1c
vnconfig -u vnd1
rm tmpdisk
expect 0 rmdir ${n0}

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: mount_vnd.8,v 1.18 2010/12/18 21:01:30 tedu Exp $
.\" $OpenBSD: mount_vnd.8,v 1.19 2011/04/18 16:52:11 thib Exp $
.\"
.\" Copyright (c) 1993 University of Utah.
.\" Copyright (c) 1980, 1989, 1991, 1993
@ -49,7 +49,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: December 18 2010 $
.Dd $Mdocdate: April 18 2011 $
.Dt MOUNT_VND 8
.Os
.Sh NAME
@ -85,25 +85,6 @@ It will associate (or disassociate) the special file
with the regular file
.Ar image ,
allowing the latter to be accessed as though it were a disk.
Hence a regular file within the file system can be used for swapping
or can contain a file system that is mounted in the name space.
.Pp
Both traditional devices,
.Xr vnd 4 ,
and the cache-coherent devices,
.Pa svnd ,
are configured through
.Nm vnconfig .
.Pa svnd
should be mounted with the
.Xr mount 8
option
.Dq sync
if
.Ar image
is being read from,
to ensure consistency in the buffer cache.
For normal operation this is not necessary.
.Pp
.Nm mount_vnd
works similarly to
@ -117,7 +98,7 @@ file can be configured to a device
while booting.
.Nm mount_vnd
defaults to the
.Pa svnd0
.Pa vnd0
device.
.Pp
For
@ -173,17 +154,17 @@ is a number between 1000 and
.Dv INT_MAX .
DO NOT LOSE THE SALT FILE.
Encryption only works with
.Pa svnd .
.Pa vnd .
.It Fl k
Associate an encryption key with the device.
All data will be encrypted using the Blowfish cipher before it is
written to the disk.
Encryption only works with
.Pa svnd .
.Pa vnd .
.It Fl l
.Nm vnconfig
only.
List the (s)vnd devices and indicate which ones are in use.
List the vnd devices and indicate which ones are in use.
If a specific
.Ar vnd_dev
is given, then only that one will be described.
@ -231,57 +212,57 @@ Print messages to stdout describing actions taken.
.El
.Sh FILES
.Bl -tag -width /etc/rvnd?? -compact
.It Pa /dev/{,r}{,s}vnd*
.It Pa /dev/{,r}vnd*
.El
.Sh EXAMPLES
Configure a CD-ROM or DVD image file as vnode disk svnd0
Configure a CD-ROM or DVD image file as vnode disk vnd0
and mount the ISO 9660 file system contained in it:
.Bd -literal -offset indent
# vnconfig svnd0 /tmp/diskimage
# mount -t cd9660 /dev/svnd0c /mnt
# vnconfig vnd0 /tmp/diskimage
# mount -t cd9660 /dev/vnd0c /mnt
.Ed
.Pp
Configure an encrypted image file as vnode disk svnd0 and mount the FFS
Configure an encrypted image file as vnode disk vnd0 and mount the FFS
file system contained in the
.Sq a
partition of the disklabel.
The encryption key does not echo and must be entered every time
the vnode disk is configured.
.Bd -literal -offset indent
# vnconfig -k svnd0 /tmp/cryptimg
# vnconfig -k vnd0 /tmp/cryptimg
Encryption key:
# mount /dev/svnd0a /mnt
# mount /dev/vnd0a /mnt
.Ed
.Pp
An equivalent
.Xr fstab 5
entry is:
.Bd -literal -offset indent
/tmp/cryptimg /dev/svnd0c vnd rw,noauto,-k 0 0
/dev/svnd0a /mnt ffs rw,noauto 0 0
/tmp/cryptimg /dev/vnd0c vnd rw,noauto,-k 0 0
/dev/vnd0a /mnt ffs rw,noauto 0 0
.Ed
.Pp
Same as above, but now configure the vnode using PKCS #5 PBKDF2 and
a salt file with 20000 rounds:
.Bd -literal -offset indent
# vnconfig -K 20000 svnd0 /tmp/cryptimg
# vnconfig -K 20000 vnd0 /tmp/cryptimg
Encryption key:
Salt file: /tmp/cryptsalt
# mount /dev/svnd0a /mnt
# mount /dev/vnd0a /mnt
.Ed
.Pp
An equivalent
.Xr fstab 5
entry is:
.Bd -literal -offset indent
/tmp/cryptimg /dev/svnd0c vnd rw,noauto,-K=20000 0 0
/dev/svnd0a /mnt ffs rw,noauto 0 0
/tmp/cryptimg /dev/vnd0c vnd rw,noauto,-K=20000 0 0
/dev/vnd0a /mnt ffs rw,noauto 0 0
.Ed
.Pp
Unmount the file system and unconfigure the vnode device:
.Bd -literal -offset indent
# umount /mnt
# vnconfig -u svnd0
# vnconfig -u vnd0
.Ed
.Pp
A sample of commands to put in
@ -290,8 +271,8 @@ in order to have vnd images configured at boot time is listed here:
.Bd -literal -offset indent
# Example for automatically configuring a vnd device on startup
echo "configuring vnd devices:"
mount /dev/svnd0c
fsck -p /dev/rsvnd0a
mount /dev/vnd0c
fsck -p /dev/rvnd0a
mount /mnt
.Ed
.Pp
@ -325,3 +306,5 @@ This information is not available when directly using the
.Sq c
partition,
so checking the file system image will fail.
.Pp
Swapping to vnd devices is no longer supported.

View File

@ -1,4 +1,4 @@
/* $OpenBSD: mount_vnd.c,v 1.10 2011/01/29 03:43:13 tedu Exp $ */
/* $OpenBSD: mount_vnd.c,v 1.11 2011/04/18 16:52:11 thib Exp $ */
/*
* Copyright (c) 1993 University of Utah.
* Copyright (c) 1990, 1993
@ -58,7 +58,7 @@
#include "pbkdf2.h"
#define DEFAULT_VND "svnd0"
#define DEFAULT_VND "vnd0"
#define VND_CONFIG 1
#define VND_UNCONFIG 2

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.522 2011/04/10 20:27:02 shadchin Exp $
# $OpenBSD: Makefile,v 1.523 2011/04/18 16:52:11 thib Exp $
MAN= aac.4 ac97.4 acphy.4 \
acpi.4 acpiac.4 acpiasus.4 acpibat.4 acpibtn.4 acpicpu.4 acpidock.4 \
@ -90,7 +90,6 @@ MLINKS+=tht.4 thtc.4
MLINKS+=tty.4 cua.4
MLINKS+=usb.4 uhub.4
MLINKS+=vlan.4 svlan.4
MLINKS+=vnd.4 svnd.4
# man4.hppa64
SUBDIR= man4.alpha man4.amd64 man4.armish man4.aviion man4.hp300 \

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: vnd.4,v 1.21 2008/03/17 16:30:36 sobrado Exp $
.\" $OpenBSD: vnd.4,v 1.22 2011/04/18 16:52:12 thib Exp $
.\" $NetBSD: vnd.4,v 1.1 1995/12/30 18:10:48 thorpej Exp $
.\"
.\" Copyright (c) 1995 Jason R. Thorpe.
@ -32,7 +32,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 17 2008 $
.Dd $Mdocdate: April 18 2011 $
.Dt VND 4
.Os
.Sh NAME
@ -44,21 +44,8 @@
The
.Nm
driver provides a disk-like interface to a file.
This is useful for a variety of applications, including swap files and
building miniroot or floppy disk images.
There are two variants, the traditional
.Nm
that bypasses the buffer cache and thus is suitable for swap on files, but
not for building disk-images, and the
.Nm svnd
.Po
.Dq safe
.Nm
.Pc
variant that goes
through the buffer cache, thereby maintaining cache-coherency after the
block-device is closed which makes it suitable for creating disk images.
The latter is not good for swapping on, though.
This is useful for a variety of applications, such as building miniroot or
floppy disk images.
.Pp
This document assumes familiarity with how to generate kernels and
how to properly configure disks and pseudo-devices in a kernel
@ -103,7 +90,7 @@ specified in
of length
.Va vnd_keylen .
Encryption only works with
.Nm svnd
.Nm vnd
devices.
The size of the configured device is returned in
.Va vnd_size .
@ -163,8 +150,8 @@ and
They are documented in
.Xr sd 4 .
.Sh FILES
.Bl -tag -width /dev/{,r}{,s}vnd* -compact
.It Pa /dev/{,r}{,s}vnd*
.Bl -tag -width /dev/{,r}vnd* -compact
.It Pa /dev/{,r}vnd*
.Nm
device special files
.El
@ -183,16 +170,16 @@ device special files
.Sh HISTORY
The
.Nm
disk driver was originally written at the University of
Utah.
disk driver was originally written at the University of Utah.
The
.Nm svnd
variant was first seen in
.Ox 2.1 .
.Sh BUGS
The
The orginal
.Nm
driver does not work if the file does not reside in a local filesystem.
However the
was removed and the
.Nm svnd
variant does.
variant was renamed to
.Nm
in
.Ox 4.9 .

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: release.8,v 1.63 2011/04/15 05:17:44 ajacoutot Exp $
.\" $OpenBSD: release.8,v 1.64 2011/04/18 16:52:12 thib Exp $
.\"
.\" Copyright (c) 2000 Marco S. Hyman
.\"
@ -9,7 +9,7 @@
.\" LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
.\" FOR A PARTICULAR PURPOSE.
.\"
.Dd $Mdocdate: April 15 2011 $
.Dd $Mdocdate: April 18 2011 $
.Dt RELEASE 8
.Os
.Sh NAME
@ -241,8 +241,8 @@ in its path, as
.Pa /mnt
is used in the release generation process.
Additionally the first
.Xr svnd 4
device, svnd0,
.Xr vnd 4
device, vnd0,
is also used and must not be configured.
.El
.Pp