Browse Source

fix compilation error

pull/695/head
Chris Lu 7 years ago
parent
commit
49f4216280
  1. 4
      weed/storage/volume_super_block.go

4
weed/storage/volume_super_block.go

@ -32,7 +32,7 @@ type SuperBlock struct {
} }
func (s *SuperBlock) BlockSize() int { func (s *SuperBlock) BlockSize() int {
switch version {
switch s.version {
case Version2: case Version2:
return _SuperBlockSize + int(s.extraSize) return _SuperBlockSize + int(s.extraSize)
} }
@ -120,7 +120,7 @@ func ReadSuperBlock(dataFile *os.File) (superBlock SuperBlock, err error) {
superBlock.Extra = &master_pb.SuperBlockExtra{} superBlock.Extra = &master_pb.SuperBlockExtra{}
err = proto.Unmarshal(extraData, superBlock.Extra) err = proto.Unmarshal(extraData, superBlock.Extra)
if err != nil { if err != nil {
err = fmt.Errorf("cannot read volume %s super block extra: %v", dataFile.Name(), e)
err = fmt.Errorf("cannot read volume %s super block extra: %v", dataFile.Name(), err)
return return
} }
} }

Loading…
Cancel
Save