From 4ec351a6730d750d15ffeb938ec839a239ecb46f Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 2 Apr 2012 22:35:41 -0400 Subject: [PATCH] viced: AFSDisk, AFSFetchVolumeStatus Int31 PartSize The AFSDisk and AFSFetchVolumeStatus structures use signed 32-bit integers for representation partition size and available blocks. RoundInt64ToInt31() should be used instead of RoundInt64ToInt32() when assigning their values. (cherry picked from commit e8f6dfac59fe042a04a9ac5eb3c37356cb3a22a3) Reviewed-on: http://gerrit.openafs.org/7022 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: I81f2f120c0080b1d680fa362372e54dd3af1f3f6 Reviewed-on: http://gerrit.openafs.org/7025 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- src/viced/afsfileprocs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 92338b4245..7eba7640d8 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -1958,8 +1958,8 @@ RXGetVolumeStatus(AFSFetchVolumeStatus * status, char **name, char **offMsg, status->MinQuota = V_minquota(volptr); status->MaxQuota = V_maxquota(volptr); status->BlocksInUse = V_diskused(volptr); - status->PartBlocksAvail = volptr->partition->free; - status->PartMaxBlocks = volptr->partition->totalUsable; + status->PartBlocksAvail = RoundInt64ToInt31(volptr->partition->free); + status->PartMaxBlocks = RoundInt64ToInt31(volptr->partition->totalUsable); /* now allocate and copy these things; they're freed by the RXGEN stub */ temp = strlen(V_name(volptr)) + 1;