All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] hardlink: set all locale elements, so that messages will get translated
@ 2022-03-11 16:23 Benno Schulenberg
  2022-03-11 16:23 ` [PATCH 2/2] hardlink: grammarize the main description in the man page Benno Schulenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Benno Schulenberg @ 2022-03-11 16:23 UTC (permalink / raw)
  To: util-linux

This setting and binding were lost a year ago, in commit 2180ecc81b.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 misc-utils/hardlink.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/misc-utils/hardlink.c b/misc-utils/hardlink.c
index 932048622..49515c10b 100644
--- a/misc-utils/hardlink.c
+++ b/misc-utils/hardlink.c
@@ -1329,8 +1329,9 @@ int main(int argc, char *argv[])
 	sigaction(SIGINT, &sa, NULL);
 	sigaction(SIGUSR1, &sa, NULL);
 
-	/* Pretty print numeric output */
-	setlocale(LC_NUMERIC, "");
+	setlocale(LC_ALL, "");
+	bindtextdomain(PACKAGE, LOCALEDIR);
+	textdomain(PACKAGE);
 
 	if (atexit(to_be_called_atexit) != 0)
 		err(EXIT_FAILURE, _("cannot register exit handler"));
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] hardlink: grammarize the main description in the man page
  2022-03-11 16:23 [PATCH 1/2] hardlink: set all locale elements, so that messages will get translated Benno Schulenberg
@ 2022-03-11 16:23 ` Benno Schulenberg
  0 siblings, 0 replies; 3+ messages in thread
From: Benno Schulenberg @ 2022-03-11 16:23 UTC (permalink / raw)
  To: util-linux

(Also hard-wrap the extremely long line to resonable widths,
so that later small changes are easier to observe in git.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 misc-utils/hardlink.1.adoc | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/misc-utils/hardlink.1.adoc b/misc-utils/hardlink.1.adoc
index 851bb285d..5e13fde19 100644
--- a/misc-utils/hardlink.1.adoc
+++ b/misc-utils/hardlink.1.adoc
@@ -22,9 +22,18 @@ hardlink - link multiple copies of a file
 
 == DESCRIPTION
 
-*hardlink* is a tool which replaces copies of a file with hardlinks or copy-on-write clones, therefore saving space.
-
-*hardlink* creates a binary tree from file sizes and after that, it compares files with the same sizes. There are two basic content comparison methods. *memcmp* method directly reads data blocks from files and compares them. The other method is based on checksums (like SHA256), in this case for each data block is calculated checksum by Linux kernel crypto API, and this checksum is stored in userspace and used for files comparison. For each file is also cached "intro" buffer (32 bytes), this buffer is used independently on the comparison method and requested cache-size and io-size. The "intro" buffer dramatically reduces operations with data content as files are very often different from the beginning.
+*hardlink* is a tool that replaces copies of a file with either hardlinks or copy-on-write
+clones, thus saving space.
+
+*hardlink* first creates a binary tree of file sizes and then compares the content of files
+that have the same size. There are two basic content comparison methods. The *memcmp* method
+directly reads data blocks from files and compares them. The other method is based on checksums
+(like SHA256); in this case for each data block a checksum is calculated by the Linux kernel
+crypto API, and this checksum is stored in userspace and used for file comparisons.
+
+For each file also an "intro" buffer (32 bytes) is cached. This buffer is used independently
+from the comparison method and requested cache-size and io-size. The "intro" buffer dramatically
+reduces operations with data content as files are very often different from the beginning.
 
 == OPTIONS
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] hardlink: grammarize the main description in the man page
@ 2022-03-13  9:29 Benno Schulenberg
  0 siblings, 0 replies; 3+ messages in thread
From: Benno Schulenberg @ 2022-03-13  9:29 UTC (permalink / raw)
  To: util-linux


Benno Schulenberg wrote:
> (Also hard-wrap the extremely long line to resonable widths,

Let me fix that typo in a V2.

Benno


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-13  9:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 16:23 [PATCH 1/2] hardlink: set all locale elements, so that messages will get translated Benno Schulenberg
2022-03-11 16:23 ` [PATCH 2/2] hardlink: grammarize the main description in the man page Benno Schulenberg
2022-03-13  9:29 Benno Schulenberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.