From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Naohiro Aota <naohiro.aota@wdc.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] common/filter: prepend 0 to treat offset as octal
Date: Wed, 11 Dec 2019 22:04:37 -0800 [thread overview]
Message-ID: <20191212060437.GA99869@magnolia> (raw)
In-Reply-To: <20191212031152.1906287-1-naohiro.aota@wdc.com>
On Thu, Dec 12, 2019 at 12:11:52PM +0900, Naohiro Aota wrote:
> The offsets printed by "od" are octal numbers. So, we need to add "0" at
> the head of the $offset to parse it as an octal number.
>
> Fixes: 37520a314bd4 ("fstests: Don't use gawk's strtonum")
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
<grumble> Did the original patch author run all the tests that use
_filter_od to make sure there weren't any regressions. This fixes
xfs/139 for me, so...
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> common/filter | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/filter b/common/filter
> index 6140e58368d7..88fcb6ef68ee 100644
> --- a/common/filter
> +++ b/common/filter
> @@ -495,7 +495,7 @@ _filter_od()
> fi
>
> offset="${line%% *}"
> - printf '%o%s\n' $((offset / BLOCK_SIZE)) "${line#$offset}"
> + printf '%o%s\n' $(("0$offset" / BLOCK_SIZE)) "${line#$offset}"
> done
> }
>
> --
> 2.24.0
>
next prev parent reply other threads:[~2019-12-12 6:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-12 3:11 [PATCH] common/filter: prepend 0 to treat offset as octal Naohiro Aota
2019-12-12 6:04 ` Darrick J. Wong [this message]
2019-12-12 6:10 ` Darrick J. Wong
2019-12-12 10:00 ` Kusanagi Kouichi
2019-12-15 16:08 ` Eryu Guan
2019-12-15 16:07 ` Eryu Guan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191212060437.GA99869@magnolia \
--to=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=naohiro.aota@wdc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox