mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-02 17:08:56 +00:00
Silence a warning when compile without atapi devices.
This commit is contained in:
parent
390a2b4152
commit
835d29c0cd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=92024
@ -274,10 +274,8 @@ static int
|
||||
ataioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
|
||||
{
|
||||
struct ata_cmd *iocmd = (struct ata_cmd *)addr;
|
||||
struct ata_device *atadev;
|
||||
struct ata_channel *ch;
|
||||
device_t device = devclass_get_device(ata_devclass, iocmd->channel);
|
||||
caddr_t buf;
|
||||
int error, s;
|
||||
|
||||
if (cmd != IOCATA)
|
||||
@ -375,7 +373,9 @@ ataioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
|
||||
return 0;
|
||||
|
||||
#if defined(DEV_ATAPICD) || defined(DEV_ATAPIFD) || defined(DEV_ATAPIST)
|
||||
case ATAPICMD:
|
||||
case ATAPICMD: {
|
||||
struct ata_device *atadev;
|
||||
caddr_t buf;
|
||||
|
||||
if (!device || !(ch = device_get_softc(device)))
|
||||
return ENXIO;
|
||||
@ -409,6 +409,7 @@ ataioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
|
||||
|
||||
free(buf, M_ATA);
|
||||
return error;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user