#include "reiserfs/reiserfs.h"
/* Exported in struct fs_t */
-static int reiserfs_open( struct boot_file_t *file, const char *dev_name,
- struct partition_t *part, const char *file_name );
+static int reiserfs_open( struct boot_file_t *file, struct partition_t *part,
+ struct boot_fspec_t *fspec);
static int reiserfs_read( struct boot_file_t *file, unsigned int size,
void *buffer );
static int
-reiserfs_open( struct boot_file_t *file, const char *dev_name,
- struct partition_t *part, const char *file_name )
+reiserfs_open( struct boot_file_t *file, struct partition_t *part,
+ struct boot_fspec_t *fspec)
{
static char buffer[1024];
+ char *dev_name = fspec->dev;
+ char *file_name = fspec->file;
DEBUG_ENTER;
DEBUG_OPEN;
memset( INFO, 0, sizeof(struct reiserfs_state) );
INFO->file = file;
- if (part)
+ if (fspec->part)
{
DEBUG_F( "Determining offset for partition %d\n", part->part_number );
INFO->partition_offset = ((uint64_t)part->part_start) * part->blocksize;
static __inline__ __u32
-log2( __u32 word )
+reiserfs_log2( __u32 word )
{
int i = 0;
while( word && (word & (1 << ++i)) == 0 );
while ( transactions-- > 0 )
{
int i = 0;
- int j_len;
+ int j_len = 0;
if ( *journal_table != 0xffffffff )
{
INFO->version = le16_to_cpu(super.s_version);
INFO->blocksize = le16_to_cpu(super.s_blocksize);
- INFO->blocksize_shift = log2( INFO->blocksize );
+ INFO->blocksize_shift = reiserfs_log2( INFO->blocksize );
INFO->journal_block = le32_to_cpu(super.s_journal_block);
INFO->journal_block_count = le32_to_cpu(super.s_orig_journal_size);