diff options
-rw-r--r-- | toolbox/newfs_msdos.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/toolbox/newfs_msdos.c b/toolbox/newfs_msdos.c index 8e611c6..ff9e844 100644 --- a/toolbox/newfs_msdos.c +++ b/toolbox/newfs_msdos.c @@ -414,11 +414,14 @@ newfs_msdos_main(int argc, char *argv[]) if (!(opt_f || (opt_h && opt_u && opt_S && opt_s && oflag))) { off_t delta; getdiskinfo(fd, fname, dtype, oflag, &bpb); + if (opt_s) { + bpb.bsec = opt_s; + } bpb.bsec -= (opt_ofs / bpb.bps); delta = bpb.bsec % bpb.spt; if (delta != 0) { - warnx("trim %d sectors to adjust to a multiple of %d", - (int)delta, bpb.spt); + warnx("trim %d sectors from %d to adjust to a multiple of %d", + (int)delta, bpb.bsec, bpb.spt); bpb.bsec -= delta; } if (bpb.spc == 0) { /* set defaults */ |