Eric Blake wrote:
> According to Ondřej Vašík on 9/9/2009 2:19 AM:
> > Hello,
> > as requested via https://bugzilla.redhat.com/show_bug.cgi?id=511188 , it
> > would be nice to clarify default blocksize used by du in manpage/--help
> > output. Although I closed that bugzilla as notabug, further
> > communication via private emails convinced me to propose that change to
> > upstream.
> > As it breaks translation strings, I guess it would be better to postpone
> > commit after 7.6 (if accepted).
> 
> The default block size depends on POSIXLY_CORRECT (which requires 512, not
> 1024) and on BLOCK_SIZE (which the user can set to a different size).
> Maybe a better thing to do would be adding a blurb about environment
> variables that affect block size.

I knew about that, but tried to keep it simple. But you are right,
keeping it simple might be even more confusing.

> Also, df and ls need the same treatment, whatever we decide to do.

Good, point. Added blurb about the environment variables to all of those
utilities.

Greetings,
         Ondřej
From 82ef7e63149eaedb7ed40e94f975fdb799ed5f41 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= <ova...@redhat.com>
Date: Wed, 9 Sep 2009 10:00:32 +0200
Subject: [PATCH] doc: du,df,ls - clarify default blocksize in usage

* src/du.c (usage): clarify default blocksize - requested by
  https://bugzilla.redhat.com/show_bug.cgi?id=511188
* src/ls.c (usage): likewise
* src/df.c (usage): likewise
---
 src/df.c |    5 +++++
 src/du.c |    5 +++++
 src/ls.c |    5 +++++
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/df.c b/src/df.c
index 86fd0e3..d322da6 100644
--- a/src/df.c
+++ b/src/df.c
@@ -834,6 +834,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       fputs (_("\n\
+If none of the environment variables BLOCKSIZE, BLOCK_SIZE or \n\
+<COMMAND>_BLOCKSIZE is specified, blocksize defaults to 1024 bytes.\n\
+(or 512 bytes when POSIXLY_CORRECT environment variable is set)\n\
+"), stdout);
+      fputs (_("\n\
 SIZE may be (or may be an integer optionally followed by) one of following:\n\
 kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.\n\
 "), stdout);
diff --git a/src/du.c b/src/du.c
index 9da901a..db0e7c7 100644
--- a/src/du.c
+++ b/src/du.c
@@ -331,6 +331,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       fputs (_("\n\
+If none of the environment variables BLOCKSIZE, BLOCK_SIZE or \n\
+<COMMAND>_BLOCKSIZE is specified, blocksize defaults to 1024 bytes.\n\
+(or 512 bytes when POSIXLY_CORRECT environment variable is set)\n\
+"), stdout);
+      fputs (_("\n\
 SIZE may be (or may be an integer optionally followed by) one of following:\n\
 kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.\n\
 "), stdout);
diff --git a/src/ls.c b/src/ls.c
index 553090d..82e129f 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -4665,6 +4665,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       fputs (_("\n\
+If none of the environment variables BLOCKSIZE, BLOCK_SIZE or \n\
+<COMMAND>_BLOCKSIZE is specified, blocksize defaults to 1024 bytes.\n\
+(or 512 bytes when POSIXLY_CORRECT environment variable is set)\n\
+"), stdout);
+      fputs (_("\n\
 SIZE may be (or may be an integer optionally followed by) one of following:\n\
 kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.\n\
 "), stdout);
-- 
1.5.6.1.156.ge903b

Attachment: signature.asc
Description: Toto je digitálně podepsaná část zprávy

Reply via email to