[email protected] (=?UTF-8?B?SmFyb23DrXIgRG9sZcSNZWs=?=) writes:

>Le dim. 11 avr. 2021 =C3=A0 17:51, Robert Elz <[email protected]> a =C3=A9c=
>rit :
>>
>>     Date:        Sun, 11 Apr 2021 14:25:40 -0000 (UTC)
>>     From:        [email protected] (Michael van Elst)
>>     Message-ID:  <[email protected]>
>>
>>   | +       dg->dg_secperunit =3D vnd->sc_size / DEV_BSIZE;
>>
>> While it shouldn't make any difference for any properly created image
>> file, make it be
>>
>>                         (vnd->sc_size + DEV_BSIZE - 1) / DEV_BSIZE;
>>
>> so that any trailing partial sector remains in the image.

>I don't think it's a good idea to include the sector which can't be written=
> to.

It cannot be read either (in the default strategy mode) and writing
to it in file mode would extend the file. Fortunately sc_size is
already compute as number of DEV_BSIZE blocks, truncated from the
byte length.

I also hear people lamenting that the notion of disk sectors was a mistake
and we should have never left the sea^Uthat disks should be byte-addressible
(but not bit-addressable!).

Reply via email to