Manually applied: Fix typos: super block -> superblock (#8974)
by: Przemysław Buczkowski <[email protected]>
This commit is contained in:
@@ -702,7 +702,7 @@ Journal::_LoadSuperBlock()
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
||||
TRACE("Journal::_LoadSuperBlock(): super block physical block: %llu\n",
|
||||
TRACE("Journal::_LoadSuperBlock(): superblock physical block: %llu\n",
|
||||
superblockPos);
|
||||
|
||||
JournalSuperBlock superblock;
|
||||
|
||||
@@ -479,7 +479,7 @@ main(int argc,char **argv)
|
||||
|
||||
if (disk.ValidateSuperBlock() < B_OK)
|
||||
{
|
||||
fprintf(stderr,"The disk's super block is corrupt!\n");
|
||||
fprintf(stderr,"The disk's superblock is corrupt!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) 2001-2008 pinc Software. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//! Handles BFS super block, disk access etc.
|
||||
//! Handles BFS superblock, disk access etc.
|
||||
|
||||
#include "Disk.h"
|
||||
#include "dump.h"
|
||||
@@ -157,7 +157,7 @@ Disk::Disk(const char *deviceName, bool rawMode, off_t start, off_t stop)
|
||||
|
||||
if (fBufferedFile->ReadAt(512 + fRawDiskOffset, &fSuperBlock,
|
||||
sizeof(disk_super_block)) < 1)
|
||||
fprintf(stderr,"Disk: Could not read super block\n");
|
||||
fprintf(stderr,"Disk: Could not read superblock\n");
|
||||
|
||||
//dump_super_block(&fSuperBlock);
|
||||
}
|
||||
@@ -277,21 +277,21 @@ Disk::ScanForSuperBlock(off_t start, off_t stop)
|
||||
printf("\n(%ld) *** BFS superblock found at: %Ld\n",superBlocks.CountItems() + 1,offset);
|
||||
dump_super_block(super);
|
||||
|
||||
// add a copy of the super block to the list
|
||||
// add a copy of the superblock to the list
|
||||
bfs_disk_info *info = (bfs_disk_info *)malloc(sizeof(bfs_disk_info));
|
||||
if (info == NULL)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
memcpy(&info->super_block, super, sizeof(disk_super_block));
|
||||
info->offset = offset + i - 512;
|
||||
/* location off the BFS super block is 512 bytes after the partition start */
|
||||
/* location off the BFS superblock is 512 bytes after the partition start */
|
||||
superBlocks.AddItem(info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (superBlocks.CountItems() == 0) {
|
||||
puts("\nCouldn't find any BFS super blocks!");
|
||||
puts("\nCouldn't find any BFS superblocks!");
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
}
|
||||
|
||||
@@ -411,7 +411,7 @@ Disk::RecreateSuperBlock()
|
||||
bfs_inode indexDir;
|
||||
bfs_inode rootDir;
|
||||
if (ScanForIndexAndRoot(&indexDir,&rootDir) < B_OK) {
|
||||
fprintf(stderr,"ERROR: Could not find root directory! Trying to recreate the super block will have no effect!\n\tSetting standard values for the root dir.\n");
|
||||
fprintf(stderr,"ERROR: Could not find root directory! Trying to recreate the superblock will have no effect!\n\tSetting standard values for the root dir.\n");
|
||||
rootDir.inode_num.allocation_group = 8;
|
||||
rootDir.inode_num.start = 0;
|
||||
rootDir.inode_num.length = 1;
|
||||
|
||||
@@ -130,7 +130,7 @@ struc BlockRun
|
||||
.length resw 1
|
||||
endstruc
|
||||
|
||||
; BFS super block
|
||||
; BFS superblock
|
||||
struc SuperBlock
|
||||
.name resb 32
|
||||
.magic1 resd 1
|
||||
@@ -665,7 +665,7 @@ kBootBlockSignature dw 0xaa55
|
||||
|
||||
second_boot_block:
|
||||
|
||||
; first comes the BFS super block
|
||||
; first comes the BFS superblock
|
||||
superblock:
|
||||
%rep sizeof(SuperBlock)
|
||||
db 0
|
||||
|
||||
@@ -151,12 +151,12 @@ main(int argc, const char *const *argv)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// read super block
|
||||
// read superblock
|
||||
disk_super_block superBlock;
|
||||
read_from(fd, 512, &superBlock, sizeof(superBlock));
|
||||
|
||||
if (superBlock.magic1 != SUPER_BLOCK_MAGIC1) {
|
||||
fprintf(stderr, "Error: Bad super block magic. This is probably not a "
|
||||
fprintf(stderr, "Error: Bad superblock magic. This is probably not a "
|
||||
"BFS image.\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -172,7 +172,7 @@ main(int argc, const char *const *argv)
|
||||
int64 blockCount = st.st_size / blockSize;
|
||||
if (blockCount != superBlock.num_blocks) {
|
||||
fprintf(stderr, "Error: Number of blocks in image and the number in "
|
||||
"the super block differ: %lld vs. %lld\n", blockCount,
|
||||
"the superblock differ: %lld vs. %lld\n", blockCount,
|
||||
superBlock.num_blocks);
|
||||
exit(1);
|
||||
}
|
||||
@@ -206,7 +206,7 @@ main(int argc, const char *const *argv)
|
||||
|
||||
printf("bfs_fragmenter: marked %lld blocks used\n", occupiedBlocks);
|
||||
|
||||
// write back the super block
|
||||
// write back the superblock
|
||||
superBlock.used_blocks += occupiedBlocks;
|
||||
write_to(fd, 512, &superBlock, sizeof(superBlock));
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file may be used under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
//! super block, mounting, etc.
|
||||
//! superblock, mounting, etc.
|
||||
|
||||
|
||||
#include "Debug.h"
|
||||
@@ -313,13 +313,13 @@ Volume::Mount(const char *deviceName, uint32 flags)
|
||||
}
|
||||
#endif
|
||||
|
||||
// read the super block
|
||||
// read the superblock
|
||||
if (Identify(fDevice, &fSuperBlock) != B_OK) {
|
||||
FATAL(("invalid super block!\n"));
|
||||
FATAL(("invalid superblock!\n"));
|
||||
return B_BAD_VALUE;
|
||||
}
|
||||
|
||||
// initialize short hands to the super block (to save byte swapping)
|
||||
// initialize short hands to the superblock (to save byte swapping)
|
||||
fBlockSize = fSuperBlock.BlockSize();
|
||||
fBlockShift = fSuperBlock.BlockShift();
|
||||
fAllocationGroupShift = fSuperBlock.AllocationGroupShift();
|
||||
@@ -537,7 +537,7 @@ Volume::Identify(int fd, disk_super_block *superBlock)
|
||||
if (read_pos(fd, 0, buffer, sizeof(buffer)) != sizeof(buffer))
|
||||
return B_IO_ERROR;
|
||||
|
||||
// Note: that does work only for x86, for PowerPC, the super block
|
||||
// Note: that does work only for x86, for PowerPC, the superblock
|
||||
// may be located at offset 0!
|
||||
memcpy(superBlock, buffer + 512, sizeof(disk_super_block));
|
||||
if (!superBlock->IsValid()) {
|
||||
@@ -583,11 +583,11 @@ Volume::Initialize(const char *device, const char *name, uint32 blockSize, uint3
|
||||
|
||||
off_t numBlocks = deviceSize / blockSize;
|
||||
|
||||
// create valid super block
|
||||
// create valid superblock
|
||||
|
||||
fSuperBlock.Initialize(name, numBlocks, blockSize);
|
||||
|
||||
// initialize short hands to the super block (to save byte swapping)
|
||||
// initialize short hands to the superblock (to save byte swapping)
|
||||
fBlockSize = fSuperBlock.BlockSize();
|
||||
fBlockShift = fSuperBlock.BlockShift();
|
||||
fAllocationGroupShift = fSuperBlock.AllocationGroupShift();
|
||||
|
||||
@@ -191,7 +191,7 @@ super_block_is_sane(myfs_info *myfs)
|
||||
myfs->dsb.magic2 != SUPER_BLOCK_MAGIC2 ||
|
||||
myfs->dsb.magic3 != SUPER_BLOCK_MAGIC3) {
|
||||
|
||||
printf("warning: super block magic numbers are wrong:\n");
|
||||
printf("warning: superblock magic numbers are wrong:\n");
|
||||
printf("0x%x (0x%x) 0x%x (0x%x) 0x%x (0x%x)\n",
|
||||
myfs->dsb.magic1, SUPER_BLOCK_MAGIC1,
|
||||
myfs->dsb.magic2, SUPER_BLOCK_MAGIC2,
|
||||
@@ -214,7 +214,7 @@ super_block_is_sane(myfs_info *myfs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* make sure that the partition is as big as the super block
|
||||
/* make sure that the partition is as big as the superblock
|
||||
says it is */
|
||||
num_dev_blocks = get_num_device_blocks(myfs->fd);
|
||||
if (myfs->dsb.num_blocks * myfs->dsb.block_size >
|
||||
@@ -288,13 +288,13 @@ myfs_mount(nspace_id nsid, const char *device, ulong flags,
|
||||
}
|
||||
|
||||
if (read_super_block(myfs) != 0) {
|
||||
printf("could not read super block on device %s\n", device);
|
||||
printf("could not read superblock on device %s\n", device);
|
||||
ret = EBADF;
|
||||
goto error2;
|
||||
}
|
||||
|
||||
if (super_block_is_sane(myfs) == 0) {
|
||||
printf("bad super block\n");
|
||||
printf("bad superblock\n");
|
||||
ret = EBADF;
|
||||
goto error2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user