aboutsummaryrefslogtreecommitdiffstats
path: root/plpftp
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2001-02-06 01:01:46 +0000
committerFritz Elfert <felfert@to.com>2001-02-06 01:01:46 +0000
commita9fe8f28a4a9aaf1d9b84dbc6907849ace87f66e (patch)
tree0dd290cdf04cfd17a4ab4d0eb86bcb48137a02cb /plpftp
parenta8787d39b2bf1851cdea64a5e0eccc2aff7f15de (diff)
downloadplptools-a9fe8f28a4a9aaf1d9b84dbc6907849ace87f66e.tar.gz
plptools-a9fe8f28a4a9aaf1d9b84dbc6907849ace87f66e.tar.bz2
plptools-a9fe8f28a4a9aaf1d9b84dbc6907849ace87f66e.zip
- Added KDE2 PropsDialog Plugin (incomplete)
- Fixed some KDE related autoconf stuff - Added PlpDrive class for returning results from rfsv:devinfo - Added auto-watch in ppsocket and finally got rid of the nasty SIGPIPE bug. Now it's no more necessary to ignore SIGPIPE in applications. - Made constructors of rfsv16, rfsv32, rpcs16 and rpcs32 private to enforce use of the factories. - Removed error output in the factories and replaced that by error codes which can be retrieved and evaluated by an application.
Diffstat (limited to 'plpftp')
-rw-r--r--plpftp/ftp.cc18
-rw-r--r--plpftp/main.cc6
2 files changed, 8 insertions, 16 deletions
diff --git a/plpftp/ftp.cc b/plpftp/ftp.cc
index aad6187..efe4f82 100644
--- a/plpftp/ftp.cc
+++ b/plpftp/ftp.cc
@@ -242,15 +242,14 @@ session(rfsv & a, rpcs & r, int xargc, char **xargv)
if (!strcmp(DDRIVE, "AUTO")) {
u_int32_t devbits;
- u_int32_t vtotal, vfree, vattr, vuniqueid;
int i;
strcpy(defDrive, "::");
if (a.devlist(devbits) == rfsv::E_PSI_GEN_NONE) {
for (i = 0; i < 26; i++) {
- string n;
- if ((devbits & 1) && a.devinfo(i, vfree, vtotal, vattr, vuniqueid, n) == rfsv::E_PSI_GEN_NONE) {
+ PlpDrive drive;
+ if ((devbits & 1) && a.devinfo(i, drive) == rfsv::E_PSI_GEN_NONE) {
defDrive[0] = 'A' + i;
break;
}
@@ -417,17 +416,16 @@ session(rfsv & a, rpcs & r, int xargc, char **xargv)
if ((res = a.devlist(devbits)) == rfsv::E_PSI_GEN_NONE) {
cout << "Drive Type Volname Total Free UniqueID" << endl;
for (int i = 0; i < 26; i++) {
- string vname;
- u_int32_t vtotal, vfree, vattr, vuniqueid;
+ PlpDrive drive;
if ((devbits & 1) != 0) {
- if (a.devinfo(i, vfree, vtotal, vattr, vuniqueid, vname) == rfsv::E_PSI_GEN_NONE)
+ if (a.devinfo(i, drive) == rfsv::E_PSI_GEN_NONE)
cout << (char) ('A' + i) << " " <<
- hex << setw(4) << setfill('0') << vattr << " " <<
+ hex << setw(4) << setfill('0') << drive.getMediaType() << " " <<
setw(12) << setfill(' ') << setiosflags(ios::left) <<
- vname << resetiosflags(ios::left) << dec << setw(9) <<
- vtotal << setw(9) << vfree << " " << setw(8) << setfill('0') << hex <<
- vuniqueid << endl;
+ drive.getName() << resetiosflags(ios::left) << dec << setw(9) <<
+ drive.getSize() << setw(9) << drive.getSpace() << " " << setw(8) << setfill('0') << hex <<
+ drive.getUID() << endl;
}
devbits >>= 1;
}
diff --git a/plpftp/main.cc b/plpftp/main.cc
index 1755f38..ca3bcaa 100644
--- a/plpftp/main.cc
+++ b/plpftp/main.cc
@@ -30,7 +30,6 @@
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
-#include <signal.h>
#include "ppsocket.h"
#include "rfsv.h"
@@ -71,11 +70,6 @@ main(int argc, char **argv)
ftp f;
int status = 0;
int sockNum = DPORT;
- sigset_t sigset;
-
- sigemptyset(&sigset);
- sigaddset(&sigset, SIGPIPE);
- sigprocmask(SIG_BLOCK, &sigset, 0L);
struct servent *se = getservbyname("psion", "tcp");
endservent();