the bitrig natano_malloc branch has been created by natano.

it is 2 commits behind master, and 1 commit ahead.

commit d94a20408393fff844884617569d1792a622f169
diff: https://github.com/bitrig/bitrig/commit/d94a204
author: Martin Natano <[email protected]>
date: Sun Apr 19 15:04:25 2015 +0200

Introduce appropriate error checks for DIOCRLDINFO and DIOCGPDINFO requests.

A failing malloc() in a DIOCRLDINFO request does not impact the
stability of a running system and therefore doesn't justify a kernel
panic. Consequently passing M_CANFAIL to malloc() is probably a good
idea; the request can be retried at a later point.

Failure to retrieve the disklabel from disk should produce an error.
Otherwise there is no way for the caller to tell if the request was
successful or not. We now return EIO in that case.

Extend the ERRORS section in ioctl.2 to reflect the new error values:
EIO (*getdisklabel failed) and ENOMEM (malloc failed). While ENOMEM
is not provided for by POSIX as a error code for ioctl(), it doesn't
prevent us from using it.

M       lib/libc/sys/ioctl.2
M       sys/dev/ata/wd.c
M       sys/dev/vnd.c
M       sys/scsi/cd.c
M       sys/scsi/sd.c

Reply via email to