summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-12 18:02:58 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-19 08:45:42 -0800
commit57d7eb7506cef9ffeda231c8896fc2c90be34b60 (patch)
tree885499933876c2755d65327afa5706f266d11acc
parente249bb674751f9a9a50a47d89eefdb8b783a8de4 (diff)
Print normalized version for X.Org servers, the way xdpyinfo does
Results in output like: vendor string: X.Org Foundation vendor release number: 10102000 X.Org xfs version: 1.1.2 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
-rw-r--r--xfsinfo.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xfsinfo.c b/xfsinfo.c
index c98c5a4..d847f85 100644
--- a/xfsinfo.c
+++ b/xfsinfo.c
@@ -121,6 +121,17 @@ print_server_info(FSServer *svr)
printf("version number: %d\n", FSProtocolVersion(svr));
printf("vendor string: %s\n", FSServerVendor(svr));
printf("vendor release number: %d\n", FSVendorRelease(svr));
+ if (strstr(FSServerVendor(svr), "X.Org")) {
+ int vendrel = FSVendorRelease(svr);
+
+ printf("X.Org xfs version: ");
+ printf("%d.%d.%d", vendrel / 10000000,
+ (vendrel / 100000) % 100,
+ (vendrel / 1000) % 100);
+ if (vendrel % 1000)
+ printf(".%d", vendrel % 1000);
+ printf("\n");
+ }
printf("maximum request size: %ld longwords (%ld bytes)\n",
FSMaxRequestSize(svr), FSMaxRequestSize(svr) * sizeof(long));
print_catalogue_info(svr);