Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Jun 18, 2014

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 3e2e48a72851354f7d6d4da9fc83d4a6df20e955:

Add string condensing for the ETA output (2014-06-16 14:42:05 -0600)

are available in the git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to 6c784104cf90299aeec1d79f536a8e534c341c5f:

Fixup run_str[] condensing with client/server (2014-06-17 09:22:34 -0600)

----------------------------------------------------------------
Jens Axboe (1):

      Fixup run_str[] condensing with client/server
 eta.c |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

---

Diff of recent changes:

eta.c +6 -7
index 52c1728..0dd04be 100644
@@ -36,18 +36,16 @@ new:
 		} else if (last == run_str[i]) {
 			nr++;
 		} else {
-			int elen;
-
-			elen = sprintf(&run_str_condensed[ci], "(%u),", nr);
-			ci += elen;
+			ci += sprintf(&run_str_condensed[ci], "(%u),", nr);
 			goto new;
 		}
 	}
 
 	if (nr)
-		sprintf(&run_str_condensed[ci], "(%u)", nr);
-}
+		ci += sprintf(&run_str_condensed[ci], "(%u)", nr);
 
+	run_str_condensed[ci + 1] = '\0';
+}
 
 /*
  * Sets the status of the 'td' in the printed status map.
@@ -487,7 +485,8 @@ int calc_thread_status(struct jobs_eta *je, int force)
 		return 0;
 
 	je->nr_threads = thread_number;
-	memcpy(je->run_str, run_str, thread_number * sizeof(char));
+	update_condensed_str(__run_str, run_str);
+	memcpy(je->run_str, run_str, strlen(run_str));
 	return 1;
 }