<br><tt><font size=2>> Date: Wed, 05 Jul 2006 09:21:21 -0400<br>
> From: Dave Anderson <anderson@redhat.com><br>
> Subject: Re: [Crash-utility] Crash : To improve readability of mount<br>
>    command    inCrash.<br>
> To: "Discussion list for crash utility usage, maintenance and<br>
>    development"    <crash-utility@redhat.com><br>
> Message-ID: <44ABBCD1.9A3EB28B@redhat.com><br>
> Content-Type: text/plain; charset="us-ascii"<br>
> <br>
> "Hariharan T.S." wrote:<br>
> <br>
> >  Hi All Just a suggestion for improved readablity in crash
for <br>
> mount command.Instead of printing header every time for<br>
> > each line, It can be limited to one header at the top.crash>
mount<br>
> /VFSMOUNT SUPERBLK TYPE DEVNAME DIRNAME1100800<br>
> > 10ec800 rootfs rootfs /VFSMOUNT SUPERBLK TYPE DEVNAME <br>
> DIRNAME1100200 10e9400 ext3 /dev/root /crash> mount<br>
> > /procVFSMOUNT SUPERBLK TYPE DEVNAME DIRNAME1100280 10ec400 proc
<br>
> /proc /procVFSMOUNT SUPERBLK TYPE DEVNAME<br>
> > DIRNAME1100f00 10ec400 proc /proc /proccrash> RegardsHariharan
T.S.<br>
> <br>
> What -- no patch to fix it?   ;-)<br>
> <br>
> Yeah, those are unique cases, because even though you<br>
> are requesting just one directory via the extra command line<br>
> argument, there are two unique vfsmount entries, i.e,<br>
> the rootfs and ext3 types for the / directory.  (I can't<br>
> reproduce the two /proc entries as in your example.)<br>
> <br>
> Anyway, there should be a flag set somewhere to avoid<br>
> the duplicate headers.  I'll add it to the crash.TODO list:<br>
> <br>
>   http://people.redhat.com/anderson/crash.TODO.html<br>
> <br>
> Thanks,<br>
>   Dave</font></tt>
<br>
<br>
<br><tt><font size=2>Here is a patch against crash-4.0-25.4 on SLES10_RC3.</font></tt>
<br><tt><font size=2>===================</font></tt>
<br>
<br><tt><font size=2>From: Lin Feng Shen <shenlinf@cn.ibm.com></font></tt>
<br>
<br><tt><font size=2>The patch improves readablity in crash for mount command.
Instead of </font></tt>
<br><tt><font size=2>printing header for each mount point in "mount
[vfsmount | superblock</font></tt>
<br><tt><font size=2> | devname | dirname | inode]", it showes
an unique one.</font></tt>
<br>
<br><tt><font size=2>Signed-off-by: Lin Feng Shen <shenlinf@cn.ibm.com></font></tt>
<br><tt><font size=2>---</font></tt>
<br>
<br><tt><font size=2>diff -upNr crash-4.0-2.18.orig/filesys.c crash-4.0-2.18/filesys.c<br>
--- crash-4.0-2.18.orig/filesys.c          
      2006-07-05 23:46:09.000000000 -0400<br>
+++ crash-4.0-2.18/filesys.c          
      2006-07-05 23:53:41.000000000 -0400<br>
@@ -1144,6 +1144,7 @@ cmd_mount(void)<br>
                  ulong
vfsmount = 0;<br>
                  int
flags = 0;<br>
                  int
save_next;<br>
+                
int unique_mount_hdr=0;<br>
 <br>
         while ((c = getopt(argcnt, args, "if"))
!= EOF) {<br>
                 switch(c)<br>
@@ -1202,7 +1203,10 @@ cmd_mount(void)<br>
                  
               
                 
               
                 
               
sscanf(buf2,"%lx",&vfsmount);<br>
                  
               
                 
               
                 
               
show_mounts(vfsmount, flags);<br>
                  
               
                 
               
                 }
else {<br>
-                
                 
               
                 
               
                 fprintf(fp,
mount_hdr);<br>
+                
                 
               
                 
               
                 if
(unique_mount_hdr == 0){<br>
+                
                 
               
                 
               
                 
               
fprintf(fp, mount_hdr);<br>
+                
                 
               
                 
               
                 
               
unique_mount_hdr = 1;<br>
+                
                 
               
                 
               
                 }<br>
                  
               
                 
               
                 
               
fprintf(fp, buf2);<br>
                  
               
                 
               
                 }<br>
                  
               
                 
               
                 found
= FALSE;</font></tt>