afs-error-translation-update-20030306
authorDerrick Brashear <shadow@dementia.org>
Thu, 6 Mar 2003 17:11:22 +0000 (17:11 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 6 Mar 2003 17:11:22 +0000 (17:11 +0000)
make it vaguely useful. still need client side

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

make it vaguely useful.
now with client side(tm)

====================

make it vaguely useful.
now with client side(tm)

====================

make it vaguely useful.
now with client side(tm)

12 files changed:
src/afs/Makefile.in
src/afs/afs.h
src/afs/afs_analyze.c
src/afs/afs_callback.c
src/afs/afs_osi.c
src/afs/afs_prototypes.h
src/afs/unified_afs.p.h [new file with mode: 0644]
src/libafsdep
src/util/Makefile.in
src/viced/afsfileprocs.c
src/viced/host.c
src/viced/viced_prototypes.h

index a465faa..0624c2d 100644 (file)
@@ -11,7 +11,7 @@ include @TOP_OBJDIR@/src/config/Makefile.config
 all: depinstall
 
 depinstall: ${TOP_INCDIR}/afs/afs.h ${TOP_INCDIR}/afs/osi_inode.h ${TOP_INCDIR}/afs/afs_stats.h \
-       ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h afszcm.cat AFS_component_version_number.c
+       ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h afszcm.cat AFS_component_version_number.c ${TOP_INCDIR}/afs/unified_afs.h
        case ${SYS_NAME} in \
                pmax_ul43 | pmax_ul43a) \
                        ${INSTALL} longc_procs.h ${TOP_INCDIR}/afs ;; \
@@ -20,6 +20,10 @@ depinstall: ${TOP_INCDIR}/afs/afs.h ${TOP_INCDIR}/afs/osi_inode.h ${TOP_INCDIR}/
 afs_trace.h afs_trace.msf: afs_trace.et
        ${COMPILE_ET} -v 2 -p ${srcdir} afs_trace.et
 
+unified_afs.c unified_afs.h: unified_afs.et
+       $(RM) -f unified_afs.c unified_afs.h
+       ${COMPILE_ET} -p ${srcdir} unified_afs -h uae
+
 afszcm.cat: afs_trace.msf
        -$(RM) -f afszcm.cat
        case ${SYS_NAME} in \
@@ -35,7 +39,7 @@ afszcm.cat: afs_trace.msf
                        gencat afszcm.cat afs_trace.msf ;; \
        esac
 
-install:   ${DESTDIR}${includedir}/afs/afs.h  ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h
+install:   ${DESTDIR}${includedir}/afs/afs.h  ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h ${DESTDIR}${includedir}/afs/unified_afs.h
        case ${SYS_NAME} in \
                pmax_ul43 | pmax_ul43a) \
                        ${INSTALL} longc_procs.h ${DESTDIR}${includedir}/afs ;; \
@@ -57,11 +61,20 @@ ${DEST}/include/afs/afs.h: afs.h
 ${DESTDIR}${includedir}/afs/afs.h: afs.h
        ${INSTALL} $? $@
 
-
 ${TOP_INCDIR}/afs/afs.h: afs.h
        ${INSTALL} $? $@
 
 
+${DEST}/include/afs/unified_afs.h: unified_afs.h
+       ${INSTALL} $? $@
+
+${DESTDIR}${includedir}/afs/unified_afs.h: unified_afs.h
+       ${INSTALL} $? $@
+
+${TOP_INCDIR}/afs/unified_afs.h: unified_afs.h
+       ${INSTALL} $? $@
+
+
 ${DEST}/include/afs/osi_inode.h: ${MKAFS_OSTYPE}/osi_inode.h
        ${INSTALL} $? $@
 
@@ -105,7 +118,7 @@ ${TOP_INCDIR}/afs/nfsclient.h: nfsclient.h
        ${INSTALL} $? $@
 
 
-dest:   ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h
+dest:   ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h ${DEST}/include/afs/unified_afs.h
        case ${SYS_NAME} in \
                pmax_ul43 | pmax_ul43a) \
                        ${INSTALL} longc_procs.h ${DEST}/include/afs ;; \
index a619147..b47683f 100644 (file)
@@ -1226,5 +1226,10 @@ struct memCacheEntry {
     char *data;    /* bytes */
 };
 
+/* First 32 bits of capabilities */
+#define CAPABILITY_ERRORTRANS (1<<0)
+
+#define CAPABILITY_BITS 1
+
 #endif /* _AFS_H_ */
 
index c27f242..a9af1eb 100644 (file)
@@ -35,6 +35,7 @@ RCSID("$Header$");
 #include "afsincludes.h"       /* Afs-based standard headers */
 #include "afs/afs_stats.h"   /* afs statistics */
 #include "afs/afs_util.h"
+#include "afs/unified_afs.h"
 
 #if    defined(AFS_SUN56_ENV)
 #include <inet/led.h>
@@ -51,6 +52,11 @@ RCSID("$Header$");
 #define ERROR_TABLE_BASE_U     (5376L)
 #endif /* ubik error base define */
 
+/* shouldn't do it this way, but for now will do */
+#ifndef ERROR_TABLE_BASE_uae
+#define ERROR_TABLE_BASE_uae   (49733376L)
+#endif /* unified afs error base define */
+
 /* same hack for vlserver error base as for ubik error base */
 #ifndef ERROR_TABLE_BASE_VL
 #define ERROR_TABLE_BASE_VL    (363520L)
@@ -64,6 +70,144 @@ afs_int32 hm_retry_RO=0;    /* don't wait */
 afs_int32 hm_retry_RW=0;    /* don't wait */
 afs_int32 hm_retry_int=0;   /* don't wait */
 
