Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > ea7710e9d88b1b05b8d30c36cfe50a68 > files > 22

xcdroast-0.98-0.a15.39mdv2010.1.src.rpm

--- xcdroast-0.98alpha15/src/io.c.scan	2003-10-26 15:24:48.000000000 +0100
+++ xcdroast-0.98alpha15/src/io.c	2004-09-20 16:36:03.841108264 +0200
@@ -330,16 +330,26 @@
 	if (strncmp(line,"Cdrecord",8) == 0) {
 		return;
 	}
-
-	if (strncmp(line,"scsibus",7) == 0 ) {
+#if 0
+	if (strncmp(line,"devname",7) == 0 ) {
 		/* set current scsibus nr */
 		strcpy(tmp,line+7);
 		p1=strtok(tmp,":");
-		strcpy(tmp2,p1);	
 		/* now tmp2 contains the current busnr as string */
-		busnr = atoi(tmp2);
+		devname = strdup(p1);
 		return;
 	}
+#endif
+       if (strncmp(line,"scsibus",7) == 0 ) {
+                /* set current scsibus nr */
+                strcpy(tmp,line+7);
+                p1=strtok(tmp,":");
+                strcpy(tmp2,p1);
+                /* now tmp2 contains the current busnr as string */
+                busnr = atoi(tmp2);
+                return;
+        }
+
 
 	/* a line with an error message? */
 	/* get_spawn_path(CDRECORD,tmp); */
@@ -1061,17 +1071,18 @@
 
 	if (doscanbus) {
 		/* scan for scsi devices */
+		scan_other("ATA", 1, txt);
 		scan_traditional(txt);
 
 		/* scan for alternatives */
 #if defined(linux)
 		if (scanparam) {
-			scan_other("ATAPI", 1, txt);
+			scan_other("ATAPI", 2, txt);
 		}
 #endif
 #if defined(sun)
 		if (scanparam) {
-			scan_other("USCSI", 2, txt);
+			scan_other("USCSI", 3, txt);
 		}
 #endif
 	}
--- xcdroast-0.98alpha15/src/setup.c.scan	2003-10-30 12:50:25.000000000 +0100
+++ xcdroast-0.98alpha15/src/setup.c	2004-09-20 16:37:12.290702344 +0200
@@ -22,6 +22,8 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
+#include <glob.h>
+
 /*
 #ifdef HAVE_LOCALE_H
 #include <locale.h>
@@ -4036,7 +4038,14 @@
 
 	/* fill textbox  and do the actual scanning */
 	if (!manual) {
-		scanbus_new(txt, scanparam);
+		glob_t globbuf;
+		int i;
+		if (glob("/dev/cdrom*", GLOB_NOSORT, NULL, &globbuf) == 0) {
+		for (i = 0; globbuf.gl_pathv && globbuf.gl_pathv[i] != NULL ; i
+++) {
+			scanbus_new_single(globbuf.gl_pathv[i], txt);
+		}
+		globfree(&globbuf); }
 	} else {
 		/* the syntax used to scan for REMOTE scsi devices */
 		if (strncmp(devicestr,"REMOTE:", 7) == 0 &&