summaryrefslogtreecommitdiffstats
path: root/lilo-config/common/lilo.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
commitb09bffed6b43262948018dfb0f11890850ddf7c1 (patch)
tree138696bfcc7ac01070d0e8ecaa1cdf94611a2bd8 /lilo-config/common/lilo.cc
parent6d43944a7130b9d1b4ae3fba37b774aced8612cf (diff)
downloadtdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.tar.gz
tdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.zip
TQt4 port kdeadmin
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1237416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lilo-config/common/lilo.cc')
-rw-r--r--lilo-config/common/lilo.cc56
1 files changed, 28 insertions, 28 deletions
diff --git a/lilo-config/common/lilo.cc b/lilo-config/common/lilo.cc
index 6625f0d..6ce15dc 100644
--- a/lilo-config/common/lilo.cc
+++ b/lilo-config/common/lilo.cc
@@ -42,13 +42,13 @@ using namespace std;
bool liloimage::isLinux() const {
const_iterator it=begin();
- if((*it).contains("image"))
+ if((*it).tqcontains("image"))
return true;
else
return false;
}
-liloimage *liloimages::find(String const &s) const
+liloimage *liloimages::tqfind(String const &s) const
{
String t = String::escapeForRegExp(s);
@@ -61,7 +61,7 @@ liloimage *liloimages::find(String const &s) const
}
void liloimages::remove(String const &s)
{
- liloimage *i=find(s);
+ liloimage *i=tqfind(s);
for(iterator it=begin(); it!=end(); it++)
if(*it==*i) {
erase(it);
@@ -186,18 +186,18 @@ bool liloconf::probe()
images.clear();
/* Set some reasonable defaults... */
// Try to figure out the boot device first...
- if(drives.contains("/dev/hda")) {
+ if(drives.tqcontains("/dev/hda")) {
defaults += "boot=/dev/hda"; // 1st IDE/ATAPI harddisk
defaults += "lba32"; // otherwise it is assumed
}
- else if(drives.contains("/dev/sda")) {
+ else if(drives.tqcontains("/dev/sda")) {
defaults += "boot=/dev/sda"; // 1st SCSI harddisk
defaults += "linear"; // some SCSI disks need this
- } else if(drives.contains("/dev/i2o/hda"))
+ } else if(drives.tqcontains("/dev/i2o/hda"))
defaults += "boot=/dev/i2o/hda"; // 1st I2O harddisk
- else if(drives.contains("/dev/eda"))
+ else if(drives.tqcontains("/dev/eda"))
defaults += "boot=/dev/eda"; // 1st MCA ESDI harddisk
- else if(drives.contains("/dev/pda"))
+ else if(drives.tqcontains("/dev/pda"))
defaults += "boot=/dev/pda"; // 1st Parallel port IDE disk
else
defaults += "boot=Insert_your_boot_device_here"; // shouldn't happen
@@ -226,12 +226,12 @@ bool liloconf::probe()
continue;
if(s.st_size<131072) // if you managed to compile a kernel at less than 128k, you're cheating. ;)
continue;
- if((*it).contains("System.map") || (*it).contains("initrd")) // definitely not a kernel
+ if((*it).tqcontains("System.map") || (*it).tqcontains("initrd")) // definitely not a kernel
continue;
- if((*it).contains("vmlinux")) {
+ if((*it).tqcontains("vmlinux")) {
// If the kernel exists both in compressed and in
// uncompressed form, ignore the uncompressed one.
- String compr=(*it).replace("vmlinux", "vmlinuz");
+ String compr=(*it).tqreplace("vmlinux", "vmlinuz");
if(!access(compr, F_OK))
continue;
}
@@ -243,27 +243,27 @@ bool liloconf::probe()
if (label.empty())
{
label = (*it);
- if (label.find('/') != string::npos)
+ if (label.tqfind('/') != string::npos)
label = label.right(label.length()-1-label.rfind('/'));
}
// Check if we have an initial ramdisk (initrd) for this kernel...
String initrd1; // first guess
String initrd2; // second guess
- if((*it).contains("vmlinuz")) {
- initrd1=(*it).replace("vmlinux", "initrd")+".img";
- initrd2=(*it).replace("vmlinuz", "initrd.img");
+ if((*it).tqcontains("vmlinuz")) {
+ initrd1=(*it).tqreplace("vmlinux", "initrd")+".img";
+ initrd2=(*it).tqreplace("vmlinuz", "initrd.img");
}
- else if((*it).contains("vmlinux")) {
- initrd1=(*it).replace("vmlinux", "initrd")+".img";
- initrd2=(*it).replace("vmlinuz", "initrd.img");
+ else if((*it).tqcontains("vmlinux")) {
+ initrd1=(*it).tqreplace("vmlinux", "initrd")+".img";
+ initrd2=(*it).tqreplace("vmlinuz", "initrd.img");
}
- else if((*it).contains("kernel")) {
- initrd1=(*it).replace("kernel", "initrd")+".img";
- initrd2=(*it).replace("vmlinuz", "initrd.img");
+ else if((*it).tqcontains("kernel")) {
+ initrd1=(*it).tqreplace("kernel", "initrd")+".img";
+ initrd2=(*it).tqreplace("vmlinuz", "initrd.img");
}
- else if((*it).contains("linux")) {
- initrd1=(*it).replace("linux", "initrd")+".img";
- initrd2=(*it).replace("vmlinuz", "initrd.img");
+ else if((*it).tqcontains("linux")) {
+ initrd1=(*it).tqreplace("linux", "initrd")+".img";
+ initrd2=(*it).tqreplace("vmlinuz", "initrd.img");
}
else {
initrd1="/boot/initrd-"+version+".img";
@@ -277,8 +277,8 @@ bool liloconf::probe()
initrd = initrd2;
if(label.size()>15) // LILO can't handle this
- if(label.contains("enterprise"))
- label=label.replace("enterprise", "E");
+ if(label.tqcontains("enterprise"))
+ label=label.tqreplace("enterprise", "E");
if(label.size()>15)
label=label.left(15);
@@ -399,8 +399,8 @@ bool liloconf::probe()
case 0x40: // Venix 80286
addOther("Venix", *it);
break;
- case 0x4d: // QNX
- addOther("QNX", *it);
+ case 0x4d: // TQNX
+ addOther("TQNX", *it);
break;
case 0x52: // CP/M (does anyone dual-boot between CP/M and
// Linux? Would be interesting to see. ;) )