[FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces

This commit is contained in:
Victor Perevertkin 2021-06-11 15:29:21 +03:00
parent 4b4ffa92f5
commit 34593d933b
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
952 changed files with 12942 additions and 12942 deletions

View file

@ -19,7 +19,7 @@ bool create_bad_block_inode( PEXT2_FILESYS Ext2Sys,
bool retval;
EXT2_INODE inode;
LARGE_INTEGER SysTime;
NtQuerySystemTime(&SysTime);
ext2_mark_inode_bitmap(Ext2Sys->inode_map, EXT2_BAD_INO);

View file

@ -226,7 +226,7 @@ bool ext2_write_inode_bitmap(PEXT2_FILESYS fs)
return false;
nbytes = (size_t) ((EXT2_INODES_PER_GROUP(fs->ext2_sb)+7) / 8);
bitmap_block = (char *)RtlAllocateHeap(RtlGetProcessHeap(), 0, fs->blocksize);
if (!bitmap_block) return false;
@ -249,7 +249,7 @@ bool ext2_write_inode_bitmap(PEXT2_FILESYS fs)
retval = NT_SUCCESS(Ext2WriteDisk(
fs,
((ULONGLONG)blk * fs->blocksize),
fs->blocksize,
fs->blocksize,
(unsigned char *)bitmap_block));
if (!retval)
@ -407,7 +407,7 @@ bool read_bitmaps(PEXT2_FILESYS fs, int do_inode, int do_block)
{
retval = NT_SUCCESS(Ext2ReadDisk(
fs,
((ULONGLONG)blk * fs->blocksize),
((ULONGLONG)blk * fs->blocksize),
block_nbytes,
(unsigned char *) block_bitmap));
@ -436,8 +436,8 @@ bool read_bitmaps(PEXT2_FILESYS fs, int do_inode, int do_block)
if (blk)
{
retval = NT_SUCCESS(Ext2ReadDisk(
fs, ((LONGLONG)blk * fs->blocksize),
inode_nbytes,
fs, ((LONGLONG)blk * fs->blocksize),
inode_nbytes,
(unsigned char *)inode_bitmap));
if (!retval)
@ -461,7 +461,7 @@ bool read_bitmaps(PEXT2_FILESYS fs, int do_inode, int do_block)
}
return true;
cleanup:
if (do_block)

View file

@ -35,7 +35,7 @@ bool ext2_bg_has_super(PEXT2_SUPER_BLOCK pExt2Sb, int group_block)
if (test_root(group_block, 3) || (test_root(group_block, 5)) ||
test_root(group_block, 7))
return true;
return false;
}

View file

@ -35,7 +35,7 @@ bool ext2_get_inode_lba(PEXT2_FILESYS Ext2Sys, ULONG no, LONGLONG *offset)
*offset = loc;
return true;
return true;
}
bool ext2_load_inode(PEXT2_FILESYS Ext2Sys, ULONG no, PEXT2_INODE pInode)
@ -65,7 +65,7 @@ bool ext2_save_inode(PEXT2_FILESYS Ext2Sys, ULONG no, PEXT2_INODE pInode)
{
bRet = NT_SUCCESS(Ext2WriteDisk(
Ext2Sys,
offset,
offset,
sizeof(EXT2_INODE),
(unsigned char *)pInode));
}
@ -93,12 +93,12 @@ bool ext2_new_inode(PEXT2_FILESYS fs, ULONG dir, int mode,
if (!map)
return false;
if (dir > 0)
if (dir > 0)
dir_group = (dir - 1) / EXT2_INODES_PER_GROUP(fs->ext2_sb);
start_inode = (dir_group * EXT2_INODES_PER_GROUP(fs->ext2_sb)) + 1;
if (start_inode < EXT2_FIRST_INODE(fs->ext2_sb))
start_inode = EXT2_FIRST_INODE(fs->ext2_sb);
@ -115,7 +115,7 @@ bool ext2_new_inode(PEXT2_FILESYS fs, ULONG dir, int mode,
i = EXT2_FIRST_INODE(fs->ext2_sb);
} while (i != start_inode);
if (ext2_test_inode_bitmap(map, i))
return false;
@ -138,21 +138,21 @@ bool ext2_expand_block( PEXT2_FILESYS Ext2Sys, PEXT2_INODE Inode,
ULONG Offset = 0;
PEXT2_SUPER_BLOCK pExt2Sb = Ext2Sys->ext2_sb;
pData = (ULONG *)RtlAllocateHeap(RtlGetProcessHeap(), 0, Ext2Sys->blocksize);
if (!pData)
{
bRet = false;
goto errorout;
}
if (!ext2_read_block(Ext2Sys, dwContent, (void *)pData))
{
bRet = false;
goto errorout;
}
if (layer == 1)
{
*dwRet = dwContent;
@ -169,7 +169,7 @@ bool ext2_expand_block( PEXT2_FILESYS Ext2Sys, PEXT2_INODE Inode,
j = Index % temp;
dwBlk = pData[i];
if (dwBlk == 0)
{
if (ext2_alloc_block(Ext2Sys, 0, &dwBlk) )
@ -179,11 +179,11 @@ bool ext2_expand_block( PEXT2_FILESYS Ext2Sys, PEXT2_INODE Inode,
Inode->i_blocks += (Ext2Sys->blocksize / SECTOR_SIZE);
}
if (!bDirty)
goto errorout;
}
if (!ext2_expand_block(Ext2Sys, Inode, dwBlk, j, layer - 1, bDirty, &dwNewBlk, &Offset))
{
bRet = false;
@ -274,7 +274,7 @@ bool ext2_expand_inode( PEXT2_FILESYS Ext2Sys,
&dwNewBlk,
&Offset );
}
break;
}
@ -371,7 +371,7 @@ bool ext2_block_map(PEXT2_FILESYS Ext2Sys, PEXT2_INODE inode, ULONG block, ULONG
{
dwBlk = inode->i_block[i==0 ? (Index):(i + 12 - 1)];
bRet = ext2_get_block(Ext2Sys, dwBlk, Index , i, &dwBlk);
bRet = ext2_get_block(Ext2Sys, dwBlk, Index , i, &dwBlk);
break;
}
@ -391,8 +391,8 @@ bool ext2_block_map(PEXT2_FILESYS Ext2Sys, PEXT2_INODE inode, ULONG block, ULONG
ULONG ext2_build_bdl(PEXT2_FILESYS Ext2Sys,
PEXT2_INODE ext2_inode,
IN ULONG offset,
IN ULONG size,
IN ULONG offset,
IN ULONG size,
OUT PEXT2_BDL *ext2_bdl )
{
ULONG nBeg, nEnd, nBlocks;
@ -432,17 +432,17 @@ ULONG ext2_build_bdl(PEXT2_FILESYS Ext2Sys,
{
memset(ext2bdl, 0, sizeof(EXT2_BDL) * nBlocks);
for (i = nBeg; i < nEnd; i++)
{
if (!ext2_block_map(Ext2Sys, ext2_inode, i, &dwBlk))
{
goto fail;
}
lba = (LONGLONG) dwBlk;
lba = lba * Ext2Sys->blocksize;
if (nBlocks == 1) // ie. (nBeg == nEnd - 1)
{
dwBytes = size;
@ -513,13 +513,13 @@ bool ext2_read_inode(PEXT2_FILESYS Ext2Sys,
if (blocks <= 0)
return false;
for(i = 0; i < blocks; i++)
{
bRet = NT_SUCCESS(Ext2ReadDisk(
Ext2Sys,
ext2_bdl[i].Lba,
ext2_bdl[i].Lba,
ext2_bdl[i].Length,
(PUCHAR)Buffer + ext2_bdl[i].Offset
));
@ -579,12 +579,12 @@ bool ext2_write_inode (PEXT2_FILESYS Ext2Sys,
if (blocks <= 0)
return false;
for(i = 0; i < blocks; i++)
{
bRet = NT_SUCCESS(Ext2WriteDisk(
Ext2Sys,
ext2_bdl[i].Lba,
ext2_bdl[i].Lba,
ext2_bdl[i].Length,
(PUCHAR)Buffer + ext2_bdl[i].Offset
));
@ -608,7 +608,7 @@ bool ext2_write_inode (PEXT2_FILESYS Ext2Sys,
errorout:
if (ext2_bdl)
RtlFreeHeap(RtlGetProcessHeap(), 0, ext2_bdl);
@ -645,7 +645,7 @@ ext2_add_entry( PEXT2_FILESYS Ext2Sys,
while ((char *)dir < buf + parent_inode.i_size)
{
if ((dir->inode == 0 && dir->rec_len >= rec_len) ||
if ((dir->inode == 0 && dir->rec_len >= rec_len) ||
(dir->rec_len >= dir->name_len + rec_len) )
{
if (dir->inode)
@ -662,7 +662,7 @@ ext2_add_entry( PEXT2_FILESYS Ext2Sys,
dir->inode = inode;
dir->name_len = strlen(name);
memcpy(dir->name, name, strlen(name));
bRet = true;
break;
}

View file

@ -97,7 +97,7 @@ bool ext2_allocate_group_table(PEXT2_FILESYS fs, ULONG group,
group_blk = fs->ext2_sb->s_first_data_block +
(group * fs->ext2_sb->s_blocks_per_group);
last_blk = group_blk + fs->ext2_sb->s_blocks_per_group;
if (last_blk >= fs->ext2_sb->s_blocks_count)
last_blk = fs->ext2_sb->s_blocks_count - 1;
@ -108,7 +108,7 @@ bool ext2_allocate_group_table(PEXT2_FILESYS fs, ULONG group,
if (!bmap)
bmap = fs->block_map;
/*
* Allocate the inode table
*/
@ -150,7 +150,7 @@ bool ext2_allocate_group_table(PEXT2_FILESYS fs, ULONG group,
retval = ext2_get_free_blocks(fs, start_blk, last_blk,
1, bmap, &new_blk);
if (!retval)
if (!retval)
retval = ext2_get_free_blocks(fs, group_blk,
last_blk, 1, bmap, &new_blk);
@ -165,7 +165,7 @@ bool ext2_allocate_group_table(PEXT2_FILESYS fs, ULONG group,
{
retval = ext2_get_free_blocks(fs, start_blk, last_blk,
1, bmap, &new_blk);
if (!retval)
if (!retval)
retval = ext2_get_free_blocks(fs, group_blk,
last_blk, 1, bmap, &new_blk);
if (!retval)
@ -321,7 +321,7 @@ bool ext2_alloc_block(PEXT2_FILESYS fs, ULONG goal, ULONG *ret)
{
goto fail;
}
ext2_block_alloc_stats(fs, block, +1);
*ret = block;

View file

@ -181,13 +181,13 @@ bool zero_blocks(PEXT2_FILESYS fs, ULONG blk, ULONG num,
}
return true;
}
}
bool zap_sector(PEXT2_FILESYS Ext2Sys, int sect, int nsect)
{
unsigned char *buf;
ULONG *magic;
ULONG *magic;
buf = (unsigned char *)
RtlAllocateHeap(RtlGetProcessHeap(), 0, SECTOR_SIZE*nsect);
@ -197,7 +197,7 @@ bool zap_sector(PEXT2_FILESYS Ext2Sys, int sect, int nsect)
sect, sect + nsect - 1);
return false;
}
#define BSD_DISKMAGIC (0x82564557UL) /* The disk magic number */
#define BSD_MAGICDISK (0x57455682UL) /* The disk magic number reversed */
#define BSD_LABEL_OFFSET 64
@ -205,7 +205,7 @@ bool zap_sector(PEXT2_FILESYS Ext2Sys, int sect, int nsect)
if (sect == 0)
{
Ext2ReadDisk(
Ext2Sys,
Ext2Sys,
(LONGLONG)(sect * SECTOR_SIZE),
SECTOR_SIZE, buf);
@ -226,13 +226,13 @@ bool zap_sector(PEXT2_FILESYS Ext2Sys, int sect, int nsect)
clean_up:
RtlFreeHeap(RtlGetProcessHeap(), 0, buf);
return true;
}
bool ext2_mkdir( PEXT2_FILESYS fs,
bool ext2_mkdir( PEXT2_FILESYS fs,
ULONG parent,
ULONG inum,
ULONG inum,
char *name,
ULONG *no,
PEXT2_INODE pid )
@ -246,7 +246,7 @@ bool ext2_mkdir( PEXT2_FILESYS fs,
int filetype = 0;
LARGE_INTEGER SysTime;
NtQuerySystemTime(&SysTime);
/*
@ -310,7 +310,7 @@ bool ext2_mkdir( PEXT2_FILESYS fs,
if (!retval)
goto cleanup;
retval = ext2_save_inode(fs, ino, &inode);
retval = ext2_save_inode(fs, ino, &inode);
if (!retval)
goto cleanup;
@ -343,7 +343,7 @@ bool ext2_mkdir( PEXT2_FILESYS fs,
goto cleanup;
}
/*
* Update accounting....
*/
@ -367,7 +367,7 @@ bool create_root_dir(PEXT2_FILESYS fs)
EXT2_INODE inode;
retval = ext2_mkdir(fs, EXT2_ROOT_INO, EXT2_ROOT_INO, 0, NULL, &inode);
if (!retval)
{
DPRINT1("Mke2fs: while creating root dir");
@ -375,7 +375,7 @@ bool create_root_dir(PEXT2_FILESYS fs)
}
{
inode.i_uid = 0;
inode.i_uid = 0;
inode.i_gid = 0;
retval = ext2_save_inode(fs, EXT2_ROOT_INO, &inode);
@ -418,7 +418,7 @@ bool create_lost_and_found(PEXT2_FILESYS Ext2Sys)
Ext2Sys->umask = 077;
retval = ext2_mkdir(Ext2Sys, EXT2_ROOT_INO, 0, name, &ino, &inode);
if (!retval)
{
DPRINT1("Mke2fs: while creating /lost+found.\n");
@ -434,7 +434,7 @@ bool create_lost_and_found(PEXT2_FILESYS Ext2Sys)
{
if (lpf_size >= 16*1024)
break;
retval = ext2_alloc_block(Ext2Sys, 0, &dwBlk);
if (! retval)
@ -459,10 +459,10 @@ bool create_lost_and_found(PEXT2_FILESYS Ext2Sys)
{
inode.i_size = lpf_size;
ASSERT( (inode.i_size/Ext2Sys->blocksize) ==
ASSERT( (inode.i_size/Ext2Sys->blocksize) ==
Ext2DataBlocks(Ext2Sys, inode.i_blocks/(Ext2Sys->blocksize/SECTOR_SIZE)));
ASSERT( (inode.i_blocks/(Ext2Sys->blocksize/SECTOR_SIZE)) ==
ASSERT( (inode.i_blocks/(Ext2Sys->blocksize/SECTOR_SIZE)) ==
Ext2TotalBlocks(Ext2Sys, inode.i_size/Ext2Sys->blocksize));
}
@ -491,13 +491,13 @@ errorout:
bool write_primary_superblock(PEXT2_FILESYS Ext2Sys, PEXT2_SUPER_BLOCK super)
{
bool bRet;
bool bRet;
bRet = NT_SUCCESS(Ext2WriteDisk(
Ext2Sys,
((LONGLONG)SUPERBLOCK_OFFSET),
SUPERBLOCK_SIZE, (PUCHAR)super));
return bRet;
@ -533,9 +533,9 @@ bool ext2_flush(PEXT2_FILESYS fs)
PEXT2_GROUP_DESC group_shadow = 0;
LARGE_INTEGER SysTime;
NtQuerySystemTime(&SysTime);
fs_state = fs->ext2_sb->s_state;
RtlTimeToSecondsSince1970(&SysTime, &fs->ext2_sb->s_wtime);
@ -543,7 +543,7 @@ bool ext2_flush(PEXT2_FILESYS fs)
super_shadow = fs->ext2_sb;
group_shadow = fs->group_desc;
/*
* Write out master superblock. This has to be done
* separately, since it is located at a fixed location
@ -875,7 +875,7 @@ Ext2Format(
Status = STATUS_UNSUCCESSFUL;
// Initialize
// Initialize
if (!ext2_initialize_sb(&FileSys))
{
DPRINT1("Mke2fs: error...\n");

View file

@ -261,7 +261,7 @@ Ext2OpenDevice( PEXT2_FILESYS Ext2Sys,
NTSTATUS
Ext2CloseDevice( PEXT2_FILESYS Ext2Sys);
NTSTATUS
NTSTATUS
Ext2ReadDisk( PEXT2_FILESYS Ext2Sys,
ULONGLONG Offset,
ULONG Length,

View file

@ -215,7 +215,7 @@ struct ext2_dx_countlimit {
#define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
#define EXT2_NOCOMPR_FL 0x00000400 /* Access raw compressed data */
#define EXT2_ECOMPR_FL 0x00000800 /* Compression error */
/* End compression flags --- maybe not all used */
/* End compression flags --- maybe not all used */
#define EXT2_BTREE_FL 0x00001000 /* btree format dir */
#define EXT2_INDEX_FL 0x00001000 /* hash-indexed directory */
#define EXT2_IMAGIC_FL 0x00002000
@ -393,7 +393,7 @@ struct ext2_super_block {
* the incompatible feature set is that if there is a bit set
* in the incompatible feature set that the kernel doesn't
* know about, it should refuse to mount the filesystem.
*
*
* e2fsck's requirements are more strict; if it doesn't know
* about a feature in either the compatible or incompatible
* feature set, it must abort and not try to meddle with
@ -416,14 +416,14 @@ struct ext2_super_block {
__u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
__u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
__u16 s_padding1;
/*
/*
* Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set.
*/
__u8 s_journal_uuid[16]; /* uuid of journal superblock */
__u32 s_journal_inum; /* inode number of journal file */
__u32 s_journal_dev; /* device number of journal file */
__u32 s_last_orphan; /* start of list of inodes to delete */
__u32 s_reserved[197]; /* Padding to the end of the block */
};
@ -444,7 +444,7 @@ struct ext2_super_block {
#define EXT2_OS_MASIX 2
#define EXT2_OS_FREEBSD 3
#define EXT2_OS_LITES 4
#define EXT2_OS_WINNT 5
#define EXT2_OS_WINNT 5
/*
* Revision levels

View file

@ -155,7 +155,7 @@ VfatFormat(
PartitionInfo.RewritePartition = FALSE;
PartitionInfo.RecognizedPartition = FALSE;
}
/* If it already has a FAT FS, we'll use that type.
* If it doesn't, we will determine the FAT type based on size and offset */
if (PartitionInfo.PartitionType != PARTITION_FAT_12 &&
@ -174,7 +174,7 @@ VfatFormat(
else if (PartitionInfo.StartingOffset.QuadPart < (1024LL * 255LL * 63LL * 512LL))
{
/* Partition starts below the 8.4GB boundary ==> CHS partition */
if (PartitionInfo.PartitionLength.QuadPart < (32LL * 1024LL * 1024LL))
{
/* FAT16 CHS partition (partition size < 32MB) */
@ -194,7 +194,7 @@ VfatFormat(
else
{
/* Partition starts above the 8.4GB boundary ==> LBA partition */
if (PartitionInfo.PartitionLength.QuadPart < (512LL * 1024LL * 1024LL))
{
/* FAT16 LBA partition (partition size < 512MB) */

View file

@ -3,7 +3,7 @@
* PROJECT: ReactOS VFATX filesystem library
* FILE: fatx.c
* PURPOSE: Fatx support
* PROGRAMMERS:
* PROGRAMMERS:
* REVISIONS:
*/

View file

@ -3,7 +3,7 @@
* PROJECT: ReactOS VFATx filesystem library
* FILE: vfatxlib.c
* PURPOSE: Main API
* PROGRAMMERS:
* PROGRAMMERS:
* REVISIONS:
* CSH 05/04-2003 Created
*/