+static int et2sys[512];
+
+void init_et_to_sys_error(void) {
+    memset(&et2sys, 0, sizeof(et2sys));
+    et2sys[(UAEPERM-ERROR_TABLE_BASE_uae)] = EPERM;
+    et2sys[(UAENOENT-ERROR_TABLE_BASE_uae)] = ENOENT;
+    et2sys[(UAESRCH-ERROR_TABLE_BASE_uae)] = ESRCH;
+    et2sys[(UAEINTR-ERROR_TABLE_BASE_uae)] = EINTR;
+    et2sys[(UAEIO-ERROR_TABLE_BASE_uae)] = EIO;
+    et2sys[(UAENXIO-ERROR_TABLE_BASE_uae)] = ENXIO;
+    et2sys[(UAE2BIG-ERROR_TABLE_BASE_uae)] = E2BIG;
+    et2sys[(UAENOEXEC-ERROR_TABLE_BASE_uae)] = ENOEXEC;
+    et2sys[(UAEBADF-ERROR_TABLE_BASE_uae)] = EBADF;
+    et2sys[(UAECHILD-ERROR_TABLE_BASE_uae)] = ECHILD;
+    et2sys[(UAEAGAIN-ERROR_TABLE_BASE_uae)] = EAGAIN;
+    et2sys[(UAENOMEM-ERROR_TABLE_BASE_uae)] = ENOMEM;
+    et2sys[(UAEACCES-ERROR_TABLE_BASE_uae)] = EACCES;
+    et2sys[(UAEFAULT-ERROR_TABLE_BASE_uae)] = EFAULT;
+    et2sys[(UAENOTBLK-ERROR_TABLE_BASE_uae)] = ENOTBLK;
+    et2sys[(UAEBUSY-ERROR_TABLE_BASE_uae)] = EBUSY;
+    et2sys[(UAEEXIST-ERROR_TABLE_BASE_uae)] = EEXIST;
+    et2sys[(UAEXDEV-ERROR_TABLE_BASE_uae)] = EXDEV;
+    et2sys[(UAENODEV-ERROR_TABLE_BASE_uae)] = ENODEV;
+    et2sys[(UAENOTDIR-ERROR_TABLE_BASE_uae)] = ENOTDIR;
+    et2sys[(UAEISDIR-ERROR_TABLE_BASE_uae)] = EISDIR;
+    et2sys[(UAEINVAL-ERROR_TABLE_BASE_uae)] = EINVAL;
+    et2sys[(UAENFILE-ERROR_TABLE_BASE_uae)] = ENFILE;
+    et2sys[(UAEMFILE-ERROR_TABLE_BASE_uae)] = EMFILE;
+    et2sys[(UAENOTTY-ERROR_TABLE_BASE_uae)] = ENOTTY;
+    et2sys[(UAETXTBSY-ERROR_TABLE_BASE_uae)] = ETXTBSY;
+    et2sys[(UAEFBIG-ERROR_TABLE_BASE_uae)] = EFBIG;
+    et2sys[(UAENOSPC-ERROR_TABLE_BASE_uae)] = ENOSPC;
+    et2sys[(UAESPIPE-ERROR_TABLE_BASE_uae)] = ESPIPE;
+    et2sys[(UAEROFS-ERROR_TABLE_BASE_uae)] = EROFS;
+    et2sys[(UAEMLINK-ERROR_TABLE_BASE_uae)] = EMLINK;
+    et2sys[(UAEPIPE-ERROR_TABLE_BASE_uae)] = EPIPE;
+    et2sys[(UAEDOM-ERROR_TABLE_BASE_uae)] = EDOM;
+    et2sys[(UAERANGE-ERROR_TABLE_BASE_uae)] = ERANGE;
+    et2sys[(UAEDEADLK-ERROR_TABLE_BASE_uae)] = EDEADLK;
+    et2sys[(UAENAMETOOLONG-ERROR_TABLE_BASE_uae)] = ENAMETOOLONG;
+    et2sys[(UAENOLCK-ERROR_TABLE_BASE_uae)] = ENOLCK;
+    et2sys[(UAENOSYS-ERROR_TABLE_BASE_uae)] = ENOSYS;
+    et2sys[(UAENOTEMPTY-ERROR_TABLE_BASE_uae)] = ENOTEMPTY;
+    et2sys[(UAELOOP-ERROR_TABLE_BASE_uae)] = ELOOP;
+    et2sys[(UAEWOULDBLOCK-ERROR_TABLE_BASE_uae)] = EWOULDBLOCK;
+    et2sys[(UAENOMSG-ERROR_TABLE_BASE_uae)] = ENOMSG;
+    et2sys[(UAEIDRM-ERROR_TABLE_BASE_uae)] = EIDRM;
+    et2sys[(UAECHRNG-ERROR_TABLE_BASE_uae)] = ECHRNG;
+    et2sys[(UAEL2NSYNC-ERROR_TABLE_BASE_uae)] = EL2NSYNC;
+    et2sys[(UAEL3HLT-ERROR_TABLE_BASE_uae)] = EL3HLT;
+    et2sys[(UAEL3RST-ERROR_TABLE_BASE_uae)] = EL3RST;
+    et2sys[(UAELNRNG-ERROR_TABLE_BASE_uae)] = ELNRNG;
+    et2sys[(UAEUNATCH-ERROR_TABLE_BASE_uae)] = EUNATCH;
+    et2sys[(UAENOCSI-ERROR_TABLE_BASE_uae)] = ENOCSI;
+    et2sys[(UAEL2HLT-ERROR_TABLE_BASE_uae)] = EL2HLT;
+    et2sys[(UAEBADE-ERROR_TABLE_BASE_uae)] = EBADE;
+    et2sys[(UAEBADR-ERROR_TABLE_BASE_uae)] = EBADR;
+    et2sys[(UAEXFULL-ERROR_TABLE_BASE_uae)] = EXFULL;
+    et2sys[(UAENOANO-ERROR_TABLE_BASE_uae)] = ENOANO;
+    et2sys[(UAEBADRQC-ERROR_TABLE_BASE_uae)] = EBADRQC;
+    et2sys[(UAEBADSLT-ERROR_TABLE_BASE_uae)] = EBADSLT;
+    et2sys[(UAEDEADLK-ERROR_TABLE_BASE_uae)] = EDEADLK;
+    et2sys[(UAEBFONT-ERROR_TABLE_BASE_uae)] = EBFONT;
+    et2sys[(UAENOSTR-ERROR_TABLE_BASE_uae)] = ENOSTR;
+    et2sys[(UAENODATA-ERROR_TABLE_BASE_uae)] = ENODATA;
+    et2sys[(UAETIME-ERROR_TABLE_BASE_uae)] = ETIME;
+    et2sys[(UAENOSR-ERROR_TABLE_BASE_uae)] = ENOSR;
+    et2sys[(UAENONET-ERROR_TABLE_BASE_uae)] = ENONET;
+    et2sys[(UAENOPKG-ERROR_TABLE_BASE_uae)] = ENOPKG;
+    et2sys[(UAEREMOTE-ERROR_TABLE_BASE_uae)] = EREMOTE;
+    et2sys[(UAENOLINK-ERROR_TABLE_BASE_uae)] = ENOLINK;
+    et2sys[(UAEADV-ERROR_TABLE_BASE_uae)] = EADV;
+    et2sys[(UAESRMNT-ERROR_TABLE_BASE_uae)] = ESRMNT;
+    et2sys[(UAECOMM-ERROR_TABLE_BASE_uae)] = ECOMM;
+    et2sys[(UAEPROTO-ERROR_TABLE_BASE_uae)] = EPROTO;
+    et2sys[(UAEMULTIHOP-ERROR_TABLE_BASE_uae)] = EMULTIHOP;
+    et2sys[(UAEDOTDOT-ERROR_TABLE_BASE_uae)] = EDOTDOT;
+    et2sys[(UAEBADMSG-ERROR_TABLE_BASE_uae)] = EBADMSG;
+    et2sys[(UAEOVERFLOW-ERROR_TABLE_BASE_uae)] = EOVERFLOW;
+    et2sys[(UAENOTUNIQ-ERROR_TABLE_BASE_uae)] = ENOTUNIQ;
+    et2sys[(UAEBADFD-ERROR_TABLE_BASE_uae)] = EBADFD;
+    et2sys[(UAEREMCHG-ERROR_TABLE_BASE_uae)] = EREMCHG;
+    et2sys[(UAELIBACC-ERROR_TABLE_BASE_uae)] = ELIBACC;
+    et2sys[(UAELIBBAD-ERROR_TABLE_BASE_uae)] = ELIBBAD;
+    et2sys[(UAELIBSCN-ERROR_TABLE_BASE_uae)] = ELIBSCN;
+    et2sys[(UAELIBMAX-ERROR_TABLE_BASE_uae)] = ELIBMAX;
+    et2sys[(UAELIBEXEC-ERROR_TABLE_BASE_uae)] = ELIBEXEC;
+    et2sys[(UAEILSEQ-ERROR_TABLE_BASE_uae)] = EILSEQ;
+    et2sys[(UAERESTART-ERROR_TABLE_BASE_uae)] = ERESTART;
+    et2sys[(UAESTRPIPE-ERROR_TABLE_BASE_uae)] = ESTRPIPE;
+    et2sys[(UAEUSERS-ERROR_TABLE_BASE_uae)] = EUSERS;
+    et2sys[(UAENOTSOCK-ERROR_TABLE_BASE_uae)] = ENOTSOCK;
+    et2sys[(UAEDESTADDRREQ-ERROR_TABLE_BASE_uae)] = EDESTADDRREQ;
+    et2sys[(UAEMSGSIZE-ERROR_TABLE_BASE_uae)] = EMSGSIZE;
+    et2sys[(UAEPROTOTYPE-ERROR_TABLE_BASE_uae)] = EPROTOTYPE;
+    et2sys[(UAENOPROTOOPT-ERROR_TABLE_BASE_uae)] = ENOPROTOOPT;
+    et2sys[(UAEPROTONOSUPPORT-ERROR_TABLE_BASE_uae)] = EPROTONOSUPPORT;
+    et2sys[(UAESOCKTNOSUPPORT-ERROR_TABLE_BASE_uae)] = ESOCKTNOSUPPORT;
+    et2sys[(UAEOPNOTSUPP-ERROR_TABLE_BASE_uae)] = EOPNOTSUPP;
+    et2sys[(UAEPFNOSUPPORT-ERROR_TABLE_BASE_uae)] = EPFNOSUPPORT;
+    et2sys[(UAEAFNOSUPPORT-ERROR_TABLE_BASE_uae)] = EAFNOSUPPORT;
+    et2sys[(UAEADDRINUSE-ERROR_TABLE_BASE_uae)] = EADDRINUSE;
+    et2sys[(UAEADDRNOTAVAIL-ERROR_TABLE_BASE_uae)] = EADDRNOTAVAIL;
+    et2sys[(UAENETDOWN-ERROR_TABLE_BASE_uae)] = ENETDOWN;
+    et2sys[(UAENETUNREACH-ERROR_TABLE_BASE_uae)] = ENETUNREACH;
+    et2sys[(UAENETRESET-ERROR_TABLE_BASE_uae)] = ENETRESET;
+    et2sys[(UAECONNABORTED-ERROR_TABLE_BASE_uae)] = ECONNABORTED;
+    et2sys[(UAECONNRESET-ERROR_TABLE_BASE_uae)] = ECONNRESET;
+    et2sys[(UAENOBUFS-ERROR_TABLE_BASE_uae)] = ENOBUFS;
+    et2sys[(UAEISCONN-ERROR_TABLE_BASE_uae)] = EISCONN;
+    et2sys[(UAENOTCONN-ERROR_TABLE_BASE_uae)] = ENOTCONN;
+    et2sys[(UAESHUTDOWN-ERROR_TABLE_BASE_uae)] = ESHUTDOWN;
+    et2sys[(UAETOOMANYREFS-ERROR_TABLE_BASE_uae)] = ETOOMANYREFS;
+    et2sys[(UAETIMEDOUT-ERROR_TABLE_BASE_uae)] = ETIMEDOUT;
+    et2sys[(UAECONNREFUSED-ERROR_TABLE_BASE_uae)] = ECONNREFUSED;
+    et2sys[(UAEHOSTDOWN-ERROR_TABLE_BASE_uae)] = EHOSTDOWN;
+    et2sys[(UAEHOSTUNREACH-ERROR_TABLE_BASE_uae)] = EHOSTUNREACH;
+    et2sys[(UAEALREADY-ERROR_TABLE_BASE_uae)] = EALREADY;
+    et2sys[(UAEINPROGRESS-ERROR_TABLE_BASE_uae)] = EINPROGRESS;
+    et2sys[(UAESTALE-ERROR_TABLE_BASE_uae)] = ESTALE;
+    et2sys[(UAEUCLEAN-ERROR_TABLE_BASE_uae)] = EUCLEAN;
+    et2sys[(UAENOTNAM-ERROR_TABLE_BASE_uae)] = ENOTNAM;
+    et2sys[(UAENAVAIL-ERROR_TABLE_BASE_uae)] = ENAVAIL;
+    et2sys[(UAEISNAM-ERROR_TABLE_BASE_uae)] = EISNAM;
+    et2sys[(UAEREMOTEIO-ERROR_TABLE_BASE_uae)] = EREMOTEIO;
+    et2sys[(UAEDQUOT-ERROR_TABLE_BASE_uae)] = EDQUOT;
+    et2sys[(UAENOMEDIUM-ERROR_TABLE_BASE_uae)] = ENOMEDIUM;
+    et2sys[(UAEMEDIUMTYPE-ERROR_TABLE_BASE_uae)] = EMEDIUMTYPE;
+}
+
+static afs_int32 et_to_sys_error(afs_int32 in) {
+    if (in < ERROR_TABLE_BASE_uae || in >= ERROR_TABLE_BASE_uae + 512) 
+       return in;
+    if (et2sys[in-ERROR_TABLE_BASE_uae] != 0) 
+       return et2sys[in-ERROR_TABLE_BASE_uae];
+    return in;
+}
+
 void afs_CopyError(register struct vrequest *afrom, register struct vrequest *ato)
 {
     AFS_STATCNT(afs_CopyError);
@@ -102,6 +246,8 @@ int afs_CheckCode(afs_int32 acode, struct vrequest *areq, int where)
        afs_Trace2(afs_iclSetp, CM_TRACE_CHECKCODE,
                   ICL_TYPE_INT32, acode, ICL_TYPE_INT32, where);
     }
