/*
- * $Id: directory.c,v 1.104 2009-09-14 00:02:21 didg Exp $
+ * $Id: directory.c,v 1.105 2009-10-02 09:32:40 franklahm Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include <sys/param.h>
#include <errno.h>
#include <utime.h>
-#include <atalk/adouble.h>
+#include <atalk/adouble.h>
+#include <atalk/vfs.h>
#include <atalk/afp.h>
#include <atalk/util.h>
#include <atalk/cnid.h>
#include "globals.h"
#include "unix.h"
#include "mangle.h"
+#include "hash.h"
#ifdef HAVE_NFSv4_ACLS
extern void addir_inherit_acl(const struct vol *vol);
return( dir );
}
-/* -------------------
- system rmdir with afp error code.
- ENOENT is not an error.
- */
-int netatalk_rmdir(const char *name)
-{
- if (rmdir(name) < 0) {
- switch ( errno ) {
- case ENOENT :
- break;
- case ENOTEMPTY :
- return AFPERR_DIRNEMPT;
- case EPERM:
- case EACCES :
- return AFPERR_ACCESS;
- case EROFS:
- return AFPERR_VLOCK;
- default :
- return AFPERR_PARAM;
- }
- }
- return AFP_OK;
-}
-
/* -------------------------
appledouble mkdir afp error code.
*/
return AFP_OK;
}
-/* -------------------
- system unlink with afp error code.
- ENOENT is not an error.
- */
-int netatalk_unlink(const char *name)
-{
- if (unlink(name) < 0) {
- switch (errno) {
- case ENOENT :
- break;
- case EROFS:
- return AFPERR_VLOCK;
- case EPERM:
- case EACCES :
- return AFPERR_ACCESS;
- default :
- return AFPERR_PARAM;
- }
- }
- return AFP_OK;
-}
-
/* ------------------- */
static int deletedir(char *dir)
{