diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2024-02-28 22:39:10 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-03-01 01:25:42 +0100 |
commit | 1afe753f75f1e64254c8e29c4c2030e25fa95392 (patch) | |
tree | 914c58009548fc9966640015da366783661b26cc /libbpf | |
parent | d0e63556c4fd10cf3627b6e5c292a1f178a5578f (diff) | |
download | hurd-1afe753f75f1e64254c8e29c4c2030e25fa95392.tar.gz hurd-1afe753f75f1e64254c8e29c4c2030e25fa95392.tar.bz2 hurd-1afe753f75f1e64254c8e29c4c2030e25fa95392.zip |
rumpdisk: do not open device if block size is 0
Currently, if we do:
$ ls /dev/cd0/
The computer seems to get stuck, caused by the divide by 0 in the
rumpdisk server in device_get_status. I noticed that if we have no disk in the
cdrom device, we can still open it but block and media size will be 0
and the message "cd0 dos partition I/O error" will be printed to the
console. To avoid this problem, we check the block size and throw an error
when it is 0. This also works correctly when a disk actually exists.
This should help fix the perl and likely the vim test suites that are
currently failing in https://buildd.debian.org/.
Message-ID: <Zd_8XjcHcbNIp5NM@mars.tail36e24.ts.net>
Diffstat (limited to 'libbpf')
0 files changed, 0 insertions, 0 deletions