summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-07-16 03:44:24 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-07-16 03:44:24 +0000
commitfc7a605bf894c41617ce13484115920887e15b86 (patch)
treee001610b5f0182514ef34ea9a20d19cf891f80c3 /sys
parent67cbfeff543fa0a4aaf0cc1dd670ea78e54c302c (diff)
Make truncating a device a no-op instead of returning an error. We can
fix the rest of the kernel some other time.
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ext2fs/ext2fs_inode.c4
-rw-r--r--sys/ufs/ffs/ffs_inode.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_inode.c b/sys/ufs/ext2fs/ext2fs_inode.c
index bbd8c03ed8a..c49578233a3 100644
--- a/sys/ufs/ext2fs/ext2fs_inode.c
+++ b/sys/ufs/ext2fs/ext2fs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_inode.c,v 1.13 2001/07/16 02:56:48 csapuntz Exp $ */
+/* $OpenBSD: ext2fs_inode.c,v 1.14 2001/07/16 03:44:22 csapuntz Exp $ */
/* $NetBSD: ext2fs_inode.c,v 1.1 1997/06/11 09:33:56 bouyer Exp $ */
/*
@@ -187,7 +187,7 @@ ext2fs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred)
if (ovp->v_type != VREG &&
ovp->v_type != VDIR &&
ovp->v_type != VLNK)
- return (EINVAL);
+ return (0);
if (ovp->v_type == VLNK &&
(oip->i_e2fs_size < ovp->v_mount->mnt_maxsymlinklen ||
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c
index abb7374e44a..4ffd5f38cc3 100644
--- a/sys/ufs/ffs/ffs_inode.c
+++ b/sys/ufs/ffs/ffs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_inode.c,v 1.22 2001/07/16 02:56:48 csapuntz Exp $ */
+/* $OpenBSD: ffs_inode.c,v 1.23 2001/07/16 03:44:23 csapuntz Exp $ */
/* $NetBSD: ffs_inode.c,v 1.10 1996/05/11 18:27:19 mycroft Exp $ */
/*
@@ -169,7 +169,7 @@ ffs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred)
if (ovp->v_type != VREG &&
ovp->v_type != VDIR &&
ovp->v_type != VLNK)
- return (EINVAL);
+ return (0);
if (oip->i_ffs_size == length)
return (0);