From: Derrick Brashear Date: Fri, 22 Dec 2006 06:47:17 +0000 (+0000) Subject: STABLE14-bosserver-avoid-bosconfig-truncation-20061221 X-Git-Tag: openafs-stable-1_4_3rc1~43 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b36ebc3328a1222fd027d467ef40decfa0bc4232;p=packages%2Fo%2Fopenafs.git STABLE14-bosserver-avoid-bosconfig-truncation-20061221 why the heck would it be a good idea to rewrite the BosConfig while we are starting, exactly? ==================== 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. ==================== why the heck would it be a good idea to rewrite the BosConfig while we are start ing, exactly? (cherry picked from commit b2601916f6b3a95d5adcaf0091232acc759870df) --- diff --git a/src/bozo/bnode.c b/src/bozo/bnode.c index 42a14daaa..0ebdfb3d5 100644 --- a/src/bozo/bnode.c +++ b/src/bozo/bnode.c @@ -317,7 +317,7 @@ bnode_Register(char *atype, struct bnode_ops *aprocs, int anparms) afs_int32 bnode_Create(char *atype, char *ainstance, struct bnode ** abp, char *ap1, char *ap2, char *ap3, char *ap4, char *ap5, char *notifier, - int fileGoal) + int fileGoal, int rewritefile) { struct bnode_type *type; struct bnode *tb; @@ -360,7 +360,10 @@ bnode_Create(char *atype, char *ainstance, struct bnode ** abp, char *ap1, tb->fileGoal = fileGoal; bnode_SetStat(tb, tb->goal); /* nudge it once */ - WriteBozoFile(0); + + if (rewritefile != 0) + WriteBozoFile(0); + return 0; } @@ -740,7 +743,7 @@ hdl_notifier(struct bnode_proc *tp) ec = setsid(); #elif defined(AFS_DARWIN90_ENV) ec = setpgid(0, 0); -#elif defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV) +#elif defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV) ec = setpgrp(); #else ec = setpgrp(0, 0); diff --git a/src/bozo/bnode.p.h b/src/bozo/bnode.p.h index 594da83e3..cb6246937 100644 --- a/src/bozo/bnode.p.h +++ b/src/bozo/bnode.p.h @@ -126,14 +126,12 @@ struct bozo_bosEntryStats { /* max time to wait for fileserver shutdown */ #define FSSDTIME (30 * 60) /* seconds */ - /* calls back up to the generic bnode layer */ -extern int bnode_SetTimeout( /* bnode, timeout */ ); -extern int bnode_Init( /* bnode, bnodeops */ ); -extern int bnode_Activate( /* bnode */ ); -extern int bnode_NewProc( /* bnode, execstring, corename, procaddr */ ); -extern int bnode_Init( /* no parms */ ); -extern afs_int32 bnode_Create(); -extern struct bnode *bnode_FindInstance(); +extern int bnode_SetTimeout(register struct bnode *abnode, afs_int32 atimeout); +extern int bnode_Init(void); +extern int bnode_NewProc(struct bnode *abnode, char *aexecString, char *coreName, struct bnode_proc **aproc); +extern int bnode_InitBnode(register struct bnode *abnode, struct bnode_ops *abnodeops, char *aname); +extern afs_int32 bnode_Create(char *atype, char *ainstance, struct bnode ** abp, char *ap1, char *ap2, char *ap3, char *ap4, char *ap5, char *notifier, int fileGoal, int rewritefile); +extern struct bnode *bnode_FindInstance(register char *aname); extern int bnode_WaitStatus(register struct bnode *abnode, int astatus); extern int bnode_SetStat(register struct bnode *abnode, register int agoal); diff --git a/src/bozo/bosoprocs.c b/src/bozo/bosoprocs.c index 4d7d65ee6..9d368cac1 100644 --- a/src/bozo/bosoprocs.c +++ b/src/bozo/bosoprocs.c @@ -853,7 +853,7 @@ SBOZO_CreateBnode(acall, atype, ainstance, ap1, ap2, ap3, ap4, ap5, notifier) code = bnode_Create(atype, ainstance, &tb, ap1, ap2, ap3, ap4, ap5, notifier, - BSTAT_NORMAL); + BSTAT_NORMAL, 1); if (!code) bnode_SetStat(tb, BSTAT_NORMAL); diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index 5db71a3b0..fbeae7125 100644 --- a/src/bozo/bosserver.c +++ b/src/bozo/bosserver.c @@ -419,7 +419,7 @@ ReadBozoFile(char *aname) code = bnode_Create(typep, instp, &tb, parms[0], parms[1], parms[2], parms[3], parms[4], notifier, - goal ? BSTAT_NORMAL : BSTAT_SHUTDOWN); + goal ? BSTAT_NORMAL : BSTAT_SHUTDOWN, 0); if (code) goto fail;