]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
xfs/122: escape %zu in printf with %% not \\%
authorEric Sandeen <sandeen@redhat.com>
Mon, 20 Jun 2022 21:43:31 +0000 (16:43 -0500)
committerZorro Lang <zlang@kernel.org>
Fri, 24 Jun 2022 15:16:21 +0000 (23:16 +0800)
commit09f420da65a6a642657e98816b276cc35c6bc40c
tree285e09742fc569b150b06a622db06b7a93505c73
parent0b0e82a4d7554ce515086c70a36ae9e90503d768
xfs/122: escape %zu in printf with %% not \\%

The standard way to escape % in a printf is with %%; although \\%zu
seems to have worked in awk until recently, an upgrade on Fedora 36
has started failing:

awk: cmd. line:1: (FILENAME=- FNR=1) fatal: not enough arguments to satisfy format string
        'printf("sizeof(%s) = \%zu\n", sizeof(%s));
    '
                                              ^ ran out for this one
Switching the escape to "%%" fixes this for me, and also works
on my very old RHEL7 mcahine.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/122