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. --- lib/rfsv32.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/rfsv32.cc') diff --git a/lib/rfsv32.cc b/lib/rfsv32.cc index 74a1959..0b6f120 100644 --- a/lib/rfsv32.cc +++ b/lib/rfsv32.cc @@ -358,7 +358,7 @@ devlist(u_int32_t &devbits) } Enum rfsv32:: -devinfo(const u_int32_t dev, u_int32_t &free, u_int32_t &total, u_int32_t &attr, u_int32_t &uniqueid, string &name) +devinfo(const u_int32_t dev, PlpDrive &drive) { bufferStore a; Enum res; @@ -368,13 +368,14 @@ devinfo(const u_int32_t dev, u_int32_t &free, u_int32_t &total, u_int32_t &attr, return E_PSI_FILE_DISC; res = getResponse(a); if (res == E_PSI_GEN_NONE) { - attr = a.getDWord(0); - uniqueid = a.getDWord(16); - total = a.getDWord(20); - free = a.getDWord(28); - // vnamelen = a.getDWord(36); + drive.setMediaType(a.getDWord(0)); + drive.setDriveAttribute(a.getDWord(8)); + drive.setMediaAttribute(a.getDWord(12)); + drive.setUID(a.getDWord(16)); + drive.setSize(a.getDWord(20), a.getDWord(24)); + drive.setSpace(a.getDWord(28), a.getDWord(32)); a.addByte(0); - name = a.getString(40); + drive.setName('A' + dev, a.getString(40)); } return res; } -- cgit v1.2.3