Skip to contentSkip to conversation

Fix 0x%u usage

PATCH Applied Dr. David Alan Gilbert 2 participants 2 messages Oct 17, 2020 – Oct 19, 2020 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix 0x%u usage

There's a couple of places which use varients on "0x%u" in format strings; that's almost always wrong - you either want 0x%x or just %u.
In libmount's case it's flags, so I'm assuming the intention really is hex.
In the ja.po case it's %u in the original msgid.

---
 libmount/src/optstr.c | 2 +-
 po/ja.po              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
libmount/src/optstr.c +1 -1
index 9af594f52..68b7bc383 100644
@@ -731,7 +731,7 @@ int mnt_optstr_apply_flags(char **optstr, unsigned long flags,
 	if (!optstr || !map)
 		return -EINVAL;
 
-	DBG(CXT, ul_debug("applying 0x%08lu flags to '%s'", flags, *optstr));
+	DBG(CXT, ul_debug("applying 0x%08lx flags to '%s'", flags, *optstr));
 
 	maps[0] = map;
 	next = *optstr;
po/ja.po +1 -1
index ec2c550ec..4974c0bcc 100644
@@ -6820,7 +6820,7 @@ msgstr "間違った vtoc.sanity 値 [0x%08x] の sun ディスクラベルを
 #: libfdisk/src/sun.c:163
 #, c-format
 msgid "Detected sun disklabel with wrong vtoc.nparts [%u]."
-msgstr "間違った vtoc.nparts 値 [0x%u] の sun ディスクラベルを検出しました。"
+msgstr "間違った vtoc.nparts 値 [%u] の sun ディスクラベルを検出しました。"
 
 #: libfdisk/src/sun.c:168
 msgid "Warning: Wrong values need to be fixed up and will be corrected by w(rite)"
Signature · 1 line
2.28.0
maintainer Applied
#1 lore raw
Quoted 3 lines · Dr. David Alan Gilbert
 libmount/src/optstr.c | 2 +-
 po/ja.po              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Note that the ja.po change may be ineffective as we use PO files from http://translationproject.org/domain/util-linux.html

(CC to Takeshi who is the last translator).

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com