[Toybox] [PATCH] blockdev: BLKRAGET returns 512-byte sectors.
enh
enh at google.com
Thu Sep 27 16:12:00 PDT 2018
proof of claim:
https://elixir.bootlin.com/linux/latest/source/block/ioctl.c#L537 (see
line 541).
On Thu, Sep 27, 2018 at 4:11 PM enh <enh at google.com> wrote:
>
> Bug: https://github.com/landley/toybox/issues/104
> ---
> toys/other/blockdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/toys/other/blockdev.c b/toys/other/blockdev.c
> index e5fd0c3..c2e10a2 100644
> --- a/toys/other/blockdev.c
> +++ b/toys/other/blockdev.c
> @@ -65,7 +65,7 @@ void blockdev_main(void)
> xioctl(fd, cmds[i], &val);
>
> flag &= FLAG_setbsz|FLAG_setro|FLAG_flushbufs|FLAG_rereadpt|FLAG_setrw|FLAG_setbsz;
> - if (!flag) printf("%lld\n", (toys.optflags &
> (FLAG_getsz|FLAG_getra)) ? val >> 9: val);
> + if (!flag) printf("%lld\n", (toys.optflags & FLAG_getsz) ? val
> >> 9: val);
> }
> xclose(fd);
> }
> --
> 2.19.0.605.g01d371f741-goog
More information about the Toybox
mailing list