50 lines
1.7 KiB
Plaintext
50 lines
1.7 KiB
Plaintext
$OpenBSD: patch-tabdlg_cpp,v 1.1 2002/09/29 17:22:05 naddy Exp $
|
|
--- tabdlg.cpp.orig Thu Jul 19 03:20:59 2001
|
|
+++ tabdlg.cpp Wed Jul 31 22:05:50 2002
|
|
@@ -122,6 +122,7 @@ QFile g(dmesg);
|
|
cstr = *it;
|
|
cstr.insert(0,"/dev/r");
|
|
cstr.insert(cstr.length(), "c");
|
|
+ cstr3 = cstr;
|
|
cstr.insert(0, "cdrecord dev=");
|
|
cstr.insert(cstr.length(), " -scanbus");
|
|
fp = popen(cstr, "r");
|
|
@@ -129,28 +130,17 @@ QFile g(dmesg);
|
|
stop = 0;
|
|
while((f.readLine(cstr2, 512) != -1) && (stop != 1))
|
|
{
|
|
- cstr2 = cstr2.left(cstr2.length() -1 ); // get rid 0x0A
|
|
- if(cstr2.find("devname:") != -1)
|
|
+ if((cstr2.find("scsibus") == -1) && (cstr2.find("libscg") == -1) && (cstr2.find("devname:") == -1) && (cstr2.find(QString("cdrecord"),0,false) == -1))
|
|
{
|
|
- cstr2.replace(QRegExp("^.*: "), "");
|
|
- cstr2.replace(QRegExp("'"), "");
|
|
- cstr2.replace(QRegExp(" "), "");
|
|
- cstr3 = cstr2;
|
|
- }
|
|
- else
|
|
- {
|
|
- if((cstr2.find("scsibus") == -1) && (cstr2.find("libscg") == -1) && ( cstr2.find("scsidev:") == -1) && (cstr2.find(QString("cdrecord"),0,false) == -1))
|
|
+ if(cstr2.find("*") != 12)
|
|
{
|
|
- if(cstr2.find("*") != 12)
|
|
- {
|
|
- cstr2 = cstr2.simplifyWhiteSpace();
|
|
- scname = cstr2.mid(8, 55);
|
|
- scdev = cstr2.left(5);
|
|
- cstr3.insert(cstr3.length(), ":" + scdev + " " + scname);
|
|
- comb_devicename->insertItem(cstr3);
|
|
- comb_audiodevicename->insertItem(cstr3);
|
|
- stop = 1;
|
|
- }
|
|
+ cstr2 = cstr2.simplifyWhiteSpace();
|
|
+ scname = cstr2.mid(8, 55);
|
|
+ scdev = cstr2.left(5);
|
|
+ cstr3.insert(cstr3.length(), ":" + scdev + " " + scname);
|
|
+ comb_devicename->insertItem(cstr3);
|
|
+ comb_audiodevicename->insertItem(cstr3);
|
|
+ stop = 1;
|
|
}
|
|
}
|
|
}
|