SUSv3 says: should the implementation not support directory unlinking,

unlink shall fail with EPERM and the errno of the failure shall be EPERM
This commit is contained in:
pooka 2007-01-01 21:32:12 +00:00
parent 3780cb6cd8
commit d584a8d23a
2 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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 <sys/cdefs.h>
#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 <assert.h>
@ -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;
}