If no -reason is given for fssync-debug calls, we currently just
transmit garbage to the fileserver or salvageserver. Instead, give a
default (the *_WHATEVER constant), so we do something consistent.
Reviewed-on: http://gerrit.openafs.org/4115
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit
7f31a11d110085ae528d4555d34744c0832008b0)
Change-Id: I27aefea0e891444e006e5d4b5ed43ed9cd492242
Reviewed-on: http://gerrit.openafs.org/5756
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
if ((ti = as->parms[COMMON_PARMS_OFFSET].items)) { /* -reason */
state->reason = atoi(ti->data);
+ } else {
+ state->reason = SALVSYNC_REASON_WHATEVER;
}
+
if ((ti = as->parms[COMMON_PARMS_OFFSET+1].items)) { /* -programtype */
if (!strcmp(ti->data, "fileServer")) {
programType = fileServer;
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;
}
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);