Blocked against file descriptor drives. Too dangerous for a demo.

This commit is contained in:
Thomas Schmitt 2007-09-24 18:21:32 +00:00
parent 78c16e7590
commit 011ba599cd

View File

@ -123,27 +123,23 @@ int libburner_aquire_by_adr(char *drive_adr)
int ret; int ret;
char libburn_drive_adr[BURN_DRIVE_ADR_LEN]; char libburn_drive_adr[BURN_DRIVE_ADR_LEN];
#ifdef NIX /* Some not-so-harmless drive addresses get blocked in this demo */
if (strncmp(drive_adr, "stdio:", 6) == 0) { if (strncmp(drive_adr, "stdio:/dev/fd/", 14) == 0 ||
fprintf(stderr, "Aquiring standard i/o pseudo-drive '%s'\n", strcmp(drive_adr, "stdio:-") == 0) {
drive_adr + 6); fprintf(stderr, "Will not work with pseudo-drive '%s'\n",
ret = burn_drive_grab_dummy(&drive_list, drive_adr + 6); drive_adr);
} else return 0;
#endif /* NIX */ }
{
/* This tries to resolve links or alternative device files */ /* This tries to resolve links or alternative device files */
ret = burn_drive_convert_fs_adr(drive_adr, libburn_drive_adr); ret = burn_drive_convert_fs_adr(drive_adr, libburn_drive_adr);
if (ret<=0) { if (ret<=0) {
fprintf(stderr, fprintf(stderr, "Address does not lead to a CD burner: '%s'\n",
"Address does not lead to a CD burner: '%s'\n",
drive_adr); drive_adr);
return 0; return 0;
} }
fprintf(stderr,"Aquiring drive '%s' ...\n", libburn_drive_adr); fprintf(stderr,"Aquiring drive '%s' ...\n", libburn_drive_adr);
ret = burn_drive_scan_and_grab(&drive_list, ret = burn_drive_scan_and_grab(&drive_list, libburn_drive_adr, 1);
libburn_drive_adr, 1);
}
if (ret <= 0) { if (ret <= 0) {
fprintf(stderr,"FAILURE with persistent drive address '%s'\n", fprintf(stderr,"FAILURE with persistent drive address '%s'\n",
libburn_drive_adr); libburn_drive_adr);