From d584a8d23a41f997041888bc0ebdc4223a3412fd Mon Sep 17 00:00:00 2001 From: pooka Date: Mon, 1 Jan 2007 21:32:12 +0000 Subject: [PATCH] SUSv3 says: should the implementation not support directory unlinking, unlink shall fail with EPERM and the errno of the failure shall be EPERM --- share/examples/puffs/dtfs/dtfs_vnops.c | 4 ++-- usr.sbin/puffs/mount_psshfs/node.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/share/examples/puffs/dtfs/dtfs_vnops.c b/share/examples/puffs/dtfs/dtfs_vnops.c index 0c7f8d9f36d8..d1ff82218a76 100644 --- a/share/examples/puffs/dtfs/dtfs_vnops.c +++ b/share/examples/puffs/dtfs/dtfs_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: dtfs_vnops.c,v 1.10 2006/12/29 15:37:06 pooka Exp $ */ +/* $NetBSD: dtfs_vnops.c,v 1.11 2007/01/01 21:32:12 pooka Exp $ */ /* * Copyright (c) 2006 Antti Kantee. All Rights Reserved. @@ -145,7 +145,7 @@ dtfs_node_remove(struct puffs_cc *pcc, void *opc, void *targ, struct puffs_node *pn = targ; if (pn->pn_va.va_type == VDIR) - return EISDIR; + return EPERM; dtfs_nukenode(targ, pn_parent, pcn->pcn_name); diff --git a/usr.sbin/puffs/mount_psshfs/node.c b/usr.sbin/puffs/mount_psshfs/node.c index bd0430690865..c3edc7f31ac9 100644 --- a/usr.sbin/puffs/mount_psshfs/node.c +++ b/usr.sbin/puffs/mount_psshfs/node.c @@ -1,4 +1,4 @@ -/* $NetBSD: node.c,v 1.1 2006/12/29 15:35:39 pooka Exp $ */ +/* $NetBSD: node.c,v 1.2 2007/01/01 21:32:12 pooka Exp $ */ /* * Copyright (c) 2006 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ #include #ifndef lint -__RCSID("$NetBSD: node.c,v 1.1 2006/12/29 15:35:39 pooka Exp $"); +__RCSID("$NetBSD: node.c,v 1.2 2007/01/01 21:32:12 pooka Exp $"); #endif /* !lint */ #include @@ -385,7 +385,7 @@ psshfs_node_remove(struct puffs_cc *pcc, void *opc, void *targ, struct puffs_node *pn_targ = targ; if (pn_targ->pn_va.va_type == VDIR) { - rv = EISDIR; + rv = EPERM; goto out; }