Implemented persistent drive adresses, method to leave all drives but one untouched

This commit is contained in:
Mario Danic
2006-08-15 20:40:30 +00:00
parent 21e92dcf3e
commit 42585d6bcf
3 changed files with 64 additions and 0 deletions

View File

@@ -25,6 +25,9 @@
static void enumerate_common(char *fname);
/* ts A51221 */
int burn_drive_is_banned(char *device_address);
static int sgio_test(int fd)
{
unsigned char test_ops[] = { 0, 0, 0, 0, 0, 0 };
@@ -50,6 +53,9 @@ void ata_enumerate(void)
/* open O_RDWR so we don't think read only drives are
in some way useful
*/
/* ts A51221 */
if (burn_drive_is_banned(fname))
continue;
fd = open(fname, O_RDWR | O_NONBLOCK);
if (fd == -1)
continue;
@@ -85,6 +91,9 @@ void sg_enumerate(void)
/* open RDWR so we don't accidentally think read only drives
are in some way useful
*/
/* ts A51221 */
if (burn_drive_is_banned(fname))
continue;
fd = open(fname, O_RDWR);
if (fd == -1)
continue;