]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
bosserver-avoid-bosconfig-truncation-20061221
authorDerrick Brashear <shadow@dementia.org>
Fri, 22 Dec 2006 06:45:40 +0000 (06:45 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 22 Dec 2006 06:45:40 +0000 (06:45 +0000)
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?

src/bozo/bnode.c
src/bozo/bnode.p.h
src/bozo/bosoprocs.c
src/bozo/bosserver.c

index 42a14daaaa666bdf53db6c2d0f82b453eb53780d..0ebdfb3d5378ae50c3f8815f3dccd4161de5f43c 100644 (file)
@@ -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);
index 594da83e32cc0bdd99ed558f5118b93495a83d6c..cb62469379bc989adebd312c511dff0c1165cea7 100644 (file)
@@ -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);
index 4d7d65ee638c42ccd5138d40927a579b82bcfffe..9d368cac1a2e50f0baa1dd82f2560345c5845b20 100644 (file)
@@ -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);
 
index a22546d1bbf57c518e26bfe60d16c048de872d15..13c334a5c0408ae6a7d6f00edec6fccb9deb65ea 100644 (file)
@@ -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;