The Samba-Bugzilla – Attachment 6388 Details for
Bug 8066
smbget(1) uses wrong units (Mb/MB, kb/kB)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 3.5
0001-s3-Fix-bug-8066-wrong-output-in-smbget.patch (text/plain), 1.13 KB, created by
Volker Lendecke
on 2011-04-07 20:42:08 UTC
(
hide
)
Description:
Patch for 3.5
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2011-04-07 20:42:08 UTC
Size:
1.13 KB
patch
obsolete
>From a42fc0a1150beffca7e20a58a442bc580691355b Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Thu, 7 Apr 2011 22:03:49 +0200 >Subject: [PATCH] s3: Fix bug 8066, wrong output in smbget > >--- > source3/utils/smbget.c | 8 +++++--- > 1 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c >index 672e438..a157424 100644 >--- a/source3/utils/smbget.c >+++ b/source3/utils/smbget.c >@@ -76,9 +76,11 @@ static void change_columns(int sig) > > static void human_readable(off_t s, char *buffer, int l) > { >- if(s > 1024 * 1024 * 1024) snprintf(buffer, l, "%.2fGb", 1.0 * s / (1024 * 1024 * 1024)); >- else if(s > 1024 * 1024) snprintf(buffer, l, "%.2fMb", 1.0 * s / (1024 * 1024)); >- else if(s > 1024) snprintf(buffer, l, "%.2fkb", 1.0 * s / 1024); >+ if(s > 1024 * 1024 * 1024) snprintf(buffer, l, "%.2fGB", >+ 1.0 * s / (1024 * 1024 * 1024)); >+ else if(s > 1024 * 1024) snprintf(buffer, l, "%.2fMB", >+ 1.0 * s / (1024 * 1024)); >+ else if(s > 1024) snprintf(buffer, l, "%.2fkB", 1.0 * s / 1024); > else snprintf(buffer, l, OFF_T_FORMAT"b", (OFF_T_FORMAT_CAST)s); > } > >-- >1.7.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 8066
: 6388