rx: Remove RX_CALL_BUSY
[openafs.git] / src / afs / afs_call.c
index cdafe0f..554da85 100644 (file)
@@ -33,6 +33,7 @@
 #include "h/ksynch.h"
 #include "h/sunddi.h"
 #endif
+#include <hcrypto/rand.h>
 
 #if defined(AFS_SUN5_ENV) || defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV)
 #define        AFS_MINBUFFERS  100
@@ -122,8 +123,6 @@ afs_InitSetup(int preallocs)
 
     memset(afs_zeros, 0, AFS_ZEROS);
 
-    rx_SetBusyChannelError(1);  /* turn on busy call error reporting */
-
     /* start RX */
     if(!afscall_set_rxpck_received)
     rx_extraPackets = AFS_NRXPACKETS;  /* smaller # of packets */
@@ -1054,10 +1053,6 @@ afs_syscall_call(long parm, long parm2, long parm3,
        code = 0;
        AFS_COPYINSTR(AFSKPTR(parm2), tbuffer, AFS_SMALLOCSIZ, &bufferSize,
                      code);
-       if (code) {
-           osi_FreeSmallSpace(tbuffer);
-           goto out;
-       }
        if (!code) {
            tbuffer[AFS_SMALLOCSIZ - 1] = '\0'; /* null-terminate the name */
            /* We have the cache dir copied in.  Call the cache init routine */
@@ -1318,6 +1313,20 @@ afs_syscall_call(long parm, long parm2, long parm3,
     } else if (parm == AFSOP_SET_RMTSYS_FLAG) {
        afs_rmtsys_enable = parm2;
        code = 0;
+#ifndef UKERNEL
+    } else if (parm == AFSOP_SEED_ENTROPY) {
+       unsigned char *seedbuf;
+
+       if (parm3 > 4096) {
+           code = EFAULT;
+       } else {
+           seedbuf = afs_osi_Alloc(parm3);
+           AFS_COPYIN(AFSKPTR(parm2), seedbuf, parm3, code);
+           RAND_seed(seedbuf, parm3);
+           memset(seedbuf, 0, parm3);
+           afs_osi_Free(seedbuf, parm3);
+       }
+#endif
     } else {
        code = EINVAL;
     }