From a9fe8f28a4a9aaf1d9b84dbc6907849ace87f66e Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Tue, 6 Feb 2001 01:01:46 +0000 Subject: - 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. --- plpftp/ftp.cc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'plpftp/ftp.cc') 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; } -- cgit v1.2.3