Skip to content

INT 21h/440Dh invalid minor should report invalid function #263

Description

@nakatamaho

Summary

The generic block-device IOCTL's documented invalid-function response appears to be lost for an unsupported minor function.

Minimal reproducer

With a valid local block drive A, call INT 21h with:

  • AH=44h, AL=0Dh
  • BL=1 (drive A), CH=08h (disk-drive category), CL=FFh (unsupported minor function)
  • DS:DX pointing at a valid writable parameter block surrounded by guard bytes

Expected behavior

CF is set and AX reports error 01h (invalid function code), per the MS-DOS Version 4.0 Programmer's Reference, Function 440Dh, "Generic IOCtl (for Devices)".

Observed source behavior

In the tested component revision, Genblkdev routes an unsupported minor function through failure(E_CMD). DosDevIOctl then maps a device request carrying S_ERROR to DE_ACCESS, so this path reports the generic device/access error instead of DE_INVLDFUNC. The current local guest fixture had encoded that implementation result as its expectation; we are correcting the test oracle to the documented ABI.

The relevant branches are in kernel/dsk.c and kernel/ioctl.c at component commit ac16c8a7401526f99787e03babdb2f4223d48fc4. The bounded M15 candidate was derived from this commit; its task-local dsk.c edits do not alter the unsupported-minor or S_ERROR mapping paths.

Reference

Could you confirm whether this invalid-minor response is intentional compatibility behavior, or should the kernel return the documented invalid-function error?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions