From: Michael Meffie Date: Thu, 10 Dec 2009 21:13:45 +0000 (-0500) Subject: Prefix global defines X-Git-Tag: openafs-devel-1_5_69~89 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=846f772601114dc57ddba934fbdca2b2f2a4aa31;p=packages%2Fo%2Fopenafs.git Prefix global defines Prefix constants relocated to the common afs_consts.h header to void naming collisions. Change-Id: Ib657e00385002c957b40b36058f260c6cabd108c Reviewed-on: http://gerrit.openafs.org/905 Reviewed-by: Mickey Lane Tested-by: Mickey Lane Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/JAVA/libjafs/ACL.c b/src/JAVA/libjafs/ACL.c index 11fe67fc9..e60166e8b 100644 --- a/src/JAVA/libjafs/ACL.c +++ b/src/JAVA/libjafs/ACL.c @@ -45,7 +45,7 @@ #define MAXINSIZE 1300 /* pioctl complains if data is larger than this */ #define VMSGSIZE 128 /* size of msg buf in volume hdr */ -static char space[MAXSIZE]; +static char space[AFS_PIOCTL_MAXSIZE]; #ifdef DMALLOC #include "dmalloc.h" diff --git a/src/WINNT/afsd/fs.c b/src/WINNT/afsd/fs.c index 6cf53e50f..3fbbe9644 100644 --- a/src/WINNT/afsd/fs.c +++ b/src/WINNT/afsd/fs.c @@ -43,7 +43,7 @@ #define CELL_MAXNAMELEN 256 #define MAXHOSTCHARS 64 -static char space[MAXSIZE]; +static char space[AFS_PIOCTL_MAXSIZE]; static char tspace[1024]; static struct ubik_client *uclient; @@ -271,7 +271,7 @@ IsFreelanceRoot(char *apath) afs_int32 code; blob.in_size = 0; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; code = pioctl_utf8(apath, VIOC_FILE_CELL_NAME, &blob, 1); @@ -712,8 +712,8 @@ QuickPrintSpace(VolumeStatus *status, char *name) static char * AclToString(struct Acl *acl) { - static char mydata[MAXSIZE]; - char tstring[MAXSIZE]; + static char mydata[AFS_PIOCTL_MAXSIZE]; + char tstring[AFS_PIOCTL_MAXSIZE]; char dfsstring[30]; struct AclEntry *tp; @@ -931,7 +931,7 @@ SetACLCmd(struct cmd_syndesc *as, void *arock) clear = 0; plusp = !(as->parms[3].items); for(ti=as->parms[0].items; ti;ti=ti->next) { - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = idf; blob.in = blob.out = space; code = pioctl_utf8(ti->data, VIOCGETAL, &blob, 1); @@ -1071,7 +1071,7 @@ CopyACLCmd(struct cmd_syndesc *as, void *arock) clear=1; else clear=0; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = idf; blob.in = blob.out = space; code = pioctl_utf8(as->parms[0].items->data, VIOCGETAL, &blob, 1); @@ -1088,7 +1088,7 @@ CopyACLCmd(struct cmd_syndesc *as, void *arock) } CleanAcl(fa, as->parms[0].items->data); for (ti=as->parms[1].items; ti;ti=ti->next) { - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = idf; blob.in = blob.out = space; code = pioctl_utf8(ti->data, VIOCGETAL, &blob, 1); @@ -1262,7 +1262,7 @@ CleanACLCmd(struct cmd_syndesc *as, void *arock) SetDotDefault(&as->parms[0].items); for(ti=as->parms[0].items; ti; ti=ti->next) { - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; code = pioctl_utf8(ti->data, VIOCGETAL, &blob, 1); @@ -1356,7 +1356,7 @@ ListACLCmd(struct cmd_syndesc *as, void *arock) SetDotDefault(&as->parms[0].items); for(ti=as->parms[0].items; ti; ti=ti->next) { char separator; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = idf; blob.in = blob.out = space; code = pioctl_utf8(ti->data, VIOCGETAL, &blob, 1); @@ -1532,7 +1532,7 @@ SetVolCmd(struct cmd_syndesc *as, void *arock) { SetDotDefault(&as->parms[0].items); for(ti=as->parms[0].items; ti; ti=ti->next) { /* once per file */ - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = sizeof(*status) + 3; /* for the three terminating nulls */ blob.out = space; blob.in = space; @@ -1694,7 +1694,7 @@ ExamineCmd(struct cmd_syndesc *as, void *arock) } blob.out = space; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; code = pioctl_utf8(ti->data, VIOCGETVOLSTAT, &blob, 1); if (code == 0) { space[blob.out_size - 1] = '\0'; @@ -1747,7 +1747,7 @@ ListQuotaCmd(struct cmd_syndesc *as, void *arock) SetDotDefault(&as->parms[0].items); for(ti=as->parms[0].items; ti; ti=ti->next) { /* once per file */ - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; code = pioctl_utf8(ti->data, VIOCGETVOLSTAT, &blob, 1); @@ -1816,7 +1816,7 @@ WhereIsCmd(struct cmd_syndesc *as, void *arock) error = 1; continue; } - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; memset(space, 0, sizeof(space)); code = pioctl_utf8(ti->data, VIOCWHEREIS, &blob, 1); @@ -1830,7 +1830,7 @@ WhereIsCmd(struct cmd_syndesc *as, void *arock) filetypestr(filetype), ti->data, (hosts[0] && !hosts[1]) ? "": "s"); - for(j=0; jparms[0].items); for(ti=as->parms[0].items; ti; ti=ti->next) { /* once per file */ - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; code = pioctl_utf8(ti->data, VIOCGETVOLSTAT, &blob, 1); @@ -1887,7 +1887,7 @@ QuotaCmd(struct cmd_syndesc *as, void *arock) SetDotDefault(&as->parms[0].items); for(ti=as->parms[0].items; ti; ti=ti->next) { /* once per file */ - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; code = pioctl_utf8(ti->data, VIOCGETVOLSTAT, &blob, 1); @@ -2034,9 +2034,9 @@ ListMountCmd(struct cmd_syndesc *as, void *arock) blob.in = last_component; blob.in_size = (long)strlen(last_component)+1; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; - memset(space, 0, MAXSIZE); + memset(space, 0, AFS_PIOCTL_MAXSIZE); code = pioctl_utf8(parent_dir, VIOC_AFS_STAT_MT_PT, &blob, 1); @@ -2304,7 +2304,7 @@ CheckServersCmd(struct cmd_syndesc *as, void *arock) blob.in_size=sizeof(struct chservinfo); blob.in=(caddr_t)&checkserv; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; memset(space, 0, sizeof(afs_int32)); /* so we assure zero when nothing is copied back */ @@ -2384,7 +2384,7 @@ CheckServersCmd(struct cmd_syndesc *as, void *arock) printf("All servers are running.\n"); } else { printf("These servers unavailable due to network or server problems: "); - for(j=0; j < MAXHOSTS; j++) { + for(j=0; j < AFS_MAXHOSTS; j++) { memcpy(&temp, space + j*sizeof(afs_int32), sizeof(afs_int32)); if (temp == 0) break; @@ -2408,7 +2408,7 @@ MessagesCmd(struct cmd_syndesc *as, void *arock) memset(&gagflags, 0, sizeof(struct gaginfo)); blob.in_size = sizeof(struct gaginfo); blob.in = (caddr_t ) &gagflags; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; memset(space, 0, sizeof(afs_int32)); /* so we assure zero when nothing is copied back */ @@ -2533,7 +2533,7 @@ ListCellsCmd(struct cmd_syndesc *as, void *arock) afs_int32 code; afs_int32 i, j, *lp, magic, size; char *tp; - afs_int32 addr, maxa = OMAXHOSTS; + afs_int32 addr, maxa = AFS_OMAXHOSTS; struct ViceIoctl blob; int resolve; @@ -2546,7 +2546,7 @@ ListCellsCmd(struct cmd_syndesc *as, void *arock) lp = (afs_int32 *)tp; *lp++ = 0x12345678; size = sizeof(afs_int32) + sizeof(afs_int32); - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = sizeof(afs_int32); blob.in = space; blob.out = space; @@ -2560,11 +2560,11 @@ ListCellsCmd(struct cmd_syndesc *as, void *arock) tp = space; memcpy(&magic, tp, sizeof(afs_int32)); if (magic == 0x12345678) { - maxa = MAXHOSTS; + maxa = AFS_MAXHOSTS; tp += sizeof(afs_int32); } printf("Cell %s on hosts", tp+maxa*sizeof(afs_int32)); - for(j=0; j < maxa && j*sizeof(afs_int32) < MAXSIZE; j++) { + for(j=0; j < maxa && j*sizeof(afs_int32) < AFS_PIOCTL_MAXSIZE; j++) { char *name, tbuffer[20]; memcpy(&addr, tp + j*sizeof(afs_int32), sizeof(afs_int32)); @@ -2597,7 +2597,7 @@ ListAliasesCmd(struct cmd_syndesc *as, void *arock) for (i = 0;; i++) { tp = space; memcpy(tp, &i, sizeof(afs_int32)); - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = sizeof(afs_int32); blob.in = space; blob.out = space; @@ -2669,7 +2669,7 @@ NewCellCmd(struct cmd_syndesc *as, void *arock) struct hostent *thp; afs_int32 fsport = 0, vlport = 0; - memset(space, 0, MAXHOSTS * sizeof(afs_int32)); + memset(space, 0, AFS_MAXHOSTS * sizeof(afs_int32)); tp = space; lp = (afs_int32 *)tp; *lp++ = 0x12345678; @@ -2709,13 +2709,13 @@ NewCellCmd(struct cmd_syndesc *as, void *arock) } } #endif - tp = (char *)(space + (MAXHOSTS+1) *sizeof(afs_int32)); + tp = (char *)(space + (AFS_MAXHOSTS+1) *sizeof(afs_int32)); lp = (afs_int32 *)tp; *lp++ = fsport; *lp++ = vlport; *lp = linkedstate; - strcpy(space + ((MAXHOSTS+4) * sizeof(afs_int32)), as->parms[0].items->data); - size = ((MAXHOSTS+4) * sizeof(afs_int32)) + strlen(as->parms[0].items->data) + 1 /* for null */; + strcpy(space + ((AFS_MAXHOSTS+4) * sizeof(afs_int32)), as->parms[0].items->data); + size = ((AFS_MAXHOSTS+4) * sizeof(afs_int32)) + strlen(as->parms[0].items->data) + 1 /* for null */; tp = (char *)(space + size); if (linkedstate) { strcpy(tp, cellname); @@ -2739,7 +2739,7 @@ NewCellCmd(struct cmd_syndesc *as, void *arock) blob.in_size = 0; blob.in = (char *) 0; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; code = pioctl_utf8((char *) 0, VIOCNEWCELL, &blob, 1); @@ -2869,7 +2869,7 @@ WSCellCmd(struct cmd_syndesc *as, void *arock) blob.in_size = 0; blob.in = NULL; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; code = pioctl_utf8(NULL, VIOC_GET_WS_CELL, &blob, 1); @@ -2878,7 +2878,7 @@ WSCellCmd(struct cmd_syndesc *as, void *arock) Die(errno, NULL); return 1; } - space[MAXSIZE - 1] = '\0'; + space[AFS_PIOCTL_MAXSIZE - 1] = '\0'; printf("This workstation belongs to cell '%s'\n", space); return 0; } @@ -2980,14 +2980,14 @@ SysNameCmd(struct cmd_syndesc *as, void *arock) blob.in = space; blob.out = space; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = sizeof(afs_int32); memcpy(input, &setp, sizeof(afs_int32)); input += sizeof(afs_int32); for (; ti; ti = ti->next) { setp++; blob.in_size += (long)strlen(ti->data) + 1; - if (blob.in_size > MAXSIZE) { + if (blob.in_size > AFS_PIOCTL_MAXSIZE) { fprintf(stderr, "%s: sysname%s too long.\n", pn, setp > 1 ? "s" : ""); return 1; @@ -3464,7 +3464,7 @@ SetPrefCmd(struct cmd_syndesc *as, void * arock) gblob.in_size = (long)(((char*)&(ssp->servers[0])) - (char *)ssp); gblob.in = space; gblob.out = space; - gblob.out_size = MAXSIZE; + gblob.out_size = AFS_PIOCTL_MAXSIZE; if ( !IsAdmin() ) { fprintf (stderr,"Permission denied: requires AFS Client Administrator access.\n"); @@ -3556,7 +3556,7 @@ SetPrefCmd(struct cmd_syndesc *as, void *arock) gblob.in_size = ((char *)&(ssp->servers[0])) - (char *)ssp; gblob.in = space; gblob.out = space; - gblob.out_size = MAXSIZE; + gblob.out_size = AFS_PIOCTL_MAXSIZE; if (geteuid()) { @@ -3682,9 +3682,9 @@ GetPrefCmd(struct cmd_syndesc *as, void *arock) blob.in_size=sizeof(struct cm_SPrefRequest); blob.in = (char *)in; blob.out = space; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; - in->num_servers = (MAXSIZE - 2*sizeof(short))/sizeof(struct cm_SPref); + in->num_servers = (AFS_PIOCTL_MAXSIZE - 2*sizeof(short))/sizeof(struct cm_SPref); in->flags = vlservers; code = pioctl_utf8(0, VIOC_GETSPREFS, &blob, 1); @@ -3753,10 +3753,10 @@ GetPrefCmd(struct cmd_syndesc *as, void *arock) blob.in_size = sizeof(struct sprefrequest); blob.in = (char *)in; blob.out = space; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; in->num_servers = - (MAXSIZE - 2 * sizeof(short)) / sizeof(struct spref); + (AFS_PIOCTL_MAXSIZE - 2 * sizeof(short)) / sizeof(struct spref); in->flags = vlservers; code = pioctl_utf8(0, VIOC_GETSPREFS, &blob, 1); @@ -4396,10 +4396,10 @@ GetClientAddrsCmd(struct cmd_syndesc *as, void *arock) blob.in_size = sizeof(struct sprefrequest); blob.in = (char *)in; blob.out = space; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; in->num_servers = - (MAXSIZE - 2 * sizeof(short)) / sizeof(struct spref); + (AFS_PIOCTL_MAXSIZE - 2 * sizeof(short)) / sizeof(struct spref); /* returns addr in network byte order */ code = pioctl_utf8(0, VIOC_GETCPREFS, &blob, 1); if (code) { @@ -4442,7 +4442,7 @@ SetClientAddrsCmd(struct cmd_syndesc *as, void *arock) ssp->num_servers = 0; blob.in = space; blob.out = space; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; if (geteuid()) { fprintf(stderr, "Permission denied: requires root access.\n"); @@ -4599,7 +4599,7 @@ FlushMountCmd(struct cmd_syndesc *as, void *arock) blob.in = last_component; blob.in_size = strlen(last_component) + 1; blob.out_size = 0; - memset(space, 0, MAXSIZE); + memset(space, 0, AFS_PIOCTL_MAXSIZE); code = pioctl_utf8(parent_dir, VIOC_AFS_FLUSHMOUNT, &blob, 1); diff --git a/src/WINNT/afsd/symlink.c b/src/WINNT/afsd/symlink.c index ad8501629..43f0bf7ed 100644 --- a/src/WINNT/afsd/symlink.c +++ b/src/WINNT/afsd/symlink.c @@ -32,7 +32,7 @@ #define MAXNAME 100 #define MAXINSIZE 1300 /* pioctl complains if data is larger than this */ -static char space[MAXSIZE]; +static char space[AFS_PIOCTL_MAXSIZE]; static char tspace[1024]; #ifndef WIN32 @@ -68,7 +68,7 @@ static int InAFS(char *apath) afs_int32 code; blob.in_size = 0; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; code = pioctl_utf8(apath, VIOC_FILE_CELL_NAME, &blob, 1); @@ -86,7 +86,7 @@ IsFreelanceRoot(char *apath) afs_int32 code; blob.in_size = 0; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; code = pioctl_utf8(apath, VIOC_FILE_CELL_NAME, &blob, 1); @@ -398,9 +398,9 @@ static ListLinkCmd(struct cmd_syndesc *as, void *arock) } blob.in = last_component; blob.in_size = (long)strlen(last_component)+1; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; - memset(space, 0, MAXSIZE); + memset(space, 0, AFS_PIOCTL_MAXSIZE); code = pioctl_utf8(parent_dir, VIOC_LISTSYMLINK, &blob, 1); diff --git a/src/WINNT/client_exp/gui2fs.cpp b/src/WINNT/client_exp/gui2fs.cpp index 9c6b52763..f3f64bf46 100644 --- a/src/WINNT/client_exp/gui2fs.cpp +++ b/src/WINNT/client_exp/gui2fs.cpp @@ -61,7 +61,7 @@ extern "C" { #define MAXHOSTCHARS 64 #define MAXHOSTSPERCELL 8 -static char space[MAXSIZE]; +static char space[AFS_PIOCTL_MAXSIZE]; static char tspace[1024]; static struct ubik_client *uclient; @@ -271,7 +271,7 @@ void WhichCell(CStringArray& files) for (int i = 0; i < files.GetSize(); i++) { blob.in_size = 0; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; code = pioctl_T(files[i], VIOC_FILE_CELL_NAME, &blob, 1); @@ -282,7 +282,7 @@ void WhichCell(CStringArray& files) } else results.Add(GetAfsError(errno)); } else { - space[MAXSIZE - 1] = '\0'; + space[AFS_PIOCTL_MAXSIZE - 1] = '\0'; results.Add(Utf8ToCString(space)); } } @@ -303,7 +303,7 @@ void WSCellCmd() blob.in_size = 0; blob.in = (char *) 0; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; code = pioctl((char *) 0, VIOC_GET_WS_CELL, &blob, 1); @@ -363,7 +363,7 @@ void WhereIs(CStringArray& files) HOURGLASS hourglass; for (int i = 0; i < files.GetSize(); i++) { - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; memset(space, 0, sizeof(space)); @@ -379,7 +379,7 @@ void WhereIs(CStringArray& files) BOOL bFirst = TRUE; str = ""; - for (int j = 0; j < MAXHOSTS; j++) { + for (int j = 0; j < AFS_MAXHOSTS; j++) { if (hosts[j] == 0) break; char *hostName = hostutil_GetNameByINet(hosts[j]); @@ -606,8 +606,8 @@ CString GetRightsString(LONG arights, int dfs) char *AclToString(struct Acl *acl) { - static char mydata[MAXSIZE]; - char tstring[MAXSIZE]; + static char mydata[AFS_PIOCTL_MAXSIZE]; + char tstring[AFS_PIOCTL_MAXSIZE]; char dfsstring[30]; struct AclEntry *tp; @@ -807,7 +807,7 @@ void CleanACL(CStringArray& names) HOURGLASS hourglass; for (int i = 0; i < names.GetSize(); i++) { - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; @@ -861,7 +861,7 @@ BOOL GetRights(const CString& strDir, CStringArray& strNormal, CStringArray& str HOURGLASS hourglass; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = idf; blob.in = blob.out = space; @@ -1057,7 +1057,7 @@ BOOL CopyACL(const CString& strToDir, const CStringArray& normal, const CStringA HOURGLASS hourglass; // Get ACL to copy to - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = idf; blob.in = blob.out = space; @@ -1188,7 +1188,7 @@ IsFreelanceRoot(const CString& apath) afs_int32 code; blob.in_size = 0; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; code = pioctl_T(apath, VIOC_FILE_CELL_NAME, &blob, 1); @@ -1469,9 +1469,9 @@ BOOL ListMount(CStringArray& files) blob.in_size = last_component.GetLength() + 1; blob.in = last_component.GetBuffer(); - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; - memset(space, 0, MAXSIZE); + memset(space, 0, AFS_PIOCTL_MAXSIZE); code = pioctl_T(parent_dir, VIOC_AFS_STAT_MT_PT, &blob, 1); @@ -1479,7 +1479,7 @@ BOOL ListMount(CStringArray& files) if (code == 0) { int nPos; - space[MAXSIZE - 1] = '\0'; + space[AFS_PIOCTL_MAXSIZE - 1] = '\0'; nPos = strlen(space) - 1; if (space[nPos] == '.') space[nPos] = 0; @@ -1638,9 +1638,9 @@ BOOL IsSymlink(const CString& strName) blob.in_size = ustrLast.GetLength() + 1; blob.in = ustrLast.GetBuffer(); - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; - memset(space, 0, MAXSIZE); + memset(space, 0, AFS_PIOCTL_MAXSIZE); code = pioctl_T(strParent, VIOC_LISTSYMLINK, &blob, 1); @@ -1761,7 +1761,7 @@ BOOL GetVolumeInfo(CString strFile, CVolInfo& volInfo) return TRUE; */ - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; @@ -1795,7 +1795,7 @@ BOOL SetVolInfo(CVolInfo& volInfo) HOURGLASS hourglass; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = sizeof(*status) + 3; /* for the three terminating nulls */ blob.out = space; blob.in = space; @@ -1855,7 +1855,7 @@ BOOL CheckServers(const CString& strCellName, WHICH_CELLS nCellsToCheck, BOOL bF blob.in_size = sizeof(struct chservinfo); blob.in = (caddr_t)&checkserv; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; memset(space, 0, sizeof(afs_int32)); /* so we assure zero when nothing is copied back */ @@ -1891,7 +1891,7 @@ BOOL CheckServers(const CString& strCellName, WHICH_CELLS nCellsToCheck, BOOL bF } CStringArray servers; - for (j = 0; j < MAXHOSTS; j++) { + for (j = 0; j < AFS_MAXHOSTS; j++) { memcpy(&temp, space + j * sizeof(LONG), sizeof(LONG)); if (temp == 0) break; @@ -2094,9 +2094,9 @@ void ListSymbolicLinkPath(const char *strName,char *strPath,UINT nlenPath) } blob.in = last_component; blob.in_size = strlen(last_component)+1; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; - memset(space, 0, MAXSIZE); + memset(space, 0, AFS_PIOCTL_MAXSIZE); if ((code = pioctl(parent_dir, VIOC_LISTSYMLINK, &blob, 1))) strcpy(space,"???"); ASSERT(strlen(space)%s #(%d/%d)\n", tc->cellName, tc->cellNum, tc->cellIndex); - for (j = 0; j < MAXCELLHOSTS; j++) { + for (j = 0; j < AFS_MAXCELLHOSTS; j++) { afs_uint32 addr; if (!tc->cellHosts[j]) break; @@ -282,7 +282,7 @@ length) } } - for (cnt = 0; cnt < MAXCELLHOSTS; cnt++) { + for (cnt = 0; cnt < AFS_MAXCELLHOSTS; cnt++) { if (!tc->cellHosts[cnt]) break; pos += 90; if (pos <= offset) { diff --git a/src/afs/LINUX24/osi_proc.c b/src/afs/LINUX24/osi_proc.c index 6e370be17..4beed2a29 100644 --- a/src/afs/LINUX24/osi_proc.c +++ b/src/afs/LINUX24/osi_proc.c @@ -89,7 +89,7 @@ static int c_show(struct seq_file *m, void *p) seq_printf(m, ">%s #(%d/%d)\n", tc->cellName, tc->cellNum, tc->cellIndex); - for (j = 0; j < MAXCELLHOSTS; j++) { + for (j = 0; j < AFS_MAXCELLHOSTS; j++) { afs_uint32 addr; if (!tc->cellHosts[j]) break; @@ -282,7 +282,7 @@ length) } } - for (cnt = 0; cnt < MAXCELLHOSTS; cnt++) { + for (cnt = 0; cnt < AFS_MAXCELLHOSTS; cnt++) { if (!tc->cellHosts[cnt]) break; pos += 90; if (pos <= offset) { diff --git a/src/afs/afs.h b/src/afs/afs.h index 3685d53b3..7bd2e4e99 100644 --- a/src/afs/afs.h +++ b/src/afs/afs.h @@ -239,7 +239,7 @@ struct vrequest { char permWriteError; /* fileserver returns permenent error. */ char tokenError; /* a token error other than expired. */ char idleError; /* the server idled too long */ - char skipserver[MAXHOSTS]; + char skipserver[AFS_MAXHOSTS]; }; #define VOLMISSING 1 #define VOLBUSY 2 @@ -272,7 +272,7 @@ struct cell { char *cellName; /* char string name of cell */ afs_int32 cellIndex; /* sequence number */ afs_int32 cellNum; /* semi-permanent cell number */ - struct server *cellHosts[MAXCELLHOSTS]; /* volume *location* hosts */ + struct server *cellHosts[AFS_MAXCELLHOSTS]; /* volume *location* hosts */ struct cell *lcellp; /* Associated linked cell */ u_short fsport; /* file server port */ u_short vlport; /* volume server port */ @@ -513,8 +513,8 @@ struct volume { afs_rwlock_t lock; /* the lock for this structure */ afs_int32 volume; /* This volume's ID number. */ char *name; /* This volume's name, or 0 if unknown */ - struct server *serverHost[MAXHOSTS]; /* servers serving this volume */ - enum repstate status[MAXHOSTS]; /* busy, offline, etc */ + struct server *serverHost[AFS_MAXHOSTS]; /* servers serving this volume */ + enum repstate status[AFS_MAXHOSTS]; /* busy, offline, etc */ struct VenusFid dotdot; /* dir to access as .. */ struct VenusFid mtpoint; /* The mount point for this volume. */ afs_int32 rootVnode, rootUnique; /* Volume's root fid */ diff --git a/src/afs/afs_analyze.c b/src/afs/afs_analyze.c index 4f56c2530..076c2e125 100644 --- a/src/afs/afs_analyze.c +++ b/src/afs/afs_analyze.c @@ -248,7 +248,7 @@ afs_BlackListOnce(struct vrequest *areq, struct VenusFid *afid, if (afid) { tvp = afs_FindVolume(afid, READ_LOCK); if (tvp) { - for (i = 0; i < MAXHOSTS; i++) { + for (i = 0; i < AFS_MAXHOSTS; i++) { if (tvp->serverHost[i] == tsp) { areq->skipserver[i] = 1; } @@ -259,7 +259,7 @@ afs_BlackListOnce(struct vrequest *areq, struct VenusFid *afid, } } afs_PutVolume(tvp, READ_LOCK); - for (i = 0; i < MAXHOSTS; i++) { + for (i = 0; i < AFS_MAXHOSTS; i++) { if (tvp->serverHost[i] && areq->skipserver[i] == 0) { serversleft = 1; break; @@ -356,7 +356,7 @@ afs_Analyze(register struct afs_conn *aconn, afs_int32 acode, && tvp->serverHost[0]->cell) ? tvp->serverHost[0]-> cell->cellName : "")); - for (i = 0; i < MAXHOSTS; i++) { + for (i = 0; i < AFS_MAXHOSTS; i++) { if (tvp->status[i] != not_busy && tvp->status[i] != offline) { tvp->status[i] = not_busy; } @@ -435,7 +435,7 @@ afs_Analyze(register struct afs_conn *aconn, afs_int32 acode, if (areq->volumeError) { tvp = afs_FindVolume(afid, READ_LOCK); if (tvp) { - for (i = 0; i < MAXHOSTS; i++) { + for (i = 0; i < AFS_MAXHOSTS; i++) { if (tvp->serverHost[i] == tsp) { tvp->status[i] = not_busy; } @@ -495,7 +495,7 @@ afs_Analyze(register struct afs_conn *aconn, afs_int32 acode, tvp = afs_FindVolume(afid, READ_LOCK); if (tvp) { - for (i = 0; i < MAXHOSTS; i++) { + for (i = 0; i < AFS_MAXHOSTS; i++) { if (tvp->serverHost[i] == tsp) { tvp->status[i] = rdwr_busy; /* can't tell which yet */ /* to tell which, have to look at the op code. */ @@ -601,7 +601,7 @@ afs_Analyze(register struct afs_conn *aconn, afs_int32 acode, same = VLDB_Same(afid, areq); tvp = afs_FindVolume(afid, READ_LOCK); if (tvp) { - for (i = 0; i < MAXHOSTS && tvp->serverHost[i]; i++) { + for (i = 0; i < AFS_MAXHOSTS && tvp->serverHost[i]; i++) { if (tvp->serverHost[i] == tsp) { if (tvp->status[i] == end_not_busy) tvp->status[i] = offline; diff --git a/src/afs/afs_call.c b/src/afs/afs_call.c index d438b21c2..a19ac024c 100644 --- a/src/afs/afs_call.c +++ b/src/afs/afs_call.c @@ -39,7 +39,7 @@ #endif struct afsop_cell { - afs_int32 hosts[MAXCELLHOSTS]; + afs_int32 hosts[AFS_MAXCELLHOSTS]; char cellName[100]; }; diff --git a/src/afs/afs_callback.c b/src/afs/afs_callback.c index 1bfaf1edc..b80643d54 100644 --- a/src/afs/afs_callback.c +++ b/src/afs/afs_callback.c @@ -782,7 +782,7 @@ SRXAFSCB_InitCallBackState(struct rx_call *a_call) for (i = 0; i < NVOLS; i++) for (tv = afs_volumes[i]; tv; tv = tv->next) { - for (j = 0; j < MAXHOSTS; j++) + for (j = 0; j < AFS_MAXHOSTS; j++) if (tv->serverHost[j] == ts) afs_ResetVolumeInfo(tv); } diff --git a/src/afs/afs_cbqueue.c b/src/afs/afs_cbqueue.c index d963b9683..fe49cc7bd 100644 --- a/src/afs/afs_cbqueue.c +++ b/src/afs/afs_cbqueue.c @@ -212,7 +212,7 @@ afs_CheckCallbacks(unsigned int secs) tvc->cbExpires = tvp->expireTime; /* XXX race here */ } else { int i; - for (i = 0; i < MAXHOSTS && tvp->serverHost[i]; i++) { + for (i = 0; i < AFS_MAXHOSTS && tvp->serverHost[i]; i++) { if (!(tvp->serverHost[i]->flags & SRVR_ISDOWN)) { /* What about locking xvcache or vrefcount++ or * write locking tvc? */ diff --git a/src/afs/afs_cell.c b/src/afs/afs_cell.c index f44cb2f5d..1ac049f6e 100644 --- a/src/afs/afs_cell.c +++ b/src/afs/afs_cell.c @@ -75,7 +75,7 @@ int afs_AFSDBHandler(char *acellName, int acellNameLen, afs_int32 * kernelMsg) { afs_int32 timeout, code; - afs_int32 cellHosts[MAXCELLHOSTS]; + afs_int32 cellHosts[AFS_MAXCELLHOSTS]; if (afsdb_handler_shutdown) return -2; @@ -91,7 +91,7 @@ afs_AFSDBHandler(char *acellName, int acellNameLen, afs_int32 * kernelMsg) if (timeout) timeout += osi_Time(); - for (i = 0; i < MAXCELLHOSTS; i++) { + for (i = 0; i < AFS_MAXCELLHOSTS; i++) { if (i >= hostCount) cellHosts[i] = 0; else @@ -943,7 +943,7 @@ afs_NewCell(char *acellName, afs_int32 * acellHosts, int aflags, /* we don't want to keep pinging old vlservers which were down, * since they don't matter any more. It's easier to do this than * to remove the server from its various hash tables. */ - for (i = 0; i < MAXCELLHOSTS; i++) { + for (i = 0; i < AFS_MAXCELLHOSTS; i++) { if (!tc->cellHosts[i]) break; tc->cellHosts[i]->flags &= ~SRVR_ISDOWN; @@ -976,7 +976,7 @@ afs_NewCell(char *acellName, afs_int32 * acellHosts, int aflags, tc->timeout = timeout; memset(tc->cellHosts, 0, sizeof(tc->cellHosts)); - for (i = 0; i < MAXCELLHOSTS; i++) { + for (i = 0; i < AFS_MAXCELLHOSTS; i++) { /* Get server for each host and link this cell in.*/ struct server *ts; afs_uint32 temp = acellHosts[i]; @@ -989,7 +989,7 @@ afs_NewCell(char *acellName, afs_int32 * acellHosts, int aflags, tc->cellHosts[i] = ts; afs_PutServer(ts, WRITE_LOCK); } - afs_SortServers(tc->cellHosts, MAXCELLHOSTS); /* randomize servers */ + afs_SortServers(tc->cellHosts, AFS_MAXCELLHOSTS); /* randomize servers */ /* New cell: Build and add to LRU cell queue. */ if (newc) { @@ -1100,7 +1100,7 @@ afs_RemoveCellEntry(struct server *srvp) /* Remove the server structure from the cell list - if there */ ObtainWriteLock(&tc->lock, 200); - for (j = k = 0; j < MAXCELLHOSTS; j++) { + for (j = k = 0; j < AFS_MAXCELLHOSTS; j++) { if (!tc->cellHosts[j]) break; if (tc->cellHosts[j] != srvp) { @@ -1110,7 +1110,7 @@ afs_RemoveCellEntry(struct server *srvp) if (k == 0) { /* What do we do if we remove the last one? */ } - for (; k < MAXCELLHOSTS; k++) { + for (; k < AFS_MAXCELLHOSTS; k++) { tc->cellHosts[k] = 0; } ReleaseWriteLock(&tc->lock); diff --git a/src/afs/afs_conn.c b/src/afs/afs_conn.c index 3bc2300b5..0660cb139 100644 --- a/src/afs/afs_conn.c +++ b/src/afs/afs_conn.c @@ -106,7 +106,7 @@ afs_Conn(register struct VenusFid *afid, register struct vrequest *areq, * in this time). */ for (notbusy = not_busy; (!lowp && (notbusy <= end_not_busy)); notbusy++) { - for (i = 0; i < MAXHOSTS && tv->serverHost[i]; i++) { + for (i = 0; i < AFS_MAXHOSTS && tv->serverHost[i]; i++) { if (((areq->tokenError > 0)||(areq->idleError > 0)) && (areq->skipserver[i] == 1)) continue; @@ -368,7 +368,7 @@ afs_ConnByMHosts(struct server *ahosts[], unsigned short aport, /* try to find any connection from the set */ AFS_STATCNT(afs_ConnByMHosts); - for (i = 0; i < MAXCELLHOSTS; i++) { + for (i = 0; i < AFS_MAXCELLHOSTS; i++) { if ((ts = ahosts[i]) == NULL) break; tconn = afs_ConnByHost(ts, aport, acell, areq, 0, locktype); diff --git a/src/afs/afs_consts.h b/src/afs/afs_consts.h index 14e2635a6..363d6b257 100644 --- a/src/afs/afs_consts.h +++ b/src/afs/afs_consts.h @@ -10,10 +10,10 @@ #ifndef _AFS_CONSTS_H_ #define _AFS_CONSTS_H_ -#define MAXHOSTS 13 /* max hosts per single volume */ -#define OMAXHOSTS 8 /* backwards compatibility */ -#define MAXCELLHOSTS 8 /* max vldb servers per cell */ +#define AFS_MAXHOSTS 13 /* max hosts per single volume */ +#define AFS_OMAXHOSTS 8 /* backwards compatibility */ +#define AFS_MAXCELLHOSTS 8 /* max vldb servers per cell */ -#define MAXSIZE 2048 /* max returned from PIOCTL */ +#define AFS_PIOCTL_MAXSIZE 2048 /* max returned from PIOCTL */ #endif /* _AFS_CONSTS_H_ */ diff --git a/src/afs/afs_dynroot.c b/src/afs/afs_dynroot.c index 666176442..0f0d84b11 100644 --- a/src/afs/afs_dynroot.c +++ b/src/afs/afs_dynroot.c @@ -87,7 +87,7 @@ static int afs_dynrootCellInit(void) { if (!afs_dynrootCell) { - afs_int32 cellHosts[MAXCELLHOSTS]; + afs_int32 cellHosts[AFS_MAXCELLHOSTS]; struct cell *tc; int code; diff --git a/src/afs/afs_error.c b/src/afs/afs_error.c index ea88d1efd..e2c84bd53 100644 --- a/src/afs/afs_error.c +++ b/src/afs/afs_error.c @@ -212,7 +212,7 @@ afs_CopyError(register struct vrequest *afrom, register struct vrequest *ato) if (!afrom->initd) return; afs_FinalizeReq(ato); - while (i < MAXHOSTS) { + while (i < AFS_MAXHOSTS) { ato->skipserver[i] = afrom->skipserver[i]; i++; } @@ -238,7 +238,7 @@ afs_FinalizeReq(register struct vrequest *areq) AFS_STATCNT(afs_FinalizeReq); if (areq->initd) return; - while (i < MAXHOSTS) { + while (i < AFS_MAXHOSTS) { areq->skipserver[i] = 0; i++; } diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index c8ff43eeb..3601aad05 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -2282,14 +2282,14 @@ DECL_PIOCTL(PFindVolume) tvp = afs_GetVolume(&avc->f.fid, areq, READ_LOCK); if (tvp) { cp = aout; - for (i = 0; i < MAXHOSTS; i++) { + for (i = 0; i < AFS_MAXHOSTS; i++) { ts = tvp->serverHost[i]; if (!ts) break; memcpy(cp, (char *)&ts->addr->sa_ip, sizeof(afs_int32)); cp += sizeof(afs_int32); } - if (i < MAXHOSTS) { + if (i < AFS_MAXHOSTS) { /* still room for terminating NULL, add it on */ ainSize = 0; /* reuse vbl */ memcpy(cp, (char *)&ainSize, sizeof(afs_int32)); @@ -2553,7 +2553,7 @@ DECL_PIOCTL(PRemoveCallBack) DECL_PIOCTL(PNewCell) { /* create a new cell */ - afs_int32 cellHosts[MAXCELLHOSTS], *lp, magic = 0; + afs_int32 cellHosts[AFS_MAXCELLHOSTS], *lp, magic = 0; char *newcell = 0, *linkedcell = 0, *tp = ain; register afs_int32 code, linkedstate = 0, ls; u_short fsport = 0, vlport = 0; @@ -2571,16 +2571,16 @@ DECL_PIOCTL(PNewCell) if (magic != 0x12345678) return EINVAL; - /* A 3.4 fs newcell command will pass an array of MAXCELLHOSTS + /* A 3.4 fs newcell command will pass an array of AFS_MAXCELLHOSTS * server addresses while the 3.5 fs newcell command passes - * MAXHOSTS. To figure out which is which, check if the cellname + * AFS_MAXHOSTS. To figure out which is which, check if the cellname * is good. */ - newcell = tp + (MAXCELLHOSTS + 3) * sizeof(afs_int32); - scount = ((newcell[0] != '\0') ? MAXCELLHOSTS : MAXHOSTS); + newcell = tp + (AFS_MAXCELLHOSTS + 3) * sizeof(afs_int32); + scount = ((newcell[0] != '\0') ? AFS_MAXCELLHOSTS : AFS_MAXHOSTS); - /* MAXCELLHOSTS (=8) is less than MAXHOSTS (=13) */ - memcpy((char *)cellHosts, tp, MAXCELLHOSTS * sizeof(afs_int32)); + /* AFS_MAXCELLHOSTS (=8) is less than AFS_MAXHOSTS (=13) */ + memcpy((char *)cellHosts, tp, AFS_MAXCELLHOSTS * sizeof(afs_int32)); tp += (scount * sizeof(afs_int32)); lp = (afs_int32 *) tp; @@ -2655,15 +2655,15 @@ DECL_PIOCTL(PListCells) tcell = afs_GetCellByIndex(whichCell, READ_LOCK); if (tcell) { cp = aout; - memset(cp, 0, MAXCELLHOSTS * sizeof(afs_int32)); - for (i = 0; i < MAXCELLHOSTS; i++) { + memset(cp, 0, AFS_MAXCELLHOSTS * sizeof(afs_int32)); + for (i = 0; i < AFS_MAXCELLHOSTS; i++) { if (tcell->cellHosts[i] == 0) break; memcpy(cp, (char *)&tcell->cellHosts[i]->addr->sa_ip, sizeof(afs_int32)); cp += sizeof(afs_int32); } - cp = aout + MAXCELLHOSTS * sizeof(afs_int32); + cp = aout + AFS_MAXCELLHOSTS * sizeof(afs_int32); strcpy(cp, tcell->cellName); cp += strlen(tcell->cellName) + 1; *aoutSize = cp - aout; @@ -3340,7 +3340,7 @@ ReSortCells_cb(struct cell *cell, void *arg) for (i = 0; i < s; i++) { if (l[i] == cell->cellNum) { ObtainWriteLock(&cell->lock, 690); - afs_SortServers(cell->cellHosts, MAXCELLHOSTS); + afs_SortServers(cell->cellHosts, AFS_MAXCELLHOSTS); ReleaseWriteLock(&cell->lock); } } @@ -3371,7 +3371,7 @@ ReSortCells(int s, afs_int32 * l, int vlonly) for (k = 0; k < s; k++) if (j->cell == l[k]) { ObtainWriteLock(&j->lock, 233); - afs_SortServers(j->serverHost, MAXHOSTS); + afs_SortServers(j->serverHost, AFS_MAXHOSTS); ReleaseWriteLock(&j->lock); break; } diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index c543ff367..edb97da7f 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -410,7 +410,7 @@ afs_FlushVCBs(afs_int32 lockit) cbArray.AFSCBs_val = callBacks; memset(&callBacks[0], 0, sizeof(callBacks[0])); callBacks[0].CallBackType = CB_EXCLUSIVE; - for (safety3 = 0; safety3 < MAXHOSTS * 2; safety3++) { + for (safety3 = 0; safety3 < AFS_MAXHOSTS * 2; safety3++) { tc = afs_ConnByHost(tsp, tsp->cell->fsport, tsp->cell->cellNum, &treq, 0, SHARED_LOCK); diff --git a/src/afs/afs_volume.c b/src/afs/afs_volume.c index 82ca46de9..387fd7be5 100644 --- a/src/afs/afs_volume.c +++ b/src/afs/afs_volume.c @@ -229,7 +229,7 @@ afs_ResetVolumes(struct server *srvp) /* Find any volumes residing on this server and flush their state */ for (j = 0; j < NVOLS; j++) { for (vp = afs_volumes[j]; vp; vp = vp->next) { - for (k = 0; k < MAXHOSTS; k++) { + for (k = 0; k < AFS_MAXHOSTS; k++) { if (!srvp || (vp->serverHost[k] == srvp)) { vp->serverHost[k] = 0; afs_ResetVolumeInfo(vp); @@ -292,7 +292,7 @@ afs_CheckVolumeNames(int flags) } /* ??? */ if (flags & (AFS_VOLCHECK_BUSY | AFS_VOLCHECK_FORCE)) { - for (j = 0; j < MAXHOSTS; j++) + for (j = 0; j < AFS_MAXHOSTS; j++) tv->status[j] = not_busy; } @@ -768,7 +768,7 @@ afs_NewVolumeByName(char *aname, afs_int32 acell, int agood, int i; struct server *sp; struct srvAddr *sap; - for (i = 0; i < MAXCELLHOSTS; i++) { + for (i = 0; i < AFS_MAXCELLHOSTS; i++) { if ((sp = tcell->cellHosts[i]) == NULL) break; for (sap = sp->addr; sap; sap = sap->next_sa) @@ -872,7 +872,7 @@ InstallVolumeEntry(struct volume *av, struct vldbentry *ve, int acell) * struct, we don't deadlock trying to afs_ResetVolumeInfo() * this volume. */ - for (j = 0; j < MAXHOSTS; j++) { + for (j = 0; j < AFS_MAXHOSTS; j++) { av->serverHost[j] = 0; } @@ -901,10 +901,10 @@ InstallVolumeEntry(struct volume *av, struct vldbentry *ve, int acell) afs_PutServer(ts, WRITE_LOCK); j++; } - if (j < MAXHOSTS) { + if (j < AFS_MAXHOSTS) { av->serverHost[j++] = 0; } - afs_SortServers(av->serverHost, MAXHOSTS); + afs_SortServers(av->serverHost, AFS_MAXHOSTS); } /*InstallVolumeEntry */ @@ -950,7 +950,7 @@ InstallNVolumeEntry(struct volume *av, struct nvldbentry *ve, int acell) * struct, we don't deadlock trying to afs_ResetVolumeInfo() * this volume. */ - for (j = 0; j < MAXHOSTS; j++) { + for (j = 0; j < AFS_MAXHOSTS; j++) { av->serverHost[j] = 0; } @@ -978,10 +978,10 @@ InstallNVolumeEntry(struct volume *av, struct nvldbentry *ve, int acell) afs_PutServer(ts, WRITE_LOCK); j++; } - if (j < MAXHOSTS) { + if (j < AFS_MAXHOSTS) { av->serverHost[j++] = 0; } - afs_SortServers(av->serverHost, MAXHOSTS); + afs_SortServers(av->serverHost, AFS_MAXHOSTS); } /*InstallNVolumeEntry */ @@ -1030,7 +1030,7 @@ InstallUVolumeEntry(struct volume *av, struct uvldbentry *ve, int acell, * struct, we don't deadlock trying to afs_ResetVolumeInfo() * this volume. */ - for (j = 0; j < MAXHOSTS; j++) { + for (j = 0; j < AFS_MAXHOSTS; j++) { av->serverHost[j] = 0; } @@ -1119,7 +1119,7 @@ InstallUVolumeEntry(struct volume *av, struct uvldbentry *ve, int acell, j++; } - afs_SortServers(av->serverHost, MAXHOSTS); + afs_SortServers(av->serverHost, AFS_MAXHOSTS); } /*InstallVolumeEntry */ @@ -1136,7 +1136,7 @@ afs_ResetVolumeInfo(struct volume *tv) AFS_STATCNT(afs_ResetVolumeInfo); ObtainWriteLock(&tv->lock, 117); tv->states |= VRecheck; - for (i = 0; i < MAXHOSTS; i++) + for (i = 0; i < AFS_MAXHOSTS; i++) tv->status[i] = not_busy; if (tv->name) { afs_osi_Free(tv->name, strlen(tv->name) + 1); diff --git a/src/kauth/kkids.c b/src/kauth/kkids.c index 10361eff6..6e5357302 100644 --- a/src/kauth/kkids.c +++ b/src/kauth/kkids.c @@ -210,10 +210,10 @@ InAFS(register char *apath) { struct ViceIoctl blob; register afs_int32 code; - char space[MAXSIZE]; + char space[AFS_PIOCTL_MAXSIZE]; blob.in_size = 0; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; code = pioctl(apath, VIOC_FILE_CELL_NAME, &blob, 1); @@ -318,7 +318,7 @@ is_secure(char *dir) if (!InAFS(dir)) continue; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; code = pioctl(dir, VIOCGETAL, &blob, 1); diff --git a/src/kauth/test/test_interim_ktc.c b/src/kauth/test/test_interim_ktc.c index e96d7e67b..fc2c7089f 100644 --- a/src/kauth/test/test_interim_ktc.c +++ b/src/kauth/test/test_interim_ktc.c @@ -305,12 +305,12 @@ ListCellsCmd() long i, j; char *tcp; long clear; - char space[MAXSIZE]; + char space[AFS_PIOCTL_MAXSIZE]; struct ViceIoctl blob; for (i = 0; i < 1000; i++) { char *cellname; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = sizeof(long); blob.in = space; blob.out = space; @@ -366,8 +366,8 @@ char * AclToString(acl) struct Acl *acl; { - static char mydata[MAXSIZE]; - char tstring[MAXSIZE]; + static char mydata[AFS_PIOCTL_MAXSIZE]; + char tstring[AFS_PIOCTL_MAXSIZE]; struct AclEntry *tp; sprintf(mydata, "%d\n%d\n", acl->nplus, acl->nminus); for (tp = acl->pluslist; tp; tp = tp->next) { @@ -485,9 +485,9 @@ AddTester(pathname) register long code; struct ViceIoctl blob; struct Acl *al; - char space[MAXSIZE]; + char space[AFS_PIOCTL_MAXSIZE]; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; code = pioctl(pathname, VIOCGETAL, &blob, 1); diff --git a/src/sys/rmtsysnet.c b/src/sys/rmtsysnet.c index 097e941c0..61fe51ef5 100644 --- a/src/sys/rmtsysnet.c +++ b/src/sys/rmtsysnet.c @@ -128,7 +128,7 @@ RParseAcl(char *astr) void RAclToString(struct Acl *acl, char *mydata, int ntoh_conv) { - char tstring[MAXSIZE]; + char tstring[AFS_PIOCTL_MAXSIZE]; struct AclEntry *tp; /* No conversion needed since they're in network order in the first place */ diff --git a/src/tests/afscp.c b/src/tests/afscp.c index 248879ec6..b3a198f63 100644 --- a/src/tests/afscp.c +++ b/src/tests/afscp.c @@ -40,7 +40,7 @@ statfile(char *path, char *cellname, afs_uint32 * server, struct AFSFid *f) struct ViceIoctl v; struct VenusFid vf; - afs_int32 srvbuf[MAXHOSTS]; + afs_int32 srvbuf[AFS_MAXHOSTS]; int code; if (!strncmp(path, "@afs:", 5)) { diff --git a/src/uss/uss_acl.c b/src/uss/uss_acl.c index 8ae9e79c5..1f81b9da1 100644 --- a/src/uss/uss_acl.c +++ b/src/uss/uss_acl.c @@ -498,8 +498,8 @@ static char * AclToString(struct Acl *a_acl) { /*AclToString */ - static char mydata[MAXSIZE]; - char tstring[MAXSIZE]; + static char mydata[AFS_PIOCTL_MAXSIZE]; + char tstring[AFS_PIOCTL_MAXSIZE]; struct AclEntry *tp; /* @@ -551,8 +551,8 @@ uss_acl_SetAccess(char *a_access, int a_clear, int a_negative) char *externalizedACL; int plusp; afs_int32 rights; - char tmp_str[MAXSIZE]; - char path_field[MAXSIZE], user_field[64], rights_field[64], *tp; + char tmp_str[AFS_PIOCTL_MAXSIZE]; + char path_field[AFS_PIOCTL_MAXSIZE], user_field[64], rights_field[64], *tp; int overflow; plusp = !a_negative; @@ -572,7 +572,7 @@ uss_acl_SetAccess(char *a_access, int a_clear, int a_negative) * Ask the Cache Manager to give us the externalized ACL for the * given directory. */ - code = uss_fs_GetACL(path_field, tmp_str, MAXSIZE); + code = uss_fs_GetACL(path_field, tmp_str, AFS_PIOCTL_MAXSIZE); if (code) { afs_com_err(uss_whoami, code, "while getting access list for %s", path_field); @@ -674,7 +674,7 @@ uss_acl_SetDiskQuota(char *a_path, int a_q) uss_VolumeStatus_t *status; char *name, *motd, *offmsg; char *input; - char tmp_str[MAXSIZE]; + char tmp_str[AFS_PIOCTL_MAXSIZE]; if (uss_verbose) fprintf(stderr, diff --git a/src/venus/afsio.c b/src/venus/afsio.c index 41e565583..1db9208a2 100644 --- a/src/venus/afsio.c +++ b/src/venus/afsio.c @@ -798,7 +798,7 @@ get_vnode_hosts(char *fname, char **cellp, afs_int32 *hosts, AFSFid *Fid, i++; } } - for (; iparms[6].items) { @@ -1130,7 +1130,7 @@ writeFile(struct cmd_syndesc *as, void *unused) char *fname = NULL; char *cell = 0; afs_int32 code, localcode = 0; - afs_int32 hosts[MAXHOSTS]; + afs_int32 hosts[AFS_MAXHOSTS]; afs_uint32 useHost; AFSFid Fid; int i; diff --git a/src/venus/fs.c b/src/venus/fs.c index 383590e76..7e0a19f9a 100644 --- a/src/venus/fs.c +++ b/src/venus/fs.c @@ -57,7 +57,7 @@ #define MAXINSIZE 1300 /* pioctl complains if data is larger than this */ #define VMSGSIZE 128 /* size of msg buf in volume hdr */ -static char space[MAXSIZE]; +static char space[AFS_PIOCTL_MAXSIZE]; static char tspace[1024]; static struct ubik_client *uclient; @@ -289,7 +289,7 @@ InAFS(char *apath) afs_int32 code; blob.in_size = 0; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; code = pioctl(apath, VIOC_FILE_CELL_NAME, &blob, 1); @@ -705,8 +705,8 @@ QuickPrintSpace(VolumeStatus * status, char *name) static char * AclToString(struct Acl *acl) { - static char mydata[MAXSIZE]; - char tstring[MAXSIZE]; + static char mydata[AFS_PIOCTL_MAXSIZE]; + char tstring[AFS_PIOCTL_MAXSIZE]; char dfsstring[30]; struct AclEntry *tp; @@ -745,7 +745,7 @@ SetACLCmd(struct cmd_syndesc *as, void *arock) clear = 0; plusp = !(as->parms[3].items); for (ti = as->parms[0].items; ti; ti = ti->next) { - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = idf; blob.in = blob.out = space; code = pioctl(ti->data, VIOCGETAL, &blob, 1); @@ -876,7 +876,7 @@ CopyACLCmd(struct cmd_syndesc *as, void *arock) clear = 1; else clear = 0; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = idf; blob.in = blob.out = space; code = pioctl(as->parms[0].items->data, VIOCGETAL, &blob, 1); @@ -887,7 +887,7 @@ CopyACLCmd(struct cmd_syndesc *as, void *arock) fa = ParseAcl(space); CleanAcl(fa, as->parms[0].items->data); for (ti = as->parms[1].items; ti; ti = ti->next) { - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = idf; blob.in = blob.out = space; code = pioctl(ti->data, VIOCGETAL, &blob, 1); @@ -1051,7 +1051,7 @@ CleanACLCmd(struct cmd_syndesc *as, void *arock) SetDotDefault(&as->parms[0].items); for (ti = as->parms[0].items; ti; ti = ti->next) { - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; code = pioctl(ti->data, VIOCGETAL, &blob, 1); @@ -1138,7 +1138,7 @@ ListACLCmd(struct cmd_syndesc *as, void *arock) SetDotDefault(&as->parms[0].items); for (ti = as->parms[0].items; ti; ti = ti->next) { - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = idf; blob.in = blob.out = space; code = pioctl(ti->data, VIOCGETAL, &blob, 1); @@ -1408,7 +1408,7 @@ SetVolCmd(struct cmd_syndesc *as, void *arock) SetDotDefault(&as->parms[0].items); for (ti = as->parms[0].items; ti; ti = ti->next) { /* once per file */ - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = sizeof(*status) + 3; /* for the three terminating nulls */ blob.out = space; blob.in = space; @@ -1474,7 +1474,7 @@ ExamineCmd(struct cmd_syndesc *as, void *arock) struct VenusFid vfid; /* once per file */ - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; code = pioctl(ti->data, VIOCGETVOLSTAT, &blob, 1); @@ -1515,7 +1515,7 @@ ListQuotaCmd(struct cmd_syndesc *as, void *arock) SetDotDefault(&as->parms[0].items); for (ti = as->parms[0].items; ti; ti = ti->next) { /* once per file */ - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; code = pioctl(ti->data, VIOCGETVOLSTAT, &blob, 1); @@ -1545,7 +1545,7 @@ WhereIsCmd(struct cmd_syndesc *as, void *arock) SetDotDefault(&as->parms[0].items); for (ti = as->parms[0].items; ti; ti = ti->next) { /* once per file */ - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; memset(space, 0, sizeof(space)); @@ -1558,7 +1558,7 @@ WhereIsCmd(struct cmd_syndesc *as, void *arock) hosts = (afs_int32 *) space; printf("File %s is on host%s ", ti->data, (hosts[0] && !hosts[1]) ? "" : "s"); - for (j = 0; j < MAXHOSTS; j++) { + for (j = 0; j < AFS_MAXHOSTS; j++) { if (hosts[j] == 0) break; tp = hostutil_GetNameByINet(hosts[j]); @@ -1585,7 +1585,7 @@ DiskFreeCmd(struct cmd_syndesc *as, void *arock) SetDotDefault(&as->parms[0].items); for (ti = as->parms[0].items; ti; ti = ti->next) { /* once per file */ - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; code = pioctl(ti->data, VIOCGETVOLSTAT, &blob, 1); @@ -1614,7 +1614,7 @@ QuotaCmd(struct cmd_syndesc *as, void *arock) SetDotDefault(&as->parms[0].items); for (ti = as->parms[0].items; ti; ti = ti->next) { /* once per file */ - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; code = pioctl(ti->data, VIOCGETVOLSTAT, &blob, 1); @@ -1737,9 +1737,9 @@ ListMountCmd(struct cmd_syndesc *as, void *arock) blob.in = last_component; blob.in_size = strlen(last_component) + 1; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; - memset(space, 0, MAXSIZE); + memset(space, 0, AFS_PIOCTL_MAXSIZE); code = pioctl(parent_dir, VIOC_AFS_STAT_MT_PT, &blob, 1); @@ -1814,7 +1814,7 @@ defect #3069 if (!cellName) { blob.in_size = 0; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; code = pioctl(Parent(as->parms[0].items->data), VIOC_FILE_CELL_NAME, @@ -1934,7 +1934,7 @@ CheckServersCmd(struct cmd_syndesc *as, void *arock) blob.in_size = sizeof(struct chservinfo); blob.in = (caddr_t) & checkserv; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; memset(space, 0, sizeof(afs_int32)); /* so we assure zero when nothing is copied back */ @@ -2027,7 +2027,7 @@ MessagesCmd(struct cmd_syndesc *as, void *arock) memset(&gagflags, 0, sizeof(struct gaginfo)); blob.in_size = sizeof(struct gaginfo); blob.in = (caddr_t) & gagflags; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; memset(space, 0, sizeof(afs_int32)); /* so we assure zero when nothing is copied back */ @@ -2241,7 +2241,7 @@ ListCellsCmd(struct cmd_syndesc *as, void *arock) for (i = 0;; i++) { tp = space; memcpy(tp, &i, sizeof(afs_int32)); - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = sizeof(afs_int32); blob.in = space; blob.out = space; @@ -2253,8 +2253,8 @@ ListCellsCmd(struct cmd_syndesc *as, void *arock) return 1; } tp = space; - printf("Cell %s on hosts", tp + MAXCELLHOSTS * sizeof(afs_int32)); - for (j = 0; j < MAXCELLHOSTS; j++) { + printf("Cell %s on hosts", tp + AFS_MAXCELLHOSTS * sizeof(afs_int32)); + for (j = 0; j < AFS_MAXCELLHOSTS; j++) { afs_int32 addr; char *name, tbuffer[20]; @@ -2287,7 +2287,7 @@ ListAliasesCmd(struct cmd_syndesc *as, void *arock) for (i = 0;; i++) { tp = space; memcpy(tp, &i, sizeof(afs_int32)); - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = sizeof(afs_int32); blob.in = space; blob.out = space; @@ -2389,8 +2389,8 @@ NewCellCmd(struct cmd_syndesc *as, void *arock) /* Yuck! * With the NEWCELL pioctl call, 3.4 clients take an array of - * MAXHOSTS (13) servers while 3.5 clients take an array of - * MAXCELLHOSTS (8) servers. To determine which we are talking to, + * AFS_MAXHOSTS (13) servers while 3.5 clients take an array of + * AFS_MAXCELLHOSTS (8) servers. To determine which we are talking to, * do a GETCELL pioctl and pass it a magic number. If an array of * 8 comes back, its a 3.5 client. If not, its a 3.4 client. * If we get back EDOM, there are no cells in the kernel yet, @@ -2400,7 +2400,7 @@ NewCellCmd(struct cmd_syndesc *as, void *arock) lp = (afs_int32 *) tp; *lp++ = 0; /* first cell entry */ *lp = 0x12345678; /* magic */ - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = sizeof(afs_int32) + sizeof(afs_int32); blob.in = space; blob.out = space; @@ -2410,11 +2410,11 @@ NewCellCmd(struct cmd_syndesc *as, void *arock) return 1; } if (code < 1 && errno == EDOM) { - scount = MAXHOSTS; + scount = AFS_MAXHOSTS; } else { tp = space; - cellname = tp + MAXCELLHOSTS * sizeof(afs_int32); - scount = ((cellname[0] != '\0') ? MAXCELLHOSTS : MAXHOSTS); + cellname = tp + AFS_MAXCELLHOSTS * sizeof(afs_int32); + scount = ((cellname[0] != '\0') ? AFS_MAXCELLHOSTS : AFS_MAXHOSTS); } /* Now setup and do the NEWCELL pioctl call */ @@ -2556,7 +2556,7 @@ WSCellCmd(struct cmd_syndesc *as, void *arock) blob.in_size = 0; blob.in = NULL; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; code = pioctl(NULL, VIOC_GET_WS_CELL, &blob, 1); @@ -2651,13 +2651,13 @@ SysNameCmd(struct cmd_syndesc *as, void *arock) ti = as->parms[0].items; blob.in = space; blob.out = space; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = sizeof(afs_int32); input += sizeof(afs_int32); for (; ti; ti = ti->next) { setp++; blob.in_size += strlen(ti->data) + 1; - if (blob.in_size > MAXSIZE) { + if (blob.in_size > AFS_PIOCTL_MAXSIZE) { fprintf(stderr, "%s: sysname%s too long.\n", pn, setp > 1 ? "s" : ""); return 1; @@ -3072,7 +3072,7 @@ SetPrefCmd(struct cmd_syndesc *as, void *arock) gblob.in_size = ((char *)&(ssp->servers[0])) - (char *)ssp; gblob.in = space; gblob.out = space; - gblob.out_size = MAXSIZE; + gblob.out_size = AFS_PIOCTL_MAXSIZE; if (geteuid()) { @@ -3198,10 +3198,10 @@ GetPrefCmd(struct cmd_syndesc *as, void *arock) blob.in_size = sizeof(struct sprefrequest); blob.in = (char *)in; blob.out = space; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; in->num_servers = - (MAXSIZE - 2 * sizeof(short)) / sizeof(struct spref); + (AFS_PIOCTL_MAXSIZE - 2 * sizeof(short)) / sizeof(struct spref); in->flags = vlservers; code = pioctl(0, VIOC_GETSPREFS, &blob, 1); @@ -3880,10 +3880,10 @@ GetClientAddrsCmd(struct cmd_syndesc *as, void *arock) blob.in_size = sizeof(struct sprefrequest); blob.in = (char *)in; blob.out = space; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; in->num_servers = - (MAXSIZE - 2 * sizeof(short)) / sizeof(struct spref); + (AFS_PIOCTL_MAXSIZE - 2 * sizeof(short)) / sizeof(struct spref); /* returns addr in network byte order */ code = pioctl(0, VIOC_GETCPREFS, &blob, 1); if (code) { @@ -3925,7 +3925,7 @@ SetClientAddrsCmd(struct cmd_syndesc *as, void *arock) ssp->num_servers = 0; blob.in = space; blob.out = space; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; if (geteuid()) { fprintf(stderr, "Permission denied: requires root access.\n"); @@ -4086,7 +4086,7 @@ FlushMountCmd(struct cmd_syndesc *as, void *arock) blob.in = last_component; blob.in_size = strlen(last_component) + 1; blob.out_size = 0; - memset(space, 0, MAXSIZE); + memset(space, 0, AFS_PIOCTL_MAXSIZE); code = pioctl(parent_dir, VIOC_AFS_FLUSHMOUNT, &blob, 1); diff --git a/src/venus/kdump.c b/src/venus/kdump.c index ff96e99e0..c55b706ca 100644 --- a/src/venus/kdump.c +++ b/src/venus/kdump.c @@ -2565,7 +2565,7 @@ print_cell(int kmem, struct cell *clep, struct cell *ptr, int pnt) printf("\tlinked cellp %lx\n", clep->lcellp); #endif printf("\tCell's servers: "); - for (i = 0; i < MAXCELLHOSTS; i++) { + for (i = 0; i < AFS_MAXCELLHOSTS; i++) { if (pretty && (clep->cellHosts[i] == 0)) break; printf("[%lx] ", clep->cellHosts[i]); @@ -2708,12 +2708,12 @@ print_volume(int kmem, struct volume *vep, struct volume *ptr, int pnt) vep->states); #endif printf("\tVolume's statuses: "); - for (i = 0; i < MAXHOSTS && vep->serverHost[i]; i++) + for (i = 0; i < AFS_MAXHOSTS && vep->serverHost[i]; i++) printf("[%d] ", vep->status[i]); printf("\n"); printf("\tVolume's servers: "); - for (i = 0; i < MAXHOSTS && vep->serverHost[i]; i++) + for (i = 0; i < AFS_MAXHOSTS && vep->serverHost[i]; i++) printf("[%lx] ", vep->serverHost[i]); printf("\n"); diff --git a/src/venus/livesys.c b/src/venus/livesys.c index 997879003..06764f587 100644 --- a/src/venus/livesys.c +++ b/src/venus/livesys.c @@ -32,7 +32,7 @@ #include #endif -static char space[MAXSIZE]; +static char space[AFS_PIOCTL_MAXSIZE]; int main(int argc, char **argv) @@ -59,7 +59,7 @@ main(int argc, char **argv) blob.in = space; blob.out = space; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = sizeof(afs_int32); memcpy(space, &setp, sizeof(afs_int32)); code = pioctl(0, VIOC_AFS_SYSNAME, &blob, 1); diff --git a/src/venus/twiddle.c b/src/venus/twiddle.c index af736f0e4..e1a6a2435 100644 --- a/src/venus/twiddle.c +++ b/src/venus/twiddle.c @@ -40,7 +40,7 @@ #define MAXINSIZE 1300 /* pioctl complains if data is larger than this */ #define VMSGSIZE 128 /* size of msg buf in volume hdr */ -static char space[MAXSIZE]; +static char space[AFS_PIOCTL_MAXSIZE]; static char tspace[1024]; static struct ubik_client *uclient; diff --git a/src/venus/up.c b/src/venus/up.c index 057d593df..8a4ad6f0b 100644 --- a/src/venus/up.c +++ b/src/venus/up.c @@ -65,7 +65,7 @@ short setacl = 1; short oldAcl = 0; char file1[MAXPATHLEN], file2[MAXPATHLEN]; -static char space[MAXSIZE]; +static char space[AFS_PIOCTL_MAXSIZE]; struct OldAcl { int nplus; @@ -751,9 +751,9 @@ isMountPoint(char *name, struct ViceIoctl *blob) blob->in = last_component; blob->in_size = strlen(last_component) + 1; - blob->out_size = MAXSIZE; + blob->out_size = AFS_PIOCTL_MAXSIZE; blob->out = space; - memset(space, 0, MAXSIZE); + memset(space, 0, AFS_PIOCTL_MAXSIZE); code = pioctl(parent_dir, VIOC_AFS_STAT_MT_PT, blob, 0); diff --git a/src/vlserver/sascnvldb.c b/src/vlserver/sascnvldb.c index b73b6ef56..42b9d30f8 100644 --- a/src/vlserver/sascnvldb.c +++ b/src/vlserver/sascnvldb.c @@ -37,7 +37,7 @@ static char pn[] = "cnvldb"; static char tempname[] = "XXnewvldb"; -static char space[MAXSIZE]; +static char space[AFS_PIOCTL_MAXSIZE]; static int MaxServers[2] = { 30, 254 }; /* max server # permitted in this version */ #ifdef notdef /* postpone this... */ @@ -114,7 +114,7 @@ InAFS(apath) register afs_int32 code; blob.in_size = 0; - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.out = space; code = pioctl(apath, VIOC_FILE_CELL_NAME, &blob, 1); @@ -157,7 +157,7 @@ ListQuotaCmd(register struct cmd_syndesc *as, void *arock) for (ti = as->parms[0].items; ti; ti = ti->next) { /* once per file */ - blob.out_size = MAXSIZE; + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = 0; blob.out = space; code = pioctl(ti->data, VIOCGETVOLSTAT, &blob, 1);