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;
tb->fileGoal = fileGoal;
bnode_SetStat(tb, tb->goal); /* nudge it once */
- WriteBozoFile(0);
+
+ if (rewritefile != 0)
+ WriteBozoFile(0);
+
return 0;
}
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);
/* 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);
code =
bnode_Create(atype, ainstance, &tb, ap1, ap2, ap3, ap4, ap5, notifier,
- BSTAT_NORMAL);
+ BSTAT_NORMAL, 1);
if (!code)
bnode_SetStat(tb, BSTAT_NORMAL);
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;