Silenced a warnings in libcdio adapter
This commit is contained in:
parent
126e73d19d
commit
a504de4b58
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2011.10.12.100155"
|
#define Cdrskin_timestamP "2011.10.27.091014"
|
||||||
|
@ -142,6 +142,9 @@ Send feedback to libburn-hackers@pykix.org .
|
|||||||
#define Libburn_is_on_solariS 1
|
#define Libburn_is_on_solariS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Proposal by Rocky Bernstein to avoid macro clashes with cdio_config.h */
|
||||||
|
#define __CDIO_CONFIG_H__ 1
|
||||||
|
|
||||||
#include <cdio/cdio.h>
|
#include <cdio/cdio.h>
|
||||||
#include <cdio/logging.h>
|
#include <cdio/logging.h>
|
||||||
#include <cdio/mmc.h>
|
#include <cdio/mmc.h>
|
||||||
@ -621,7 +624,7 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
|||||||
mmc_cdb_t cdb = {{0, }};
|
mmc_cdb_t cdb = {{0, }};
|
||||||
cdio_mmc_direction_t e_direction;
|
cdio_mmc_direction_t e_direction;
|
||||||
CdIo_t *p_cdio;
|
CdIo_t *p_cdio;
|
||||||
unsigned char *sense_pt = NULL;
|
cdio_mmc_request_sense_t *sense_pt = NULL;
|
||||||
|
|
||||||
c->error = 0;
|
c->error = 0;
|
||||||
if (d->p_cdio == NULL) {
|
if (d->p_cdio == NULL) {
|
||||||
@ -664,7 +667,7 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
|||||||
dxfer_len, c->page->data);
|
dxfer_len, c->page->data);
|
||||||
sense_valid = mmc_last_cmd_sense(p_cdio, &sense_pt);
|
sense_valid = mmc_last_cmd_sense(p_cdio, &sense_pt);
|
||||||
if (sense_valid >= 18) {
|
if (sense_valid >= 18) {
|
||||||
memcpy(c->sense, sense_pt,
|
memcpy(c->sense, (unsigned char *) sense_pt,
|
||||||
(size_t) sense_valid >= sizeof(c->sense) ?
|
(size_t) sense_valid >= sizeof(c->sense) ?
|
||||||
sizeof(c->sense) : (size_t) sense_valid );
|
sizeof(c->sense) : (size_t) sense_valid );
|
||||||
spc_decode_sense(c->sense, 0, &key, &asc, &ascq);
|
spc_decode_sense(c->sense, 0, &key, &asc, &ascq);
|
||||||
@ -879,7 +882,7 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
|
|||||||
|
|
||||||
/* GNU/Linux specific determination of block device size */
|
/* GNU/Linux specific determination of block device size */
|
||||||
} else if(S_ISBLK(stbuf.st_mode)) {
|
} else if(S_ISBLK(stbuf.st_mode)) {
|
||||||
int open_mode = O_RDONLY, fd, ret;
|
int open_mode = O_RDONLY, fd;
|
||||||
long blocks;
|
long blocks;
|
||||||
|
|
||||||
blocks = *bytes / 512;
|
blocks = *bytes / 512;
|
||||||
@ -897,7 +900,7 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
|
|||||||
#ifdef Libburn_is_on_freebsD
|
#ifdef Libburn_is_on_freebsD
|
||||||
|
|
||||||
} else if(S_ISCHR(stbuf.st_mode)) {
|
} else if(S_ISCHR(stbuf.st_mode)) {
|
||||||
int fd, ret;
|
int fd;
|
||||||
|
|
||||||
fd = open(path, O_RDONLY);
|
fd = open(path, O_RDONLY);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user