/*
- * $Id: afp_dsi.c,v 1.48 2009-11-14 05:18:50 didg Exp $
+ * $Id: afp_dsi.c,v 1.49 2010-01-18 12:55:28 franklahm Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
dsi->datalen = DSI_DATASIZ;
child.flags |= CHILD_RUNNING;
- LOG(log_debug, logtype_afpd, "=> Start AFP command: %s", AfpNum2name(function));
+ LOG(log_debug, logtype_afpd, "<== Start AFP command: %s", AfpNum2name(function));
err = (*afp_switch[function])(obj,
(char *)&dsi->commands, dsi->cmdlen,
(char *)&dsi->data, &dsi->datalen);
- LOG(log_debug, logtype_afpd, "=> Finished AFP command: %s", AfpNum2name(function));
+ LOG(log_debug, logtype_afpd, "==> Finished AFP command: %s -> %s",
+ AfpNum2name(function), AfpErr2name(err));
#ifdef FORCE_UIDGID
/* bring everything back to old euid, egid */
if (obj->force_uid)
/*
- * $Id: afp_util.c,v 1.8 2009-12-11 13:11:19 franklahm Exp $
+ * $Id: afp_util.c,v 1.9 2010-01-18 12:55:28 franklahm Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
}
return "not yet defined";
}
+
+#define AFPERR2NAME(err) case err : return #err
+
+const char *AfpErr2name(int err)
+{
+ switch (err) {
+ AFPERR2NAME(AFP_OK);
+ AFPERR2NAME(AFPERR_DID1);
+ AFPERR2NAME(AFPERR_ACCESS);
+ AFPERR2NAME(AFPERR_AUTHCONT);
+ AFPERR2NAME(AFPERR_BADUAM);
+ AFPERR2NAME(AFPERR_BADVERS);
+ AFPERR2NAME(AFPERR_BITMAP);
+ AFPERR2NAME(AFPERR_CANTMOVE);
+ AFPERR2NAME(AFPERR_DENYCONF);
+ AFPERR2NAME(AFPERR_DIRNEMPT);
+ AFPERR2NAME(AFPERR_DFULL);
+ AFPERR2NAME(AFPERR_EOF);
+ AFPERR2NAME(AFPERR_BUSY);
+ AFPERR2NAME(AFPERR_FLATVOL);
+ AFPERR2NAME(AFPERR_NOITEM);
+ AFPERR2NAME(AFPERR_LOCK);
+ AFPERR2NAME(AFPERR_NOSRVR);
+ AFPERR2NAME(AFPERR_EXIST);
+ AFPERR2NAME(AFPERR_NOOBJ);
+ AFPERR2NAME(AFPERR_PARAM);
+ AFPERR2NAME(AFPERR_NORANGE);
+ AFPERR2NAME(AFPERR_RANGEOVR);
+ AFPERR2NAME(AFPERR_SESSCLOS);
+ AFPERR2NAME(AFPERR_NOTAUTH);
+ AFPERR2NAME(AFPERR_NOOP);
+ AFPERR2NAME(AFPERR_BADTYPE);
+ AFPERR2NAME(AFPERR_NFILE);
+ AFPERR2NAME(AFPERR_SHUTDOWN);
+ AFPERR2NAME(AFPERR_NORENAME);
+ AFPERR2NAME(AFPERR_NODIR);
+ AFPERR2NAME(AFPERR_ITYPE);
+ AFPERR2NAME(AFPERR_VLOCK);
+ AFPERR2NAME(AFPERR_OLOCK);
+ AFPERR2NAME(AFPERR_CTNSHRD);
+ AFPERR2NAME(AFPERR_NOID);
+ AFPERR2NAME(AFPERR_EXISTID);
+ AFPERR2NAME(AFPERR_DIFFVOL);
+ AFPERR2NAME(AFPERR_CATCHNG);
+ AFPERR2NAME(AFPERR_SAMEOBJ);
+ AFPERR2NAME(AFPERR_BADID);
+ AFPERR2NAME(AFPERR_PWDSAME);
+ AFPERR2NAME(AFPERR_PWDSHORT);
+ AFPERR2NAME(AFPERR_INTRASH);
+ AFPERR2NAME(AFPERR_PWDCHNG);
+ AFPERR2NAME(AFPERR_PWDPOLCY);
+ AFPERR2NAME(AFPERR_USRLOGIN);
+ }
+ return "not yet defined";
+}
/*
- * $Id: filedir.c,v 1.66 2010-01-05 12:06:33 franklahm Exp $
+ * $Id: filedir.c,v 1.67 2010-01-18 12:55:28 franklahm Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
return get_afp_errno(AFPERR_NOOBJ);
}
+ LOG(log_debug, logtype_afpd, "getfildirparams(vid:%u, did:%u, name:'%s', f/d:%04x/%04x) {cwd: %s}",
+ ntohs(vid), ntohl(did), s_path->u_name, fbitmap, dbitmap, getcwdpath());
+
st = &s_path->st;
if (!s_path->st_valid) {
/* it's a dir and it should be there
return( AFPERR_NOOBJ );
}
+
buflen = 0;
if (S_ISDIR(st->st_mode)) {
if (dbitmap) {
/*
- * $Id: globals.h,v 1.30 2009-11-05 14:38:07 franklahm Exp $
+ * $Id: globals.h,v 1.31 2010-01-18 12:55:28 franklahm Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
extern int parseline (int, char *);
/* afp_util.c */
-const char *AfpNum2name (int );
+extern const char *AfpNum2name (int );
+extern const char *AfpErr2name(int err);
#ifndef NO_DDP
extern void afp_over_asp (AFPObj *);