]> err.no Git - linux-2.6/blobdiff - fs/cifs/cifs_debug.c
[PATCH] ppc32: platform-specific functions missing from kallsyms.
[linux-2.6] / fs / cifs / cifs_debug.c
index e7bd93e6226d58d9fcb9501671ab8ca2bf7b0820..4061e43471c1a1dc1822fcae3dca02c4406794f0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *   fs/cifs_debug.c
  *
- *   Copyright (C) International Business Machines  Corp., 2000,2003
+ *   Copyright (C) International Business Machines  Corp., 2000,2005
  *
  *   Modified by Steve French (sfrench@us.ibm.com)
  *
@@ -89,12 +89,21 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
        list_for_each(tmp, &GlobalSMBSessionList) {
                i++;
                ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);
-               length =
-                   sprintf(buf,
-                           "\n%d) Name: %s  Domain: %s Mounts: %d ServerOS: %s  \n\tServerNOS: %s\tCapabilities: 0x%x\n\tSMB session status: %d\t",
-                               i, ses->serverName, ses->serverDomain, atomic_read(&ses->inUse),
-                               ses->serverOS, ses->serverNOS, ses->capabilities,ses->status);
-               buf += length;
+               if((ses->serverDomain == NULL) || (ses->serverOS == NULL) ||
+                  (ses->serverNOS == NULL)) {
+                       buf += sprintf("\nentry for %s not fully displayed\n\t",
+                                       ses->serverName);
+                       
+               } else {
+                       length =
+                           sprintf(buf,
+                                   "\n%d) Name: %s  Domain: %s Mounts: %d ServerOS: %s  \n\tServerNOS: %s\tCapabilities: 0x%x\n\tSMB session status: %d\t",
+                               i, ses->serverName, ses->serverDomain,
+                               atomic_read(&ses->inUse),
+                               ses->serverOS, ses->serverNOS,
+                               ses->capabilities,ses->status);
+                       buf += length;
+               }
                if(ses->server) {
                        buf += sprintf(buf, "TCP status: %d\n\tLocal Users To Server: %d SecMode: 0x%x Req Active: %d",
                                ses->server->tcpStatus,
@@ -111,7 +120,12 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
                                        mid_q_entry,
                                        qhead);
                                if(mid_entry) {
-                                       length = sprintf(buf,"State: %d com: %d pid: %d tsk: %p mid %d\n",mid_entry->midState,mid_entry->command,mid_entry->pid,mid_entry->tsk,mid_entry->mid);
+                                       length = sprintf(buf,"State: %d com: %d pid: %d tsk: %p mid %d\n",
+                                               mid_entry->midState,
+                                               (int)mid_entry->command,
+                                               mid_entry->pid,
+                                               mid_entry->tsk,
+                                               mid_entry->mid);
                                        buf += length;
                                }
                        }
@@ -202,7 +216,8 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset,
        buf += item_length;      
        item_length = 
                sprintf(buf,"SMB Request/Response Buffer: %d Pool size: %d\n",
-                       bufAllocCount.counter,cifs_min_rcv + tcpSesAllocCount.counter);
+                       bufAllocCount.counter,
+                       cifs_min_rcv + tcpSesAllocCount.counter);
        length += item_length;
        buf += item_length;
        item_length =