summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2018-09-23 16:58:16 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2018-09-23 16:58:16 -0700
commita52c1c5bd9751bed74c3bdc2b2c8dd1078f601f4 (patch)
treefb71cb3aea3926781aee125cdd343500bf9035e0
parente45c10ebcf0ea9109f97adc2ecd1f28fcacf24ec (diff)
Correctly report maximum request size when sizeof(long) != 4
The protocol spec says: The MAXIMUM-REQUEST-LENGTH specifies the largest request size in 4-byte units that is accepted by the server The code worked on 32-bit platforms, where longs were 4 bytes, but overreports the number of bytes allowed on platforms with 64-bit longs. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xfsinfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xfsinfo.c b/xfsinfo.c
index 4749967..9ed847d 100644
--- a/xfsinfo.c
+++ b/xfsinfo.c
@@ -144,8 +144,8 @@ print_server_info(FSServer *svr)
printf(".%d", vendrel % 1000);
printf("\n");
}
- printf("maximum request size: %ld longwords (%ld bytes)\n",
- FSMaxRequestSize(svr), FSMaxRequestSize(svr) * sizeof(long));
+ printf("maximum request size: %ld words (%ld bytes)\n",
+ FSMaxRequestSize(svr), FSMaxRequestSize(svr) * sizeof(CARD32));
print_catalogue_info(svr);
print_alternate_info(svr);
print_extension_info(svr);