summaryrefslogtreecommitdiff
path: root/src/unstable/myriadfs.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/unstable/myriadfs.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/unstable/myriadfs.cpp b/src/unstable/myriadfs.cpp
index 32e1ad6..6ed176d 100644
--- a/src/unstable/myriadfs.cpp
+++ b/src/unstable/myriadfs.cpp
@@ -5,6 +5,7 @@
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
6 */ 6 */
7 7
8#include "bu/config.h"
8#include "bu/myriadfs.h" 9#include "bu/myriadfs.h"
9#include "bu/myriadstream.h" 10#include "bu/myriadstream.h"
10 11
@@ -434,7 +435,7 @@ int32_t Bu::MyriadFs::lookupInode( Bu::String::const_iterator iStart,
434void Bu::MyriadFs::readInode( int32_t iNode, RawStat &rs, MyriadStream &rIs ) 435void Bu::MyriadFs::readInode( int32_t iNode, RawStat &rs, MyriadStream &rIs )
435{ 436{
436 rIs.setPos( hNodeIndex.get( iNode )*sizeof(RawStat) ); 437 rIs.setPos( hNodeIndex.get( iNode )*sizeof(RawStat) );
437 if( rIs.read( &rs, sizeof(RawStat) ) < sizeof(RawStat) ) 438 if( rIs.read( &rs, sizeof(RawStat) ) < (int)sizeof(RawStat) )
438 throw Bu::MyriadFsException("Filesystem corruption detected."); 439 throw Bu::MyriadFsException("Filesystem corruption detected.");
439 if( rs.iNode != iNode ) 440 if( rs.iNode != iNode )
440 throw Bu::MyriadFsException("Filesystem corruption detected."); 441 throw Bu::MyriadFsException("Filesystem corruption detected.");
@@ -451,7 +452,7 @@ void Bu::MyriadFs::writeInode( const RawStat &rs,
451{ 452{
452 rOs.setSize( hNodeIndex.getSize()*sizeof(RawStat) ); 453 rOs.setSize( hNodeIndex.getSize()*sizeof(RawStat) );
453 rOs.setPos( hNodeIndex.get( rs.iNode )*sizeof(RawStat) ); 454 rOs.setPos( hNodeIndex.get( rs.iNode )*sizeof(RawStat) );
454 if( rOs.write( &rs, sizeof(RawStat) ) < sizeof(RawStat) ) 455 if( rOs.write( &rs, sizeof(RawStat) ) < (int)sizeof(RawStat) )
455 throw Bu::MyriadFsException("Error writing inode to header stream."); 456 throw Bu::MyriadFsException("Error writing inode to header stream.");
456} 457}
457 458