svn commit: samba r13083 - branches/SAMBA_3_0/source/utils trunk/source/utils

jerry at samba.org jerry at samba.org
Mon Jan 23 14:26:49 GMT 2006


Author: jerry
Date: 2006-01-23 14:26:48 +0000 (Mon, 23 Jan 2006)
New Revision: 13083

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13083

Log:
patch suggested by Adam Nielsen for better smbstatus formatting


Modified:
   branches/SAMBA_3_0/source/utils/status.c
   trunk/source/utils/status.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/status.c
===================================================================
--- branches/SAMBA_3_0/source/utils/status.c	2006-01-23 14:04:40 UTC (rev 13082)
+++ branches/SAMBA_3_0/source/utils/status.c	2006-01-23 14:26:48 UTC (rev 13083)
@@ -103,13 +103,13 @@
 	static int count;
 	if (count==0) {
 		d_printf("Locked files:\n");
-		d_printf("Pid    DenyMode   Access      R/W        Oplock           SharePath           Name\n");
-		d_printf("----------------------------------------------------------------------------------\n");
+		d_printf("Pid          DenyMode   Access      R/W        Oplock           SharePath           Name\n");
+		d_printf("----------------------------------------------------------------------------------------\n");
 	}
 	count++;
 
 	if (Ucrit_checkPid(procid_to_pid(&e->pid))) {
-		d_printf("%s  ",procid_str_static(&e->pid));
+		d_printf("%-11s  ",procid_str_static(&e->pid));
 		switch (map_share_mode_to_deny_mode(e->share_access,
 						    e->private_options)) {
 			case DENY_NONE: d_printf("DENY_NONE  "); break;
@@ -166,7 +166,7 @@
 	}
 	count++;
 
-	d_printf("%s   %05x:%05x    %s  %9.0f   %9.0f\n", 
+	d_printf("%08s   %05x:%05x    %s  %9.0f   %9.0f\n", 
 	       procid_str_static(&pid), (int)dev, (int)ino, 
 	       lock_type==READ_LOCK?"R":"W",
 	       (double)start, (double)size);

Modified: trunk/source/utils/status.c
===================================================================
--- trunk/source/utils/status.c	2006-01-23 14:04:40 UTC (rev 13082)
+++ trunk/source/utils/status.c	2006-01-23 14:26:48 UTC (rev 13083)
@@ -103,13 +103,13 @@
 	static int count;
 	if (count==0) {
 		d_printf("Locked files:\n");
-		d_printf("Pid    DenyMode   Access      R/W        Oplock           SharePath           Name\n");
-		d_printf("----------------------------------------------------------------------------------\n");
+		d_printf("Pid          DenyMode   Access      R/W        Oplock           SharePath           Name\n");
+		d_printf("----------------------------------------------------------------------------------------\n");
 	}
 	count++;
 
 	if (Ucrit_checkPid(procid_to_pid(&e->pid))) {
-		d_printf("%s  ",procid_str_static(&e->pid));
+		d_printf("%-11s  ",procid_str_static(&e->pid));
 		switch (map_share_mode_to_deny_mode(e->share_access,
 						    e->private_options)) {
 			case DENY_NONE: d_printf("DENY_NONE  "); break;
@@ -166,7 +166,7 @@
 	}
 	count++;
 
-	d_printf("%s   %05x:%05x    %s  %9.0f   %9.0f\n", 
+	d_printf("%08s   %05x:%05x    %s  %9.0f   %9.0f\n", 
 	       procid_str_static(&pid), (int)dev, (int)ino, 
 	       lock_type==READ_LOCK?"R":"W",
 	       (double)start, (double)size);



More information about the samba-cvs mailing list