diff -r 6a2083f7eeb8 -r 72ffa331d78d commands/drvinfo/drvinfo.cpp --- a/commands/drvinfo/drvinfo.cpp Mon Sep 20 16:46:34 2010 +0100 +++ b/commands/drvinfo/drvinfo.cpp Tue Sep 28 17:03:08 2010 +0100 @@ -155,20 +155,19 @@ } if (iVerbose) { - aPrintBuf.AppendFormatL(_L("VolName:\t\'%S\'"), &volInfo.iName); + aPrintBuf.AppendFormatL(_L("VolName:\t\'%S\'\r\n"), &volInfo.iName); } - aPrintBuf.AppendL(_L("\r\n")); } void CCmdDrvinfo::PrintDriveInfoL(TInt aDriveNum) { IoUtils::CTextBuffer* buf = IoUtils::CTextBuffer::NewLC(0x100); - TDriveInfo driveInfo; + TDriveInfo driveInfo; User::LeaveIfError(FsL().Drive(driveInfo, aDriveNum)); TVolumeInfo volInfo; - User::LeaveIfError(Fs().Volume(volInfo, aDriveNum)); + TInt volErr = Fs().Volume(volInfo, aDriveNum); if (iVerbose || (iDriveLetter == NULL)) { @@ -191,7 +190,7 @@ FormatMediaAttInfoL(driveInfo, *buf); } - FormatVolInfoL(volInfo, *buf); + if (volErr == KErrNone) FormatVolInfoL(volInfo, *buf); CTextFormatter* formatter = CTextFormatter::NewLC(Stdout()); formatter->TabulateL(0, 2, buf->Descriptor());