67 |
|
|
68 |
/* definition de tous les type de bus */ |
/* definition de tous les type de bus */ |
69 |
Tsearchdrive listesearchdrives[] = { |
Tsearchdrive listesearchdrives[] = { |
70 |
|
{ "", "", "SCSI", 110 }, /* scsi (sg) */ |
71 |
#if LINUX_IDE /* pure ide devices with linux */ |
#if LINUX_IDE /* pure ide devices with linux */ |
72 |
{ "dev=/dev/hda", "/dev/hda", "IDE", 100 }, |
{ "dev=/dev/hda", "/dev/hda", "IDE", 100 }, |
73 |
{ "dev=/dev/hdb", "/dev/hdb", "IDE", 100 }, |
{ "dev=/dev/hdb", "/dev/hdb", "IDE", 100 }, |
81 |
{ "dev=/dev/hdj", "/dev/hdj", "IDE", 100 }, |
{ "dev=/dev/hdj", "/dev/hdj", "IDE", 100 }, |
82 |
#endif |
#endif |
83 |
#if LINUX_SCSI /* SCSI alias with linux */ |
#if LINUX_SCSI /* SCSI alias with linux */ |
84 |
{ "dev=/dev/scd0", "/dev/scd0", "DSCSI", 90 }, |
{ "dev=/dev/scd0", "/dev/scd0", "SCSID", 90 }, |
85 |
{ "dev=/dev/scd1", "/dev/scd1", "DSCSI", 90 }, |
{ "dev=/dev/scd1", "/dev/scd1", "SCSID", 90 }, |
86 |
{ "dev=/dev/scd2", "/dev/scd2", "DSCSI", 90 }, |
{ "dev=/dev/scd2", "/dev/scd2", "SCSID", 90 }, |
87 |
{ "dev=/dev/scd3", "/dev/scd3", "DSCSI", 90 }, |
{ "dev=/dev/scd3", "/dev/scd3", "SCSID", 90 }, |
88 |
{ "dev=/dev/scd4", "/dev/scd4", "DSCSI", 90 }, |
{ "dev=/dev/scd4", "/dev/scd4", "SCSID", 90 }, |
89 |
{ "dev=/dev/scd5", "/dev/scd5", "DSCSI", 90 }, |
{ "dev=/dev/scd5", "/dev/scd5", "SCSID", 90 }, |
90 |
{ "dev=/dev/scd6", "/dev/scd6", "DSCSI", 90 }, |
{ "dev=/dev/scd6", "/dev/scd6", "SCSID", 90 }, |
91 |
|
{ "dev=/dev/sr0", "/dev/sr0", "SCSIS", 92 }, |
92 |
|
{ "dev=/dev/sr1", "/dev/sr1", "SCSIS", 92 }, |
93 |
|
{ "dev=/dev/sr2", "/dev/sr2", "SCSIS", 92 }, |
94 |
|
{ "dev=/dev/sr3", "/dev/sr3", "SCSIS", 92 }, |
95 |
|
{ "dev=/dev/sr4", "/dev/sr4", "SCSIS", 92 }, |
96 |
|
{ "dev=/dev/sr5", "/dev/sr5", "SCSIS", 92 }, |
97 |
|
{ "dev=/dev/sr6", "/dev/sr6", "SCSIS", 92 }, |
98 |
|
{ "dev=/dev/sg0", "/dev/sg0", "SCSIG", 94 }, |
99 |
|
{ "dev=/dev/sg1", "/dev/sg1", "SCSIG", 94 }, |
100 |
|
{ "dev=/dev/sg2", "/dev/sg2", "SCSIG", 94 }, |
101 |
|
{ "dev=/dev/sg3", "/dev/sg3", "SCSIG", 94 }, |
102 |
|
{ "dev=/dev/sg4", "/dev/sg4", "SCSIG", 94 }, |
103 |
|
{ "dev=/dev/sg5", "/dev/sg5", "SCSIG", 94 }, |
104 |
|
{ "dev=/dev/sg6", "/dev/sg6", "SCSIG", 94 }, |
105 |
|
|
106 |
#endif |
#endif |
|
{ "", "", "SCSI", 80 }, /* scsi (sg) */ |
|
107 |
{ "dev=ATA:", "ATA:", "ATA", 60 }, /* ide sg */ |
{ "dev=ATA:", "ATA:", "ATA", 60 }, /* ide sg */ |
108 |
{ "dev=ATAPI:", "ATAPI:", "ATAPI", 40 }, /* ide */ |
{ "dev=ATAPI:", "ATAPI:", "ATAPI", 40 }, /* ide */ |
109 |
{ NULL, NULL, NULL, 0} |
{ NULL, NULL, NULL, 0} |
203 |
} |
} |
204 |
|
|
205 |
/* scan des lecteurs */ |
/* scan des lecteurs */ |
206 |
gboolean scan_for_drives(Tgrave *Ag, GError **Aerror) |
gboolean cdrecord_scan_for_drives(Tgrave *Ag, GError **Aerror) |
207 |
{ |
{ |
208 |
gchar **Lcmd; |
gchar **Lcmd; |
209 |
gchar *Lcommandline; |
gchar *Lcommandline; |
259 |
} |
} |
260 |
|
|
261 |
/* mise a jour capacité du lecteur */ |
/* mise a jour capacité du lecteur */ |
262 |
gboolean maj_drive_info(Tdriveinfo *Adrive, gchar *Adev, GError **Aerror) |
gboolean cdrecord_maj_drive_info(Tdriveinfo *Adrive, gchar *Adev, GError **Aerror) |
263 |
{ |
{ |
264 |
gchar *Lcommandline, *Lout = NULL, *Lerr = NULL; |
gchar *Lcommandline, *Lout = NULL, *Lerr = NULL; |
265 |
gchar *scd = NULL, *sdvd = NULL, *f; |
gchar *scd = NULL, *sdvd = NULL, *f; |
308 |
|
|
309 |
if (!scd) return FALSE; |
if (!scd) return FALSE; |
310 |
|
|
311 |
Adrive->type = Ltype; /* type: lecteur ou graveur */ |
Adrive->type += Ltype; /* type: lecteur ou graveur */ |
312 |
Adrive->vitesse = atoi(scd); /* vitesse de lecture ou de gravure maximum */ |
Adrive->vitesse = atoi(scd); /* vitesse de lecture ou de gravure maximum */ |
313 |
Adrive->vitessedvd = sdvd ? atoi(sdvd) : -1; |
Adrive->vitessedvd = sdvd ? atoi(sdvd) : -1; |
314 |
_DEB("== le type => %d\n", Ltype); |
_DEB("== le type => %d\n", Ltype); |
390 |
|
|
391 |
g_snprintf(Lgravident, sizeof(Lgravident)-1, "dst%scombo", Aop); |
g_snprintf(Lgravident, sizeof(Lgravident)-1, "dst%scombo", Aop); |
392 |
|
|
393 |
Ldevice = get_drive_info(Ag, Lgravident); |
Ldevice = matos_get_drive_info(Ag, Lgravident); |
394 |
|
|
395 |
Lbufvitesse = get_combo_value(Lvitesse); |
Lbufvitesse = get_combo_value(Lvitesse); |
396 |
|
|
785 |
gint g_out, g_err, Lnbrarg; |
gint g_out, g_err, Lnbrarg; |
786 |
gboolean Lstatus = FALSE; |
gboolean Lstatus = FALSE; |
787 |
gchar *Lbufvitesse; |
gchar *Lbufvitesse; |
788 |
Tdriveinfo *Ldevice = get_drive_info(Ag, "dstaudiocombo"); |
Tdriveinfo *Ldevice = matos_get_drive_info(Ag, "dstaudiocombo"); |
789 |
gboolean Lsimul = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sc_grave_get_widget(Ag, "audiosimul"))); |
gboolean Lsimul = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sc_grave_get_widget(Ag, "audiosimul"))); |
790 |
gboolean Lnotfix = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sc_grave_get_widget(Ag, "audionotfix"))); |
gboolean Lnotfix = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sc_grave_get_widget(Ag, "audionotfix"))); |
791 |
gboolean Ldaomode = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sc_grave_get_widget(Ag, "audiodao"))); |
gboolean Ldaomode = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sc_grave_get_widget(Ag, "audiodao"))); |
1021 |
guint Lcomevent, Lcomerrevent; |
guint Lcomevent, Lcomerrevent; |
1022 |
gint g_out, g_err, Lnbrarg; |
gint g_out, g_err, Lnbrarg; |
1023 |
gint *Lcont = sc_grave_get_data(Ag, "cont"); |
gint *Lcont = sc_grave_get_data(Ag, "cont"); |
1024 |
Tdriveinfo *Ldevice = get_drive_info(Ag, "dstothercombo"); |
Tdriveinfo *Ldevice = matos_get_drive_info(Ag, "dstothercombo"); |
1025 |
|
|
1026 |
/* pid de cdrecord */ |
/* pid de cdrecord */ |
1027 |
gint *Lpid = (gint *) sc_grave_get_data(Ag, "pid"); |
gint *Lpid = (gint *) sc_grave_get_data(Ag, "pid"); |
1100 |
guint Lcomevent, Lcomerrevent; |
guint Lcomevent, Lcomerrevent; |
1101 |
gint g_out, g_err, Lnbrarg; |
gint g_out, g_err, Lnbrarg; |
1102 |
gint *Lcont = sc_grave_get_data(Ag, "cont"); |
gint *Lcont = sc_grave_get_data(Ag, "cont"); |
1103 |
Tdriveinfo *Ldevice = get_drive_info(Ag, "dstothercombo"); |
Tdriveinfo *Ldevice = matos_get_drive_info(Ag, "dstothercombo"); |
1104 |
gboolean *Lfastblank = sc_grave_get_data(Ag, "usefastblank"); |
gboolean *Lfastblank = sc_grave_get_data(Ag, "usefastblank"); |
1105 |
|
|
1106 |
/* pid de cdrecord */ |
/* pid de cdrecord */ |