Make sure to check if CONFIG_AHCI, CONFIG_ATA, CONFIG_USB_MSC is
enabled in their respective cmd_data functions. This reduces the
compile size when they are not enabled.
int ahci_cmd_data(struct disk_op_s *op, void *cdbcmd, u16 blocksize)
{
+ if (! CONFIG_AHCI)
+ return 0;
+
struct ahci_port_s *port = container_of(
op->drive_g, struct ahci_port_s, drive);
struct ahci_cmd_s *cmd = GET_GLOBAL(port->cmd);
int
atapi_cmd_data(struct disk_op_s *op, void *cdbcmd, u16 blocksize)
{
+ if (! CONFIG_ATA)
+ return 0;
+
struct atadrive_s *adrive_g = container_of(
op->drive_g, struct atadrive_s, drive);
struct ata_channel_s *chan_gf = GET_GLOBAL(adrive_g->chan_gf);
int
usb_cmd_data(struct disk_op_s *op, void *cdbcmd, u16 blocksize)
{
+ if (!CONFIG_USB_MSC)
+ return 0;
+
dprintf(16, "usb_cmd_data id=%p write=%d count=%d bs=%d buf=%p\n"
, op->drive_g, 0, op->count, blocksize, op->buf_fl);
struct usbdrive_s *udrive_g = container_of(