+    if (acode & ~0xff == ERROR_TABLE_BASE_uae) 
+       acode = et_to_sys_error(acode);
     if (!areq || !areq->initd)
        return acode;
     if (areq->networkError)
@@ -385,6 +531,11 @@ int afs_Analyze(register struct conn *aconn, afs_int32 acode,
     sa = aconn->srvr;
     tsp = sa->server;
 
+    /* Before we do anything with acode, make sure we translate it back to
+       a system error */
+    if (acode & ~0xff == ERROR_TABLE_BASE_uae) 
+       acode = et_to_sys_error(acode);
+
     if (acode == 0) {
        /* If we previously took an error, mark this volume not busy */
        if (areq->volumeError) {
index ee0a7a7..bc687e8 100644 (file)
@@ -1464,8 +1464,9 @@ int SRXAFSCB_TellMeAboutYourself(struct rx_call *a_call,
     
     RX_AFS_GUNLOCK();
     
+    dataBytes = 1 * sizeof(afs_int32);
     dataBuffP = (afs_int32 *)afs_osi_Alloc(dataBytes);
-    memcpy((char *)dataBuffP, "1", dataBytes);
+    dataBuffP[0] = CAPABILITY_ERRORTRANS;
     capabilities->Capabilities_len = dataBytes/sizeof(afs_int32);
     capabilities->Capabilities_val = dataBuffP;
 
index a4dd783..e4f9ae1 100644 (file)
@@ -75,6 +75,8 @@ void osi_Init(void)
 #ifdef AFS_SGI64_ENV
     osi_flid.fl_pid = osi_flid.fl_sysid = 0;
 #endif
+
+    init_et_to_sys_error();
 }
 
 int osi_Active(register struct vcache *avc)
index b987074..17e40d2 100644 (file)
@@ -17,7 +17,7 @@ extern int afs_Analyze(register struct conn *aconn, afs_int32 acode,
     afs_int32 locktype, struct cell *cellp);
 extern int afs_CheckCode(afs_int32 acode, struct vrequest *areq, int where);
 extern void afs_CopyError(register struct vrequest *afrom, register struct vrequest *ato);
-
+extern void init_sys_error_to_et(void);
 
 /* afs_axscache.c */
 extern afs_rwlock_t afs_xaxs;
diff --git a/src/afs/unified_afs.p.h b/src/afs/unified_afs.p.h
new file mode 100644 (file)
index 0000000..41558f1
--- /dev/null
@@ -0,0 +1,369 @@
+#ifndef EPERM
+#define EPERM 0
+#endif /* EPERM */
+#ifndef ENOENT
+#define ENOENT 0
+#endif /* ENOENT */
+#ifndef ESRCH
+#define ESRCH 0
+#endif /* ESRCH */
+#ifndef EINTR
+#define EINTR 0
+#endif /* EINTR */
+#ifndef EIO
+#define EIO 0
+#endif /* EIO */
+#ifndef ENXIO
+#define ENXIO 0
+#endif /* ENXIO */
+#ifndef E2BIG
+#define E2BIG 0
+#endif /* E2BIG */
+#ifndef ENOEXEC
+#define ENOEXEC 0
+#endif /* ENOEXEC */
+#ifndef EBADF
+#define EBADF 0
+#endif /* EBADF */
+#ifndef ECHILD
+#define ECHILD 0
+#endif /* ECHILD */
+#ifndef EAGAIN
+#define EAGAIN 0
+#endif /* EAGAIN */
+#ifndef ENOMEM
+#define ENOMEM 0
+#endif /* ENOMEM */
+#ifndef EACCES
+#define EACCES 0
+#endif /* EACCES */
+#ifndef EFAULT
+#define EFAULT 0
+#endif /* EFAULT */
+#ifndef ENOTBLK
+#define ENOTBLK 0
+#endif /* ENOTBLK */
+#ifndef EBUSY
+#define EBUSY 0
+#endif /* EBUSY */
+#ifndef EEXIST
+#define EEXIST 0
+#endif /* EEXIST */
+#ifndef EXDEV
+#define EXDEV 0
+#endif /* EXDEV */
+#ifndef ENODEV
+#define ENODEV 0
+#endif /* ENODEV */
+#ifndef ENOTDIR
+#define ENOTDIR 0
+#endif /* ENOTDIR */
+#ifndef EISDIR
+#define EISDIR 0
+#endif /* EISDIR */
+#ifndef EINVAL
+#define EINVAL 0
+#endif /* EINVAL */
+#ifndef ENFILE
+#define ENFILE 0
+#endif /* ENFILE */
+#ifndef EMFILE
+#define EMFILE 0
+#endif /* EMFILE */
+#ifndef ENOTTY
+#define ENOTTY 0
+#endif /* ENOTTY */
+#ifndef ETXTBSY
+#define ETXTBSY 0
+#endif /* ETXTBSY */
+#ifndef EFBIG
+#define EFBIG 0
+#endif /* EFBIG */
+#ifndef ENOSPC
+#define ENOSPC 0
+#endif /* ENOSPC */
+#ifndef ESPIPE
+#define ESPIPE 0
+#endif /* ESPIPE */
+#ifndef EROFS
+#define EROFS 0
+#endif /* EROFS */
+#ifndef EMLINK
+#define EMLINK 0
+#endif /* EMLINK */
+#ifndef EPIPE
+#define EPIPE 0
+#endif /* EPIPE */
+#ifndef EDOM
+#define EDOM 0
+#endif /* EDOM */
+#ifndef ERANGE
+#define ERANGE 0
+#endif /* ERANGE */
+#ifndef EDEADLK
+#define EDEADLK 0
+#endif /* EDEADLK */
+#ifndef ENAMETOOLONG
+#define ENAMETOOLONG 0
+#endif /* ENAMETOOLONG */
+#ifndef ENOLCK
+#define ENOLCK 0
+#endif /* ENOLCK */
+#ifndef ENOSYS
+#define ENOSYS 0
+#endif /* ENOSYS */
+#ifndef ENOTEMPTY
+#define ENOTEMPTY 0
+#endif /* ENOTEMPTY */
+#ifndef ELOOP
+#define ELOOP 0
+#endif /* ELOOP */
+#ifndef EWOULDBLOCK
+#define EWOULDBLOCK 0
+#endif /* EWOULDBLOCK */
+#ifndef ENOMSG
+#define ENOMSG 0
+#endif /* ENOMSG */
+#ifndef EIDRM
+#define EIDRM 0
+#endif /* EIDRM */
+#ifndef ECHRNG
+#define ECHRNG 0
+#endif /* ECHRNG */
+#ifndef EL2NSYNC
+#define EL2NSYNC 0
+#endif /* EL2NSYNC */
+#ifndef EL3HLT
+#define EL3HLT 0
+#endif /* EL3HLT */
+#ifndef EL3RST
+#define EL3RST 0
+#endif /* EL3RST */
+#ifndef ELNRNG
+#define ELNRNG 0
+#endif /* ELNRNG */
+#ifndef EUNATCH
+#define EUNATCH 0
+#endif /* EUNATCH */
+#ifndef ENOCSI
+#define ENOCSI 0
+#endif /* ENOCSI */
+#ifndef EL2HLT
+#define EL2HLT 0
+#endif /* EL2HLT */
+#ifndef EBADE
+#define EBADE 0
+#endif /* EBADE */
+#ifndef EBADR
+#define EBADR 0
+#endif /* EBADR */
+#ifndef EXFULL
+#define EXFULL 0
+#endif /* EXFULL */
+#ifndef ENOANO
+#define ENOANO 0
+#endif /* ENOANO */
+#ifndef EBADRQC
+#define EBADRQC 0
+#endif /* EBADRQC */
+#ifndef EBADSLT
+#define EBADSLT 0
+#endif /* EBADSLT */
+#ifndef EBFONT
+#define EBFONT 0
+#endif /* EBFONT */
+#ifndef ENOSTR
+#define ENOSTR 0
+#endif /* ENOSTR */
+#ifndef ENODATA
+#define ENODATA 0
+#endif /* ENODATA */
+#ifndef ETIME
+#define ETIME 0
+#endif /* ETIME */
+#ifndef ENOSR
+#define ENOSR 0
+#endif /* ENOSR */
+#ifndef ENONET
+#define ENONET 0
+#endif /* ENONET */
+#ifndef ENOPKG
+#define ENOPKG 0
+#endif /* ENOPKG */
+#ifndef EREMOTE
+#define EREMOTE 0
+#endif /* EREMOTE */
+#ifndef ENOLINK
+#define ENOLINK 0
+#endif /* ENOLINK */
+#ifndef EADV
+#define EADV 0
+#endif /* EADV */
+#ifndef ESRMNT
+#define ESRMNT 0
+#endif /* ESRMNT */
+#ifndef ECOMM
+#define ECOMM 0
+#endif /* ECOMM */
+#ifndef EPROTO
+#define EPROTO 0
+#endif /* EPROTO */
+#ifndef EMULTIHOP
+#define EMULTIHOP 0
+#endif /* EMULTIHOP */
+#ifndef EDOTDOT
+#define EDOTDOT 0
+#endif /* EDOTDOT */
+#ifndef EBADMSG
+#define EBADMSG 0
+#endif /* EBADMSG */
+#ifndef EOVERFLOW
+#define EOVERFLOW 0
+#endif /* EOVERFLOW */
+#ifndef ENOTUNIQ
+#define ENOTUNIQ 0
+#endif /* ENOTUNIQ */
+#ifndef EBADFD
+#define EBADFD 0
+#endif /* EBADFD */
+#ifndef EREMCHG
+#define EREMCHG 0
+#endif /* EREMCHG */
+#ifndef ELIBACC
+#define ELIBACC 0
+#endif /* ELIBACC */
+#ifndef ELIBBAD
+#define ELIBBAD 0
+#endif /* ELIBBAD */
+#ifndef ELIBSCN
+#define ELIBSCN 0
+#endif /* ELIBSCN */
+#ifndef ELIBMAX
+#define ELIBMAX 0
+#endif /* ELIBMAX */
+#ifndef ELIBEXEC
+#define ELIBEXEC 0
+#endif /* ELIBEXEC */
+#ifndef EILSEQ
+#define EILSEQ 0
+#endif /* EILSEQ */
+#ifndef ERESTART
+#define ERESTART 0
+#endif /* ERESTART */
+#ifndef ESTRPIPE
+#define ESTRPIPE 0
+#endif /* ESTRPIPE */
+#ifndef EUSERS
+#define EUSERS 0
+#endif /* EUSERS */
+#ifndef ENOTSOCK
+#define ENOTSOCK 0
+#endif /* ENOTSOCK */
+#ifndef EDESTADDRREQ
+#define EDESTADDRREQ 0
+#endif /* EDESTADDRREQ */
+#ifndef EMSGSIZE
+#define EMSGSIZE 0
+#endif /* EMSGSIZE */
+#ifndef EPROTOTYPE
+#define EPROTOTYPE 0
+#endif /* EPROTOTYPE */
+#ifndef ENOPROTOOPT
+#define ENOPROTOOPT 0
+#endif /* ENOPROTOOPT */
+#ifndef EPROTONOSUPPORT
+#define EPROTONOSUPPORT 0
+#endif /* EPROTONOSUPPORT */
+#ifndef ESOCKTNOSUPPORT
+#define ESOCKTNOSUPPORT 0
+#endif /* ESOCKTNOSUPPORT */
+#ifndef EOPNOTSUPP
+#define EOPNOTSUPP 0
+#endif /* EOPNOTSUPP */
+#ifndef EPFNOSUPPORT
+#define EPFNOSUPPORT 0
+#endif /* EPFNOSUPPORT */
+#ifndef EAFNOSUPPORT
+#define EAFNOSUPPORT 0
+#endif /* EAFNOSUPPORT */
+#ifndef EADDRINUSE
+#define EADDRINUSE 0
+#endif /* EADDRINUSE */
+#ifndef EADDRNOTAVAIL
+#define EADDRNOTAVAIL 0
+#endif /* EADDRNOTAVAIL */
+#ifndef ENETDOWN
+#define ENETDOWN 0
+#endif /* ENETDOWN */
+#ifndef ENETUNREACH
+#define ENETUNREACH 0
+#endif /* ENETUNREACH */
+#ifndef ENETRESET
+#define ENETRESET 0
+#endif /* ENETRESET */
+#ifndef ECONNABORTED
+#define ECONNABORTED 0
+#endif /* ECONNABORTED */
+#ifndef ECONNRESET
+#define ECONNRESET 0
+#endif /* ECONNRESET */
+#ifndef ENOBUFS
+#define ENOBUFS 0
+#endif /* ENOBUFS */
+#ifndef EISCONN
+#define EISCONN 0
+#endif /* EISCONN */
+#ifndef ENOTCONN
+#define ENOTCONN 0
+#endif /* ENOTCONN */
+#ifndef ESHUTDOWN
+#define ESHUTDOWN 0
+#endif /* ESHUTDOWN */
+#ifndef ETOOMANYREFS
+#define ETOOMANYREFS 0
+#endif /* ETOOMANYREFS */
+#ifndef ETIMEDOUT
+#define ETIMEDOUT 0
+#endif /* ETIMEDOUT */
+#ifndef ECONNREFUSED
+#define ECONNREFUSED 0
+#endif /* ECONNREFUSED */
+#ifndef EHOSTDOWN
+#define EHOSTDOWN 0
+#endif /* EHOSTDOWN */
+#ifndef EHOSTUNREACH
+#define EHOSTUNREACH 0
+#endif /* EHOSTUNREACH */
+#ifndef EALREADY
+#define EALREADY 0
+#endif /* EALREADY */
+#ifndef EINPROGRESS
+#define EINPROGRESS 0
+#endif /* EINPROGRESS */
+#ifndef ESTALE
+#define ESTALE 0
+#endif /* ESTALE */
+#ifndef EUCLEAN
+#define EUCLEAN 0
+#endif /* EUCLEAN */
+#ifndef ENOTNAM
+#define ENOTNAM 0
+#endif /* ENOTNAM */
+#ifndef ENAVAIL
+#define ENAVAIL 0
+#endif /* ENAVAIL */
+#ifndef EISNAM
+#define EISNAM 0
+#endif /* EISNAM */
+#ifndef EREMOTEIO
+#define EREMOTEIO 0
+#endif /* EREMOTEIO */
+#ifndef EDQUOT
+#define EDQUOT 0
+#endif /* EDQUOT */
+#ifndef ENOMEDIUM
+#define ENOMEDIUM 0
+#endif /* ENOMEDIUM */
+#ifndef EMEDIUMTYPE
+#define EMEDIUMTYPE 0
+#endif /* EMEDIUMTYPE */
index 565b12a..f36a15a 100644 (file)
@@ -1,6 +1,7 @@
 util/afs_lhash.c
 util/afs_atomlist.c
 util/uuid.c
+util/unified_afs.*
 dir/dir.c
 fsint/afsaux.c
 fsint/K*.[ch]
index a61efe4..70c9374 100644 (file)
@@ -30,6 +30,7 @@ includes = \
        ${TOP_INCDIR}/afs/afs_atomlist.h \
        ${TOP_INCDIR}/afs/afs_lhash.h \
        ${TOP_INCDIR}/afs/softsig.h \
+       ${TOP_INCDIR}/afs/unified_afs.h \
        ${TOP_INCDIR}/potpourri.h 
 
 all: ${includes} \
@@ -122,6 +123,10 @@ afs_atomlist.o: ${srcdir}/afs_atomlist.c ${includes}
 afs_lhash.o: ${srcdir}/afs_lhash.c ${includes}
        ${CC} ${CFLAGS} -c ${srcdir}/afs_lhash.c
 
+unified_afs.c unified_afs.h: unified_afs.et
+       $(RM) -f unified_afs.c unified_afs.h
+       ${COMPILE_ET} unified_afs
+
 #
 # Install targets
 #
@@ -145,6 +150,7 @@ install: \
        ${DESTDIR}${includedir}/afs/afs_atomlist.h \
        ${DESTDIR}${includedir}/afs/afs_lhash.h \
        ${DESTDIR}${includedir}/afs/softsig.h \
+       ${DESTDIR}${includedir}/afs/unified_afs.h \
        ${DESTDIR}${includedir}/potpourri.h \
        ${DESTDIR}${libdir}/afs/util.a \
        ${DESTDIR}${libdir}/afs/libafsutil.a \
@@ -153,6 +159,9 @@ install: \
 ${TOP_INCDIR}/afs/dirpath.h: dirpath.h
        ${INSTALL} $? $@
 
+${TOP_INCDIR}/afs/unified_afs.h: unified_afs.h
+       ${INSTALL} $? $@
+
 ${TOP_INCDIR}/afs/pthread_nosigs.h: ${srcdir}/pthread_nosigs.h
        ${INSTALL} $? $@
 
@@ -212,6 +221,9 @@ ${TOP_LIBDIR}/libafsutil.a: util.a
 ${DESTDIR}${includedir}/afs/dirpath.h: dirpath.h
        ${INSTALL} $? $@
 
+${DESTDIR}${includedir}/afs/unified_afs.h: unified_afs.h
+       ${INSTALL} $? $@
+
 ${DESTDIR}${includedir}/afs/pthread_nosigs.h: ${srcdir}/pthread_nosigs.h
        ${INSTALL} $? $@
 
@@ -275,6 +287,9 @@ ${DESTDIR}${bindir}/sys: sys
 ${DEST}/include/afs/dirpath.h: dirpath.h
        ${INSTALL} $? $@
 
+${DEST}/include/afs/unified_afs.h: unified_afs.h
+       ${INSTALL} $? $@
+
 ${DEST}/include/afs/pthread_nosigs.h: ${srcdir}/pthread_nosigs.h
        ${INSTALL} $? $@
 
@@ -349,6 +364,7 @@ include ../config/Makefile.version
 
 dest: \
        ${DEST}/include/afs/dirpath.h \
+       ${DEST}/include/afs/unified_afs.h \
        ${DEST}/include/afs/pthread_nosigs.h \
        ${DEST}/include/afs/assert.h \
        ${DEST}/include/afs/errors.h \
index ce89d8b..bcd4ece 100644 (file)
@@ -109,6 +109,7 @@ RCSID("$Header$");
 #include "viced_prototypes.h"
 #include "viced.h"
 #include "host.h"
+#include <afs/unified_afs.h>
 #include <afs/audit.h>
 #include <afs/afsutil.h>
 
@@ -5987,11 +5988,12 @@ afs_int32 SRXAFS_GetCapabilities(struct rx_call *acall,
                                 Capabilities *capabilities)
 {
     afs_int32 *dataBuffP;               
+    afs_int32 *dataP;
     afs_int32 dataBytes;   
 
-    dataBytes = (((CAPABILITY_BITS-1)>>5)+1) * sizeof(afs_int32);
+    dataBytes = 1 * sizeof(afs_int32);
     dataBuffP = (afs_int32 *)malloc(dataBytes);
-    dataBytes = CAPABILITY_ERRORTRANS;
+    dataBuffP[0] = CAPABILITY_ERRORTRANS;
     capabilities->Capabilities_len = dataBytes/sizeof(afs_int32);
     capabilities->Capabilities_val = dataBuffP;
 
@@ -7127,15 +7129,135 @@ StoreData_RXStyle(Volume *volptr,
 static int sys2et[512];
 
 void init_sys_error_to_et(void) {
-    int uae = 49733376L;
-    int uaf = 49733632L;
     memset(&sys2et, 0, sizeof(sys2et));
-    sys2et[EPERM] = 1 + uae;
-    sys2et[EEXIST] = 17 +  uae;
-    sys2et[ENOTEMPTY] = 39 +  uae;
+    sys2et[EPERM] = UAEPERM;
+    sys2et[ENOENT] = UAENOENT;
+    sys2et[ESRCH] = UAESRCH;
+    sys2et[EINTR] = UAEINTR;
+    sys2et[EIO] = UAEIO;
+    sys2et[ENXIO] = UAENXIO;
+    sys2et[E2BIG] = UAE2BIG;
+    sys2et[ENOEXEC] = UAENOEXEC;
+    sys2et[EBADF] = UAEBADF;
+    sys2et[ECHILD] = UAECHILD;
+    sys2et[EAGAIN] = UAEAGAIN;
+    sys2et[ENOMEM] = UAENOMEM;
+    sys2et[EACCES] = UAEACCES;
+    sys2et[EFAULT] = UAEFAULT;
+    sys2et[ENOTBLK] = UAENOTBLK;
+    sys2et[EBUSY] = UAEBUSY;
+    sys2et[EEXIST] = UAEEXIST;
+    sys2et[EXDEV] = UAEXDEV;
+    sys2et[ENODEV] = UAENODEV;
+    sys2et[ENOTDIR] = UAENOTDIR;
+    sys2et[EISDIR] = UAEISDIR;
+    sys2et[EINVAL] = UAEINVAL;
+    sys2et[ENFILE] = UAENFILE;
+    sys2et[EMFILE] = UAEMFILE;
+    sys2et[ENOTTY] = UAENOTTY;
+    sys2et[ETXTBSY] = UAETXTBSY;
+    sys2et[EFBIG] = UAEFBIG;
+    sys2et[ENOSPC] = UAENOSPC;
+    sys2et[ESPIPE] = UAESPIPE;
+    sys2et[EROFS] = UAEROFS;
+    sys2et[EMLINK] = UAEMLINK;
+    sys2et[EPIPE] = UAEPIPE;
+    sys2et[EDOM] = UAEDOM;
+    sys2et[ERANGE] = UAERANGE;
+    sys2et[EDEADLK] = UAEDEADLK;
+    sys2et[ENAMETOOLONG] = UAENAMETOOLONG;
+    sys2et[ENOLCK] = UAENOLCK;
+    sys2et[ENOSYS] = UAENOSYS;
+    sys2et[ENOTEMPTY] = UAENOTEMPTY;
+    sys2et[ELOOP] = UAELOOP;
+    sys2et[EWOULDBLOCK] = UAEWOULDBLOCK;
+    sys2et[ENOMSG] = UAENOMSG;
+    sys2et[EIDRM] = UAEIDRM;
+    sys2et[ECHRNG] = UAECHRNG;
+    sys2et[EL2NSYNC] = UAEL2NSYNC;
+    sys2et[EL3HLT] = UAEL3HLT;
+    sys2et[EL3RST] = UAEL3RST;
+    sys2et[ELNRNG] = UAELNRNG;
+    sys2et[EUNATCH] = UAEUNATCH;
+    sys2et[ENOCSI] = UAENOCSI;
+    sys2et[EL2HLT] = UAEL2HLT;
+    sys2et[EBADE] = UAEBADE;
+    sys2et[EBADR] = UAEBADR;
+    sys2et[EXFULL] = UAEXFULL;
+    sys2et[ENOANO] = UAENOANO;
+    sys2et[EBADRQC] = UAEBADRQC;
+    sys2et[EBADSLT] = UAEBADSLT;
+    sys2et[EDEADLK] = UAEDEADLK;
+    sys2et[EBFONT] = UAEBFONT;
+    sys2et[ENOSTR] = UAENOSTR;
+    sys2et[ENODATA] = UAENODATA;
+    sys2et[ETIME] = UAETIME;
+    sys2et[ENOSR] = UAENOSR;
+    sys2et[ENONET] = UAENONET;
+    sys2et[ENOPKG] = UAENOPKG;
+    sys2et[EREMOTE] = UAEREMOTE;
+    sys2et[ENOLINK] = UAENOLINK;
+    sys2et[EADV] = UAEADV;
+    sys2et[ESRMNT] = UAESRMNT;
+    sys2et[ECOMM] = UAECOMM;
+    sys2et[EPROTO] = UAEPROTO;
+    sys2et[EMULTIHOP] = UAEMULTIHOP;
+    sys2et[EDOTDOT] = UAEDOTDOT;
+    sys2et[EBADMSG] = UAEBADMSG;
+    sys2et[EOVERFLOW] = UAEOVERFLOW;
+    sys2et[ENOTUNIQ] = UAENOTUNIQ;
+    sys2et[EBADFD] = UAEBADFD;
+    sys2et[EREMCHG] = UAEREMCHG;
+    sys2et[ELIBACC] = UAELIBACC;
+    sys2et[ELIBBAD] = UAELIBBAD;
+    sys2et[ELIBSCN] = UAELIBSCN;
+    sys2et[ELIBMAX] = UAELIBMAX;
+    sys2et[ELIBEXEC] = UAELIBEXEC;
+    sys2et[EILSEQ] = UAEILSEQ;
+    sys2et[ERESTART] = UAERESTART;
+    sys2et[ESTRPIPE] = UAESTRPIPE;
+    sys2et[EUSERS] = UAEUSERS;
+    sys2et[ENOTSOCK] = UAENOTSOCK;
+    sys2et[EDESTADDRREQ] = UAEDESTADDRREQ;
+    sys2et[EMSGSIZE] = UAEMSGSIZE;
+    sys2et[EPROTOTYPE] = UAEPROTOTYPE;
+    sys2et[ENOPROTOOPT] = UAENOPROTOOPT;
+    sys2et[EPROTONOSUPPORT] = UAEPROTONOSUPPORT;
+    sys2et[ESOCKTNOSUPPORT] = UAESOCKTNOSUPPORT;
+    sys2et[EOPNOTSUPP] = UAEOPNOTSUPP;
+    sys2et[EPFNOSUPPORT] = UAEPFNOSUPPORT;
+    sys2et[EAFNOSUPPORT] = UAEAFNOSUPPORT;
+    sys2et[EADDRINUSE] = UAEADDRINUSE;
+    sys2et[EADDRNOTAVAIL] = UAEADDRNOTAVAIL;
+    sys2et[ENETDOWN] = UAENETDOWN;
+    sys2et[ENETUNREACH] = UAENETUNREACH;
+    sys2et[ENETRESET] = UAENETRESET;
+    sys2et[ECONNABORTED] = UAECONNABORTED;
+    sys2et[ECONNRESET] = UAECONNRESET;
+    sys2et[ENOBUFS] = UAENOBUFS;
+    sys2et[EISCONN] = UAEISCONN;
+    sys2et[ENOTCONN] = UAENOTCONN;
+    sys2et[ESHUTDOWN] = UAESHUTDOWN;
+    sys2et[ETOOMANYREFS] = UAETOOMANYREFS;
+    sys2et[ETIMEDOUT] = UAETIMEDOUT;
+    sys2et[ECONNREFUSED] = UAECONNREFUSED;
+    sys2et[EHOSTDOWN] = UAEHOSTDOWN;
+    sys2et[EHOSTUNREACH] = UAEHOSTUNREACH;
+    sys2et[EALREADY] = UAEALREADY;
+    sys2et[EINPROGRESS] = UAEINPROGRESS;
+    sys2et[ESTALE] = UAESTALE;
+    sys2et[EUCLEAN] = UAEUCLEAN;
+    sys2et[ENOTNAM] = UAENOTNAM;
+    sys2et[ENAVAIL] = UAENAVAIL;
+    sys2et[EISNAM] = UAEISNAM;
+    sys2et[EREMOTEIO] = UAEREMOTEIO;
+    sys2et[EDQUOT] = UAEDQUOT;
+    sys2et[ENOMEDIUM] = UAENOMEDIUM;
+    sys2et[EMEDIUMTYPE] = UAEMEDIUMTYPE;
 }
 
 afs_int32 sys_error_to_et(afs_int32 in) {
+    if (in < 0 || in > 511) return in;
     if (sys2et[in] != 0) return sys2et[in];
     return in;
 }
index 0c954b4..36d718e 100644 (file)
@@ -964,7 +964,7 @@ retry:
        H_UNLOCK
        code = RXAFSCB_TellMeAboutYourself(host->callback_rxcon, &interf,
                                           &caps);
-       if ( code == RXGEN_OPCODE )
+       if ( code == RXGEN_OPCODE ) 
            code = RXAFSCB_WhoAreYou(host->callback_rxcon, &interf);
        H_LOCK
        if ( code == RXGEN_OPCODE ) {
@@ -1073,7 +1073,7 @@ retry:
                H_UNLOCK
                code = RXAFSCB_TellMeAboutYourself(host->callback_rxcon, 
                                                   &interf, &caps);
-               if ( code == RXGEN_OPCODE )
+               if ( code == RXGEN_OPCODE ) 
                    code = RXAFSCB_WhoAreYou(host->callback_rxcon, &interf);
                H_LOCK
                if ( code == RXGEN_OPCODE ) {
index d426480..17795b3 100644 (file)
@@ -3,6 +3,6 @@ afs_int32 sys_error_to_et(afs_int32 in);
 void init_sys_error_to_et(void);
 
 /* First 32 bits of capabilities */
-#define CAPABILITY_ERRORTRANS (1<<1)
+#define CAPABILITY_ERRORTRANS (1<<0)
 
 #define CAPABILITY_BITS 1