From: Douglas Bagnall Date: Thu, 20 Feb 2025 04:20:16 +0000 (+1300) Subject: smbclient: report kilobytes per second as kB/s, not kb/s X-Git-Tag: tevent-0.17.0~619 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f6cc7f98c3675d4e15477bbac019271d4499ae7;p=thirdparty%2Fsamba.git smbclient: report kilobytes per second as kB/s, not kb/s https://bugzilla.samba.org/show_bug.cgi?id=11023 Signed-off-by: Douglas Bagnall Reviewed-by: Jennifer Sutton --- diff --git a/source3/client/client.c b/source3/client/client.c index e2dd700314c..d1ccc8cb54e 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1959,7 +1959,7 @@ static int do_put(const char *rname, const char *lname, bool reput) put_total_time_ms += this_time; put_total_size += state.nread; - DEBUG(1,("(%3.1f kb/s) (average %3.1f kb/s)\n", + DEBUG(1,("(%3.1f kB/s) (average %3.1f kB/s)\n", state.nread / (1.024*this_time + 1.0e-4), put_total_size / (1.024*put_total_time_ms))); } @@ -4379,7 +4379,7 @@ static int scopy_status(off_t written, void *priv) clock_gettime_mono(&tp_end); scopy_total_time_ms = nsec_time_diff(&tp_end,&st->tp_start)/1000000; - DEBUG(5,("Copied %jd bytes at an average %3.1f kb/s\n", + DEBUG(5,("Copied %jd bytes at an average %3.1f kB/s\n", (intmax_t)written, written / (1.024*scopy_total_time_ms))); return true; diff --git a/source4/client/client.c b/source4/client/client.c index 33733efa390..8debb61c6ff 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -811,7 +811,7 @@ static int do_get(struct smbclient_context *ctx, char *rname, const char *p_lnam get_total_time_ms += this_time; get_total_size += nread; - DEBUG(2,("(%3.1f kb/s) (average %3.1f kb/s)\n", + DEBUG(2,("(%3.1f kB/s) (average %3.1f kB/s)\n", nread / (1.024*this_time + 1.0e-4), get_total_size / (1.024*get_total_time_ms))); } @@ -1227,7 +1227,7 @@ static int do_put(struct smbclient_context *ctx, char *rname, char *lname, bool put_total_time_ms += this_time; put_total_size += nread; - DEBUG(1,("(%3.1f kb/s) (average %3.1f kb/s)\n", + DEBUG(1,("(%3.1f kB/s) (average %3.1f kB/s)\n", nread / (1.024*this_time + 1.0e-4), put_total_size / (1.024*put_total_time_ms))); }