#include <afsconfig.h>
#include <afs/param.h>
+#include <roken.h>
#include <stdlib.h>
#include <stdio.h>
#endif
#include <rx/xdr.h>
#include <afs/afsint.h>
-#include <afs/assert.h>
+#include <afs/afs_assert.h>
#include <fcntl.h>
if ((ti = as->parms[COMMON_PARMS_OFFSET].items)) { /* -reason */
state->reason = atoi(ti->data);
+ } else {
+ state->reason = FSYNC_WHATEVER;
}
+
if ((ti = as->parms[COMMON_PARMS_OFFSET+1].items)) { /* -programtype */
if (!strcmp(ti->data, "fileServer")) {
programType = fileServer;
struct cmd_item *ti;
state->vop = (struct volop_state *) calloc(1, sizeof(struct volop_state));
- assert(state->vop != NULL);
+ osi_Assert(state->vop != NULL);
if ((ti = as->parms[COMMON_VOLOP_PARMS_OFFSET].items)) { /* -volumeid */
state->vop->volume = atoi(ti->data);
#define ENUMTOSTRING(en) #en
#define ENUMCASE(en) \
- case en: \
- return ENUMTOSTRING(en); \
- break
+ case en: return ENUMTOSTRING(en)
#define FLAGTOSTRING(fl) #fl
#define FLAGCASE(bitstr, fl, str, count) \
ENUMCASE(VOL_STATE_VNODE_RELEASE);
ENUMCASE(VOL_STATE_VLRU_ADD);
ENUMCASE(VOL_STATE_DELETED);
+ ENUMCASE(VOL_STATE_SALVAGE_REQ);
ENUMCASE(VOL_STATE_FREED);
default:
return "**UNKNOWN**";
printf("\tvop = {\n");
printf("\t\tvolume = %u\n", vop.vop.volume);
- if (afs_strnlen(vop.vop.partName, sizeof(vop.vop.partName)) <
+ if (strnlen(vop.vop.partName, sizeof(vop.vop.partName)) <
sizeof(vop.vop.partName)) {
printf("\t\tpartName = '%s'\n", vop.vop.partName);
} else {
struct cmd_item *ti;
state->vop = (struct volop_state *) calloc(1, sizeof(struct volop_state));
- assert(state->vop != NULL);
+ osi_Assert(state->vop != NULL);
if ((ti = as->parms[CUSTOM_PARMS_OFFSET].items)) { /* -volumeid */
state->vop->volume = atoi(ti->data);
}
child = atoi(ti->data);
- state.reason = FSYNC_WHATEVER;
-
common_prolog(as, &state);
fprintf(stderr, "calling FSYNC_VCGDel\n");
code = FSYNC_VGCDel(partName, parent, child, state.reason, &res);