aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLiu Aleaxander <Aleaxander@gmail.com>2009-06-03 15:26:27 +0800
committerLiu Aleaxander <Aleaxander@gmail.com>2009-06-03 15:26:27 +0800
commitb1262eb4e50937fe43a402e748baf07d5c583a55 (patch)
tree2db798b25b6b31e85039c5311dbdce586295c155 /core
parent9177573efae59513b35ac3062ccf2e305946606d (diff)
downloadsyslinux-b1262eb4e50937fe43a402e748baf07d5c583a55.tar.gz
syslinux-b1262eb4e50937fe43a402e748baf07d5c583a55.tar.xz
syslinux-b1262eb4e50937fe43a402e748baf07d5c583a55.zip
fix the error code style and something
Diffstat (limited to 'core')
-rw-r--r--core/cache.c50
-rw-r--r--core/ext2.c4
2 files changed, 27 insertions, 27 deletions
diff --git a/core/cache.c b/core/cache.c
index ebef5569..0ddf9445 100644
--- a/core/cache.c
+++ b/core/cache.c
@@ -29,29 +29,29 @@ static int cache_entries;
*/
void cache_init(com32sys_t * regs)
{
- struct cache_struct *prev, *cur;
- char *data = core_cache_buf;
- int block_size_shift = regs->eax.l;
- int i;
-
- cache_block_size = 1 << block_size_shift;
- cache_entries = sizeof(core_cache_buf) >> block_size_shift;
- if (cache_entries > MAX_CACHE_ENTRIES)
- cache_entries = MAX_CACHE_ENTRIES;
-
- cache_head.prev = &cache[cache_entries-1];
- cache_head.prev->next = &cache_head;
- prev = &cache_head;
-
- for (i = 0; i < cache_entries; i++) {
- cur = &cache[i];
- cur->block = 0;
- cur->prev = prev;
- prev->next = cur;
- cur->data = data;
- data += cache_block_size;
- prev = cur++;
- }
+ struct cache_struct *prev, *cur;
+ char *data = core_cache_buf;
+ int block_size_shift = regs->eax.l;
+ int i;
+
+ cache_block_size = 1 << block_size_shift;
+ cache_entries = sizeof(core_cache_buf) >> block_size_shift;
+ if (cache_entries > MAX_CACHE_ENTRIES)
+ cache_entries = MAX_CACHE_ENTRIES;
+
+ cache_head.prev = &cache[cache_entries-1];
+ cache_head.prev->next = &cache_head;
+ prev = &cache_head;
+
+ for (i = 0; i < cache_entries; i++) {
+ cur = &cache[i];
+ cur->block = 0;
+ cur->prev = prev;
+ prev->next = cur;
+ cur->data = data;
+ data += cache_block_size;
+ prev = cur++;
+ }
}
@@ -73,9 +73,9 @@ void read_sectors(char *buf, int sector_num, int sectors)
void getoneblk(char *buf, uint32_t block, int block_size)
{
- int sec_per_block = block_size >> 9; /* 512==sector size */
+ int sec_per_block = block_size >> 9; /* 512==sector size */
- read_sectors(buf, block * sec_per_block, sec_per_block);
+ read_sectors(buf, block * sec_per_block, sec_per_block);
}
diff --git a/core/ext2.c b/core/ext2.c
index 26da1446..5491f811 100644
--- a/core/ext2.c
+++ b/core/ext2.c
@@ -28,8 +28,8 @@ void init_fs(com32sys_t *regs)
ClustSize = 1 << ClustByteShift;
ClustShift = ClustByteShift - 9;
- //DescPerBlock = blk_size / ( 1 << ext2_group_desc_lg2size);
- //InodePerBlock = blk_size / sb->s_inode_size;
+ //DescPerBlock = ClustSize >> ext2_group_desc_lg2size;
+ //InodePerBlock = ClustSize / sb->s_inode_size;
SecPerClust = ClustSize >> 9;
ClustMask = SecPerClust - 1;