#include <afs/opr.h>
#include <rx/rx_queue.h>
#include <opr/lock.h>
+#include <opr/proc.h>
#include <afs/nfs.h>
#include <afs/afsint.h>
#include <afs/vldbint.h>
tclient = h_FindClient_r(*tconn, &viceid);
if (!tclient) {
H_UNLOCK;
- LogClientError("Client host too busy", *tconn, viceid, Fid);
+ LogClientError("CallPreamble: Couldn't get client", *tconn, viceid, Fid);
return VBUSY;
}
thost = tclient->host;
h_ReleaseClient_r(tclient);
h_Release_r(thost);
H_UNLOCK;
- LogClientError("Cannot get CPS for client", *tconn, viceid, Fid);
+ LogClientError("CallPreamble: Couldn't get CPS", *tconn, viceid, Fid);
return -1001;
}
retry_flag = 0; /* Retry once */
h_ReleaseClient_r(tclient);
h_Release_r(thost);
H_UNLOCK;
- LogClientError("Cannot reconnect to ptserver", *tconn, viceid, Fid);
+ LogClientError("CallPreamble: couldn't reconnect to ptserver", *tconn, viceid, Fid);
return -1001;
}
}
if (InStatus->Mask & AFS_SETMODE) {
int modebits = InStatus->UnixModeBits;
-#define CREATE_SGUID_ADMIN_ONLY 1
#ifdef CREATE_SGUID_ADMIN_ONLY
if (!remote && VanillaUser(client))
modebits = modebits & 0777;
if (seconds <= 0)
seconds = 1;
stats->StoreDataRate = AFSCallStats.TotalStoredBytes / seconds;
-#ifdef AFS_NT40_ENV
- stats->ProcessSize = -1; /* TODO: */
-#else
- stats->ProcessSize = (afs_int32) ((long)sbrk(0) >> 10);
-#endif
+ stats->ProcessSize = opr_procsize();
FS_UNLOCK;
h_GetWorkStats((int *)&(stats->WorkStations),
(int *)&(stats->ActiveWorkStations), (int *)0,
if ((code = CallPreamble(acall, NOTACTIVECALL, NULL, &tcon, &thost)))
goto Bad_GetStatistics64;
+ if (statsVersion != STATS64_VERSION) {
+ code = EINVAL;
+ goto Bad_GetStatistics64;
+ }
+
ViceLog(1, ("SAFS_GetStatistics64 Received\n"));
Statistics->ViceStatistics64_val =
malloc(statsVersion*sizeof(afs_uint64));
seconds = 1;
Statistics->ViceStatistics64_val[STATS64_STOREDATARATE] =
AFSCallStats.TotalStoredBytes / seconds;
-#ifdef AFS_NT40_ENV
- Statistics->ViceStatistics64_val[STATS64_PROCESSSIZE] = -1;
-#else
- Statistics->ViceStatistics64_val[STATS64_PROCESSSIZE] =
- (afs_int32) ((long)sbrk(0) >> 10);
-#endif
+ Statistics->ViceStatistics64_val[STATS64_PROCESSSIZE] = opr_procsize();
FS_UNLOCK;
h_GetWorkStats64(&(Statistics->ViceStatistics64_val[STATS64_WORKSTATIONS]),
&(Statistics->ViceStatistics64_val[STATS64_ACTIVEWORKSTATIONS]),