From 276db8fe7efa26e83310ecffddca044751fd4ab3 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Tue, 6 Mar 2001 16:48:59 +0000 Subject: - Unified drive parameter of some methods: rfsv::devinfo, rfsv::setVolumeName and rpcs::formatOpen now all take the drive-letter as a single const char. - Documented formatOPen() and formatRead(). --- lib/rfsv32.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/rfsv32.cc') diff --git a/lib/rfsv32.cc b/lib/rfsv32.cc index 7849d97..a28d2f2 100644 --- a/lib/rfsv32.cc +++ b/lib/rfsv32.cc @@ -360,24 +360,24 @@ devlist(u_int32_t &devbits) } Enum rfsv32:: -devinfo(const u_int32_t dev, PlpDrive &drive) +devinfo(const char drive, PlpDrive &dinfo) { bufferStore a; Enum res; - a.addDWord(dev); + a.addDWord(toupper(drive) - 'A'); if (!sendCommand(DRIVE_INFO, a)) return E_PSI_FILE_DISC; res = getResponse(a); if (res == E_PSI_GEN_NONE) { - 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)); + dinfo.setMediaType(a.getDWord(0)); + dinfo.setDriveAttribute(a.getDWord(8)); + dinfo.setMediaAttribute(a.getDWord(12)); + dinfo.setUID(a.getDWord(16)); + dinfo.setSize(a.getDWord(20), a.getDWord(24)); + dinfo.setSpace(a.getDWord(28), a.getDWord(32)); a.addByte(0); - drive.setName('A' + dev, a.getString(40)); + dinfo.setName(toupper(drive), a.getString(40)); } return res; } @@ -771,7 +771,7 @@ Enum rfsv32:: setVolumeName(const char drive , const char * const name) { bufferStore a; - a.addDWord(drive - 'A'); + a.addDWord(toupper(drive) - 'A'); a.addWord(strlen(name)); a.addStringT(name); if (!sendCommand(SET_VOLUME_LABEL, a)) -- cgit v1.2.3