diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2018-09-23 16:58:16 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2018-09-23 16:58:16 -0700 |
commit | a52c1c5bd9751bed74c3bdc2b2c8dd1078f601f4 (patch) | |
tree | fb71cb3aea3926781aee125cdd343500bf9035e0 | |
parent | e45c10ebcf0ea9109f97adc2ecd1f28fcacf24ec (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |