bozo: preserve all options over restart
[openafs.git] / src / bozo / bnode.p.h
index cb62469..d4b6da2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2000, International Business Machines Corporation and others.
  * All Rights Reserved.
- * 
+ *
  * This software has been released under the terms of the IBM Public
  * License.  For details, see the LICENSE file in the top-level source
  * directory or online at http://www.openafs.org/dl/license10.html
 #define        BOP_GETPARM(bnode, n, b, l)     ((*(bnode)->ops->getparm)((bnode),(n),(b),(l)))
 #define        BOP_RESTARTP(bnode)     ((*(bnode)->ops->restartp)((bnode)))
 #define BOP_HASCORE(bnode)     ((*(bnode)->ops->hascore)((bnode)))
+#define BOP_PROCSTARTED(bnode,p)       ((*(bnode)->ops->procstarted)((bnode),(p)))
+
+struct bnode_proc;
 
 struct bnode_ops {
-    struct bnode *(*create) ( /* variable args */ );
-    int (*timeout) ( /* bnode */ );
-    int (*getstat) ( /* bnode, status */ );
-    int (*setstat) ( /* bnode, status */ );
-    int (*delete) ( /* bnode */ );
-    int (*procexit) ( /* bnode, proc */ );
-    int (*getstring) ( /* bnode, buffer, bufLen */ );
-    int (*getparm) ( /* bnode, parmIndex, buffer, bufLen */ );
-    int (*restartp) ( /* bnode */ );
-    int (*hascore) ( /* bnode */ );
+    struct bnode *(*create) ( char *, char *, char *, char *, char *, char *);
+    int (*timeout) ( struct bnode * );
+    int (*getstat) ( struct bnode *, afs_int32 * );
+    int (*setstat) ( struct bnode *, afs_int32 );
+    int (*delete) ( struct bnode * );
+    int (*procexit) ( struct bnode *, struct bnode_proc * );
+    int (*getstring) ( struct bnode *, char *abuffer, afs_int32 alen );
+    int (*getparm) ( struct bnode *, afs_int32 aindex, char *abuffer,
+                    afs_int32 alen);
+    int (*restartp) ( struct bnode *);
+    int (*hascore) ( struct bnode *);
+    int (*procstarted) ( struct bnode *, struct bnode_proc * );
 };
 
 struct bnode_type {
@@ -86,8 +91,8 @@ struct ezbnode {
     char killSent;             /* have we tried sigkill signal? */
 };
 
-/* this struct is used to construct a list of dirpaths, along with 
- * their recommended permissions 
+/* this struct is used to construct a list of dirpaths, along with
+ * their recommended permissions
  */
 struct bozo_bosEntryStats {
     const char *path;          /* pathname to check */
@@ -119,19 +124,19 @@ struct bozo_bosEntryStats {
 #ifdef AFS_NT40_ENV
 #define BOSEXIT_RESTART        0xA0
 #define BOSEXIT_DORESTART(code)  (((code) & ~(0xF)) == BOSEXIT_RESTART)
-#define BOSEXIT_NOAUTH_FLAG    0x01
-#define BOSEXIT_LOGGING_FLAG   0x02
 #endif
 
 /* max time to wait for fileserver shutdown */
 #define        FSSDTIME        (30 * 60)       /* seconds */
 
 /* calls back up to the generic bnode layer */
-extern int bnode_SetTimeout(register struct bnode *abnode, afs_int32 atimeout);
+extern int bnode_SetTimeout(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 int bnode_InitBnode(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);
+extern struct bnode *bnode_FindInstance(char *aname);
+extern int bnode_WaitStatus(struct bnode *abnode, int astatus);
+extern int bnode_SetStat(struct bnode *abnode, int agoal);
+extern int bnode_CreatePidFile(struct bnode *abnode, struct bnode_proc *aproc, char *name);
+extern int bnode_DestroyPidFile(struct bnode *abnode, struct bnode_proc *aproc);