summaryrefslogtreecommitdiffstats
path: root/lilo-config/common/lilo.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit4a25ca5c80d9b88fdc1a0d44d1db47da47206899 (patch)
tree8a1d1e893a80df8ad5233802c2b0e39220b86168 /lilo-config/common/lilo.cc
parent441266d591a9064dd619da0e1bd49b871d6a9c70 (diff)
downloadtdeadmin-4a25ca5c80d9b88fdc1a0d44d1db47da47206899.tar.gz
tdeadmin-4a25ca5c80d9b88fdc1a0d44d1db47da47206899.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lilo-config/common/lilo.cc')
-rw-r--r--lilo-config/common/lilo.cc52
1 files changed, 26 insertions, 26 deletions
diff --git a/lilo-config/common/lilo.cc b/lilo-config/common/lilo.cc
index 6ce15dc..c61429a 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).tqcontains("image"))
+ if((*it).contains("image"))
return true;
else
return false;
}
-liloimage *liloimages::tqfind(String const &s) const
+liloimage *liloimages::find(String const &s) const
{
String t = String::escapeForRegExp(s);
@@ -61,7 +61,7 @@ liloimage *liloimages::tqfind(String const &s) const
}
void liloimages::remove(String const &s)
{
- liloimage *i=tqfind(s);
+ liloimage *i=find(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.tqcontains("/dev/hda")) {
+ if(drives.contains("/dev/hda")) {
defaults += "boot=/dev/hda"; // 1st IDE/ATAPI harddisk
defaults += "lba32"; // otherwise it is assumed
}
- else if(drives.tqcontains("/dev/sda")) {
+ else if(drives.contains("/dev/sda")) {
defaults += "boot=/dev/sda"; // 1st SCSI harddisk
defaults += "linear"; // some SCSI disks need this
- } else if(drives.tqcontains("/dev/i2o/hda"))
+ } else if(drives.contains("/dev/i2o/hda"))
defaults += "boot=/dev/i2o/hda"; // 1st I2O harddisk
- else if(drives.tqcontains("/dev/eda"))
+ else if(drives.contains("/dev/eda"))
defaults += "boot=/dev/eda"; // 1st MCA ESDI harddisk
- else if(drives.tqcontains("/dev/pda"))
+ else if(drives.contains("/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).tqcontains("System.map") || (*it).tqcontains("initrd")) // definitely not a kernel
+ if((*it).contains("System.map") || (*it).contains("initrd")) // definitely not a kernel
continue;
- if((*it).tqcontains("vmlinux")) {
+ if((*it).contains("vmlinux")) {
// If the kernel exists both in compressed and in
// uncompressed form, ignore the uncompressed one.
- String compr=(*it).tqreplace("vmlinux", "vmlinuz");
+ String compr=(*it).replace("vmlinux", "vmlinuz");
if(!access(compr, F_OK))
continue;
}
@@ -243,27 +243,27 @@ bool liloconf::probe()
if (label.empty())
{
label = (*it);
- if (label.tqfind('/') != string::npos)
+ if (label.find('/') != 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).tqcontains("vmlinuz")) {
- initrd1=(*it).tqreplace("vmlinux", "initrd")+".img";
- initrd2=(*it).tqreplace("vmlinuz", "initrd.img");
+ if((*it).contains("vmlinuz")) {
+ 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("vmlinux")) {
+ initrd1=(*it).replace("vmlinux", "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("kernel")) {
+ initrd1=(*it).replace("kernel", "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 if((*it).contains("linux")) {
+ initrd1=(*it).replace("linux", "initrd")+".img";
+ initrd2=(*it).replace("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.tqcontains("enterprise"))
- label=label.tqreplace("enterprise", "E");
+ if(label.contains("enterprise"))
+ label=label.replace("enterprise", "E");
if(label.size()>15)
label=label.left(15);