Reacted on compiler warning about last_rdev, fixed fresh typo bug
This commit is contained in:
parent
64618b7d96
commit
bd11c06c06
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2007.04.09.105543"
|
#define Cdrskin_timestamP "2007.04.09.111215"
|
||||||
|
@ -433,7 +433,7 @@ static int sg_open_scsi_siblings(char *path, int driveno,
|
|||||||
int i_host_no = -1, i_channel_no = -1, i_target_no = -1, i_lun_no = -1;
|
int i_host_no = -1, i_channel_no = -1, i_target_no = -1, i_lun_no = -1;
|
||||||
char msg[161], fname[81];
|
char msg[161], fname[81];
|
||||||
struct stat stbuf;
|
struct stat stbuf;
|
||||||
dev_t last_rdev;
|
dev_t last_rdev = 0;
|
||||||
|
|
||||||
static char tldev[][81]= {"/dev/sr%d", "/dev/scd%d", "/dev/sg%d", ""};
|
static char tldev[][81]= {"/dev/sr%d", "/dev/scd%d", "/dev/sg%d", ""};
|
||||||
/* ts A70609: removed "/dev/st%d" */
|
/* ts A70609: removed "/dev/st%d" */
|
||||||
@ -453,7 +453,7 @@ static int sg_open_scsi_siblings(char *path, int driveno,
|
|||||||
continue;
|
continue;
|
||||||
for (i = 0; i < 32; i++) {
|
for (i = 0; i < 32; i++) {
|
||||||
sprintf(fname, tldev[tld], i);
|
sprintf(fname, tldev[tld], i);
|
||||||
if(stat(fname, &stbuf) != -1)
|
if(stat(fname, &stbuf) == -1)
|
||||||
continue;
|
continue;
|
||||||
if (*sibling_count > 0 && last_rdev == stbuf.st_rdev)
|
if (*sibling_count > 0 && last_rdev == stbuf.st_rdev)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user