mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 17:00:15 +00:00
afscp: enable debugging support in the volume portion
readd the missing code when we are compiled for debug Change-Id: Ia4f0bcf2868e2f87bf8f7b6c01f3842e1a2eed50 Reviewed-on: http://gerrit.openafs.org/5483 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
fb1d7491fb
commit
c208b13fa0
@ -76,8 +76,9 @@ afscp_VolumeByName(struct afscp_cell *cell, const char *vname,
|
|||||||
struct afscp_server *server;
|
struct afscp_server *server;
|
||||||
afs_int32 code, vtype, type, srv;
|
afs_int32 code, vtype, type, srv;
|
||||||
void *s;
|
void *s;
|
||||||
/* struct in_addr i; */
|
#ifdef AFSCP_DEBUG
|
||||||
|
struct in_addr i;
|
||||||
|
#endif
|
||||||
if (intype == RWVOL)
|
if (intype == RWVOL)
|
||||||
vtype = VLSF_RWVOL;
|
vtype = VLSF_RWVOL;
|
||||||
else if (intype == ROVOL)
|
else if (intype == ROVOL)
|
||||||
@ -172,11 +173,12 @@ afscp_VolumeByName(struct afscp_cell *cell, const char *vname,
|
|||||||
|
|
||||||
ret->voltype = intype;
|
ret->voltype = intype;
|
||||||
server = afscp_ServerByIndex(ret->servers[0]);
|
server = afscp_ServerByIndex(ret->servers[0]);
|
||||||
/* if (server != NULL)
|
#ifdef AFSCP_DEBUG
|
||||||
* i.s_addr = server->addrs[0];
|
if (server != NULL)
|
||||||
* else
|
i.s_addr = server->addrs[0];
|
||||||
* i.s_addr = 0; */
|
else
|
||||||
/* i.s_addr is set but not used later */
|
i.s_addr = 0;
|
||||||
|
#endif
|
||||||
afs_dprintf(("New volume BYNAME %s (%lu) on %s (%d)\n", ret->name,
|
afs_dprintf(("New volume BYNAME %s (%lu) on %s (%d)\n", ret->name,
|
||||||
afs_printable_uint32_lu(ret->id),
|
afs_printable_uint32_lu(ret->id),
|
||||||
inet_ntoa(i), ret->servers[0]));
|
inet_ntoa(i), ret->servers[0]));
|
||||||
@ -200,7 +202,9 @@ afscp_VolumeById(struct afscp_cell *cell, afs_uint32 id)
|
|||||||
int voltype = -1;
|
int voltype = -1;
|
||||||
char idbuffer[16];
|
char idbuffer[16];
|
||||||
void *s;
|
void *s;
|
||||||
/* struct in_addr i; */
|
#ifdef AFSCP_DEBUG
|
||||||
|
struct in_addr i;
|
||||||
|
#endif
|
||||||
|
|
||||||
memset(&key, 0, sizeof(key));
|
memset(&key, 0, sizeof(key));
|
||||||
key.id = id;
|
key.id = id;
|
||||||
@ -312,11 +316,12 @@ afscp_VolumeById(struct afscp_cell *cell, afs_uint32 id)
|
|||||||
}
|
}
|
||||||
ret->voltype = voltype;
|
ret->voltype = voltype;
|
||||||
server = afscp_ServerByIndex(ret->servers[0]);
|
server = afscp_ServerByIndex(ret->servers[0]);
|
||||||
/* if (server)
|
#ifdef AFSCP_DEBUG
|
||||||
* i.s_addr = server->addrs[0];
|
if (server)
|
||||||
* else
|
i.s_addr = server->addrs[0];
|
||||||
* i.s_addr = 0; */
|
else
|
||||||
/* i.s_addr is set but not referenced later */
|
i.s_addr = 0;
|
||||||
|
#endif
|
||||||
afs_dprintf(("New volume BYID %s (%lu) on %s (%d)\n", ret->name,
|
afs_dprintf(("New volume BYID %s (%lu) on %s (%d)\n", ret->name,
|
||||||
afs_printable_uint32_lu(ret->id), inet_ntoa(i),
|
afs_printable_uint32_lu(ret->id), inet_ntoa(i),
|
||||||
ret->servers[0]));
|
ret->servers[0]));
|
||||||
|
Loading…
Reference in New Issue
Block a user