mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Misc cleanups.
Pointed out by: phk/flexelint
This commit is contained in:
parent
26cc243d90
commit
94ec75ef27
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104299
@ -1010,7 +1010,7 @@ ata_wait(struct ata_device *atadev, u_int8_t mask)
|
||||
|
||||
int
|
||||
ata_command(struct ata_device *atadev, u_int8_t command,
|
||||
u_int64_t lba, u_int16_t count, u_int8_t feature, int flags)
|
||||
u_int64_t lba, u_int16_t count, u_int16_t feature, int flags)
|
||||
{
|
||||
int error = 0;
|
||||
#ifdef ATA_DEBUG
|
||||
|
@ -258,7 +258,7 @@ void ata_start(struct ata_channel *);
|
||||
void ata_reset(struct ata_channel *);
|
||||
int ata_reinit(struct ata_channel *);
|
||||
int ata_wait(struct ata_device *, u_int8_t);
|
||||
int ata_command(struct ata_device *, u_int8_t, u_int64_t, u_int16_t, u_int8_t, int);
|
||||
int ata_command(struct ata_device *, u_int8_t, u_int64_t, u_int16_t, u_int16_t, int);
|
||||
void ata_drawerleds(struct ata_device *, u_int8_t);
|
||||
int ata_printf(struct ata_channel *, int, const char *, ...) __printflike(3, 4);
|
||||
int ata_prtdev(struct ata_device *, const char *, ...) __printflike(2, 3);
|
||||
|
@ -1625,6 +1625,7 @@ acd_send_cue(struct acd_softc *cdp, struct cdr_cuesheet *cuesheet)
|
||||
if ((error = acd_mode_sense(cdp, ATAPI_CDROM_WRITE_PARAMETERS_PAGE,
|
||||
(caddr_t)¶m, sizeof(param))))
|
||||
return error;
|
||||
|
||||
param.data_length = 0;
|
||||
param.page_code = ATAPI_CDROM_WRITE_PARAMETERS_PAGE;
|
||||
param.page_length = 0x32;
|
||||
@ -1638,25 +1639,26 @@ acd_send_cue(struct acd_softc *cdp, struct cdr_cuesheet *cuesheet)
|
||||
param.session_format = cuesheet->session_format;
|
||||
if (cdp->cap.burnproof)
|
||||
param.burnproof = 1;
|
||||
|
||||
if ((error = acd_mode_select(cdp, (caddr_t)¶m, param.page_length + 10)))
|
||||
return error;
|
||||
|
||||
buffer = malloc(cuesheet->len, M_ACD, M_NOWAIT);
|
||||
if (!buffer)
|
||||
if (!(buffer = malloc(cuesheet->len, M_ACD, M_NOWAIT)))
|
||||
return ENOMEM;
|
||||
if ((error = copyin(cuesheet->entries, buffer, cuesheet->len)))
|
||||
return error;
|
||||
|
||||
if (!(error = copyin(cuesheet->entries, buffer, cuesheet->len))) {
|
||||
#ifdef ACD_DEBUG
|
||||
printf("acd: cuesheet lenght = %d\n", cuesheet->len);
|
||||
for (i=0; i<cuesheet->len; i++)
|
||||
if (i%8)
|
||||
printf(" %02x", buffer[i]);
|
||||
else
|
||||
printf("\n%02x", buffer[i]);
|
||||
printf("\n");
|
||||
printf("acd: cuesheet lenght = %d\n", cuesheet->len);
|
||||
for (i=0; i<cuesheet->len; i++)
|
||||
if (i%8)
|
||||
printf(" %02x", buffer[i]);
|
||||
else
|
||||
printf("\n%02x", buffer[i]);
|
||||
printf("\n");
|
||||
#endif
|
||||
error = atapi_queue_cmd(cdp->device, ccb, buffer, cuesheet->len, 0,
|
||||
30, NULL, NULL);
|
||||
error = atapi_queue_cmd(cdp->device, ccb, buffer, cuesheet->len, 0,
|
||||
30, NULL, NULL);
|
||||
}
|
||||
free(buffer, M_ACD);
|
||||
return error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user