diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2015-07-07 09:01:52 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2015-07-14 14:40:07 -0400 |
commit | 85c72c6febbf7f4654c9ac57a8506dc5e1a5cba1 (patch) | |
tree | a15ca0dc8bdff1589f620c5332b424b0a0a8d510 /src/hw/ahci.c | |
parent | c7fa7890200afd86e42813ce1bdbc1b32fcfccc5 (diff) | |
download | seabios-85c72c6febbf7f4654c9ac57a8506dc5e1a5cba1.tar.gz |
block: Introduce default_process_op() with common command handling codes
Most disk drivers only implement a couple of the available bios
commands. Unify the common fallback handling code into a new function
default_process_op() to reduce boiler-plate code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/hw/ahci.c')
-rw-r--r-- | src/hw/ahci.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/hw/ahci.c b/src/hw/ahci.c index 82fce429..ad813cec 100644 --- a/src/hw/ahci.c +++ b/src/hw/ahci.c @@ -306,15 +306,8 @@ process_ahci_op(struct disk_op_s *op) return ahci_disk_readwrite(op, 0); case CMD_WRITE: return ahci_disk_readwrite(op, 1); - case CMD_FORMAT: - case CMD_RESET: - case CMD_ISREADY: - case CMD_VERIFY: - case CMD_SEEK: - return DISK_RET_SUCCESS; default: - dprintf(1, "AHCI: unknown disk command %d\n", op->command); - return DISK_RET_EPARAM; + return default_process_op(op); } } |