SOURCES: mpt-status-sync_info.patch - fix progress bar

zergin zergin at pld-linux.org
Sat Mar 22 23:14:40 CET 2008


Author: zergin                       Date: Sat Mar 22 22:14:40 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix progress bar

---- Files affected:
SOURCES:
   mpt-status-sync_info.patch (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/mpt-status-sync_info.patch
diff -u SOURCES/mpt-status-sync_info.patch:1.2 SOURCES/mpt-status-sync_info.patch:1.3
--- SOURCES/mpt-status-sync_info.patch:1.2	Sat Mar 22 22:06:18 2008
+++ SOURCES/mpt-status-sync_info.patch	Sat Mar 22 23:14:35 2008
@@ -1,6 +1,6 @@
 diff -ur orig/mpt-status.c mod/mpt-status.c
 --- orig/mpt-status.c	2006-11-01 09:13:35.000000000 +0000
-+++ mod/mpt-status.c	2008-03-22 20:31:56.546110535 +0000
++++ mod/mpt-status.c	2008-03-22 21:58:45.749101474 +0000
 @@ -38,6 +38,7 @@
  #include "mpt-status.h"
  
@@ -50,7 +50,7 @@
  
  static void __check_endianess(void) {
  	int i = 1;
-@@ -770,6 +777,138 @@
+@@ -770,6 +777,140 @@
  	return;
  }
  
@@ -144,9 +144,11 @@
 +		time[2] = time[3]-(3600*time[0])-(60*time[1]);						// s
 +		
 +		// set progress bar...
-+		for(i = 1; i < percent/2; i++)
-+			progress[i] = '=';
-+			progress[i-1] = '>';
++		for(i = 1; i < percent/2; i++) 
++		    progress[i] = '=';
++			
++		if(i==1) progress[i] = '>';
++		else progress[--i] = '>';
 +		
 +		// if in quite_mode: only print resync status
 +		if(quiet_mode>0) {
@@ -189,7 +191,7 @@
  static void __print_volume_advanced(RaidVolumePage0_t *page) {
  	if (1 == print_status_only) {
  		mpt_printf("vol_id:%d", page->VolumeID);
-@@ -1164,9 +1303,9 @@
+@@ -1164,9 +1305,9 @@
  			mpt_exit(MPT_EXIT_OKAY);
  			break;
  		case  0:
@@ -202,7 +204,7 @@
  			break;
  		case -1:
  			// Done with options
-@@ -1192,7 +1331,6 @@
+@@ -1192,7 +1333,6 @@
  			mpt_exit(MPT_EXIT_UNKNOWN);
  		}
  		*/
@@ -210,7 +212,7 @@
  	} else {
  		/* this is the old style setup */
  		if (probe_id > 0) {
-@@ -1208,7 +1346,10 @@
+@@ -1208,7 +1348,10 @@
  				mpt_exit(MPT_EXIT_OKAY);
  			}
  		}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mpt-status-sync_info.patch?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list