aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rpcs32.cc
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2002-03-18 05:01:40 +0000
committerFritz Elfert <felfert@to.com>2002-03-18 05:01:40 +0000
commit23f25b04b95f08f5fc3aeaf9ea745326246dec9f (patch)
treedbd68bb6a5e228efa95dbfb18fa69c563925163c /lib/rpcs32.cc
parent38fc74f68c90aff4909660b89a9c233eac16f626 (diff)
downloadplptools-23f25b04b95f08f5fc3aeaf9ea745326246dec9f.tar.gz
plptools-23f25b04b95f08f5fc3aeaf9ea745326246dec9f.tar.bz2
plptools-23f25b04b95f08f5fc3aeaf9ea745326246dec9f.zip
- made kpsion SIBO-aware
- Added SIBO-related stuff in PsiTime - Added new class PsiProcess, renamed rpcs:queryDrive to queryPrograms and changed it accordingly - Adapted kspion, plpbackup, plpnfsd and plpftp to use queryPrograms - Several cleanups in rfsv16
Diffstat (limited to 'lib/rpcs32.cc')
-rw-r--r--lib/rpcs32.cc55
1 files changed, 10 insertions, 45 deletions
diff --git a/lib/rpcs32.cc b/lib/rpcs32.cc
index ebb4f9c..92132af 100644
--- a/lib/rpcs32.cc
+++ b/lib/rpcs32.cc
@@ -40,53 +40,12 @@
rpcs32::rpcs32(ppsocket * _skt)
{
skt = _skt;
+ mtCacheS5mx = 0;
reset();
}
Enum<rfsv::errs> rpcs32::
-queryDrive(char drive, bufferArray &ret)
-{
- bufferStore a;
- Enum<rfsv::errs> res;
-
- a.addByte(drive);
- if (!sendCommand(rpcs::QUERY_DRIVE, a))
- return rfsv::E_PSI_FILE_DISC;
- if ((res = getResponse(a, false)) != rfsv::E_PSI_GEN_NONE)
- return res;
- int l = a.getLen();
- ret.clear();
- while (l > 0) {
- bufferStore b, c;
- const char *s;
- char *p;
- int pid;
- int sl;
-
- s = a.getString(0);
- sl = strlen(s) + 1;
- l -= sl;
- a.discardFirstBytes(sl);
- if ((p = strstr(s, ".$"))) {
- *p = '\0'; p += 2;
- sscanf(p, "%d", &pid);
- } else
- pid = 0;
- b.addWord(pid);
- b.addStringT(s);
- s = a.getString(0);
- sl = strlen(s) + 1;
- l -= sl;
- a.discardFirstBytes(sl);
- c.addStringT(s);
- ret.push(c);
- ret.push(b);
- }
- return res;
-}
-
-Enum<rfsv::errs> rpcs32::
-getCmdLine(const char *process, bufferStore &ret)
+getCmdLine(const char *process, string &ret)
{
bufferStore a;
Enum<rfsv::errs> res;
@@ -94,8 +53,8 @@ getCmdLine(const char *process, bufferStore &ret)
a.addStringT(process);
if (!sendCommand(rpcs::GET_CMDLINE, a))
return rfsv::E_PSI_FILE_DISC;
- res = getResponse(a, true);
- ret = a;
+ if ((res = getResponse(a, true)) == rfsv::E_PSI_GEN_NONE)
+ ret = a.getString(0);
return res;
}
@@ -163,6 +122,12 @@ getMachineInfo(machineInfo &mi)
mi.externalPower = (a.getDWord(120) != 0);
+ mtCacheS5mx |= 8;
+ if (res == rfsv::E_PSI_GEN_NONE) {
+ if (!strcmp(mi.machineName, "SERIES5mx"))
+ mtCacheS5mx |= 2;
+ }
+
return res;
}