From 51cdfb7a34d76666e25fb10ba074c4af7748e0e2 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Tue, 3 Jul 1990 15:38:19 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1032 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/file/fcc_errs.c | 63 +++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 src/lib/krb5/ccache/file/fcc_errs.c diff --git a/src/lib/krb5/ccache/file/fcc_errs.c b/src/lib/krb5/ccache/file/fcc_errs.c new file mode 100644 index 000000000..6f50ec0f0 --- /dev/null +++ b/src/lib/krb5/ccache/file/fcc_errs.c @@ -0,0 +1,63 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * error code interpretation routine + */ + +#if !defined(lint) && !defined(SABER) +static char rcsid_fcc_errs_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include + +#include "fcc.h" + +krb5_error_code +krb5_fcc_interpret(errnum) +int errnum; +{ + register int retval; + switch (errnum) { + case ENOENT: + retval = KRB5_FCC_NOFILE; + break; + case EPERM: + case EACCES: + case EISDIR: + case ENOTDIR: + case ELOOP: /* XXX */ + case ETXTBSY: + case EBUSY: + case EROFS: + retval = KRB5_FCC_PERM; + break; + case EINVAL: + case EEXIST: /* XXX */ + case EFAULT: + case EBADF: + case ENAMETOOLONG: +#ifdef EWOULDBLOCK + case EWOULDBLOCK: +#endif + retval = KRB5_FCC_INTERNAL; + break; +#ifdef EDQUOT + case EDQUOT: +#endif + case ENOSPC: + case EIO: + case ENFILE: + case EMFILE: + case ENXIO: + default: + retval = KRB5_CC_IO; /* XXX */ + } + return retval; +} -- 2.26.2