aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-09-27 16:09:54 -0700
committerRob Landley <rob@landley.net>2018-10-04 12:51:47 -0500
commite29880dee2be718e5c1d1e175708f922962dbed2 (patch)
tree87980136f967b90e884570b938c6a5f29bbd32a0
parentd40e21cebdc752b8ee746d0008a599c00aa54e97 (diff)
downloadtoybox-e29880dee2be718e5c1d1e175708f922962dbed2.tar.gz
blockdev: BLKRAGET returns 512-byte sectors.
Bug: https://github.com/landley/toybox/issues/104
-rw-r--r--toys/other/blockdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/blockdev.c b/toys/other/blockdev.c
index e5fd0c3c..c2e10a22 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);
}