diff options
author | Elliott Hughes <enh@google.com> | 2021-01-26 11:45:20 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2021-01-26 11:46:13 -0800 |
commit | f8759ce84c7ac956d582189beedb5914c87e7ba1 (patch) | |
tree | 077d8fa09aff92da9f543e0c1dde1dff060d6fdd | |
parent | 8c4b3f0afd38c982ffa910b7736796cd33d24389 (diff) | |
download | newfs_msdos-f8759ce84c7ac956d582189beedb5914c87e7ba1.tar.gz |
Don't use BLKBSZSET on Linux.
This was a workaround for the previous lack of buffering when
newfs_msdos would write in 512 byte sectors even if the underlying block
device was doing 1024 bytes. Now we have a 1MiB buffer, overriding the
sector size shouldn't make a difference.
This brings us closer in line with upstream, which never had this change.
Test: treehugger
Change-Id: I51f9a46b1d9418820b938541adb7e8bc22ac46b5
-rw-r--r-- | mkfs_msdos.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/mkfs_msdos.c b/mkfs_msdos.c index 667df47..08c435b 100644 --- a/mkfs_msdos.c +++ b/mkfs_msdos.c @@ -653,11 +653,6 @@ mkfs_msdos(const char *fname, const char *dtype, const struct msdos_options *op) } #endif -#if defined(__linux__) - if (ioctl(fd, BLKBSZSET, &bpb.bpbBytesPerSec)) - printf("BLKBSZSET to %u failed\n", bpb.bpbBytesPerSec); -#endif - for (lsn = 0; lsn < dir + (fat == 32 ? bpb.bpbSecPerClust : rds); lsn++) { if (got_siginfo) { fprintf(stderr,"%s: writing sector %u of %u (%u%%)\n", |