open-src/util/mdb-tools/src/modules/Xserver_clients.c
changeset 905 d2b59d5a79ed
parent 851 d428083dbbdd
child 907 3c35d611cdaa
--- a/open-src/util/mdb-tools/src/modules/Xserver_clients.c	Mon Feb 15 16:40:00 2010 -0800
+++ b/open-src/util/mdb-tools/src/modules/Xserver_clients.c	Wed Feb 17 12:30:44 2010 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -40,7 +40,6 @@
     ClientRec client_data;
 };
 
-#ifdef XORG
 /* Xsun has these in a header, Xorg has them in sun-src/IA/interactive.c so
    we just copy it here for now.   XXX: Move to header in Xorg too. */
 typedef struct _ClientProcessInfo {
@@ -58,7 +57,6 @@
     int state;
     pointer value;
 };
-#endif
 
 /*
  * Initialize the client walker by either using the given starting address,
@@ -70,26 +68,17 @@
 {
     struct client_walk_data *cwda;
     short max_clients = 128;
-#ifdef XSUN
-# define MAX_CLIENTS "max_clients"
-#else
+
 # define MAX_CLIENTS "currentMaxClients"
-#endif
     
     if (wsp->walk_addr == NULL) {
-#ifdef XSUN /* clients is a pointer to an array */	
-       if (mdb_readvar(&wsp->walk_addr, "clients") == -1) {
-	   mdb_warn("failed to read 'clients'");
-	   return (WALK_ERR);
-       }
-#else /* Xorg 1.6 - clients is the array itself */
+       /* Xorg 1.6 - clients is the array itself */
        GElf_Sym clients_sym;
        if (mdb_lookup_by_name("clients", &clients_sym) == -1) {
 	   mdb_warn("failed to lookup 'clients'");
 	   return (WALK_ERR);
        }
        wsp->walk_addr = clients_sym.st_value;
-#endif
        if (mdb_readvar(&max_clients, MAX_CLIENTS) == -1) {
 	   mdb_warn("failed to read '%s'", MAX_CLIENTS);
 	   return (WALK_ERR);
@@ -210,9 +199,7 @@
 
 			mdb_printf("%4d ", oscomm.fd);
 
-#ifdef XSUN
-			cpp = oscomm.process;
-#else /* XORG 1.6 or later */
+			/* Xorg 1.6 or later */
 			{
 			    int IAPrivKeyIndex;
 			    GElf_Sym privkey_sym;
@@ -242,7 +229,6 @@
 				}
 			    }
 			}
-#endif			
 			
 			if (cpp != NULL) {
 			    ClientProcessRec cpr;