Home | History | Annotate | Download | only in ext2ed

Lines Matching refs:file_info

30 	file_info.inode_ptr=ptr;
31 file_info.inode_offset=device_offset;
33 file_info.global_block_num=ptr->i_block [0];
34 file_info.global_block_offset=ptr->i_block [0]*file_system_info.block_size;
35 file_info.block_num=0;
36 file_info.blocks_count=(ptr->i_size+file_system_info.block_size-1)/file_system_info.block_size;
37 file_info.file_offset=0;
38 file_info.file_length=ptr->i_size;
39 file_info.level=0;
40 file_info.offset_in_block=0;
42 file_info.display=HEX;
44 low_read (file_info.buffer,file_system_info.block_size,file_info.global_block_offset);
59 if (file_info.display==HEX)
61 if (file_info.display==TEXT)
78 if (file_info.block_num+block_offset >= file_info.blocks_count) {
83 file_info.block_num+=block_offset;
84 file_info.global_block_num=file_block_to_global_block (file_info.block_num,&file_info);
85 file_info.global_block_offset=file_info.global_block_num*file_system_info.block_size;
86 file_info.file_offset=file_info.block_num*file_system_info.block_size;
88 low_read (file_info.buffer,file_system_info.block_size,file_info.global_block_offset);
106 if (file_info.offset_in_block+offset < file_system_info.block_size) {
107 file_info.offset_in_block+=offset;
134 file_info.offset_in_block=offset;
156 if (file_info.offset_in_block-offset >= 0) {
157 file_info.offset_in_block-=offset;
179 if (file_info.block_num-block_offset < 0) {
184 file_info.block_num-=block_offset;
185 file_info.global_block_num=file_block_to_global_block (file_info.block_num,&file_info);
186 file_info.global_block_offset=file_info.global_block_num*file_system_info.block_size;
187 file_info.file_offset=file_info.block_num*file_system_info.block_size;
189 low_read (file_info.buffer,file_system_info.block_size,file_info.global_block_offset);
210 if (block_offset < 0 || block_offset >= file_info.blocks_count) {
215 file_info.block_num=block_offset;
216 file_info.global_block_num=file_block_to_global_block (file_info.block_num,&file_info);
217 file_info.global_block_offset=file_info.global_block_num*file_system_info.block_size;
218 file_info.file_offset=file_info.block_num*file_system_info.block_size;
220 low_read (file_info.buffer,file_system_info.block_size,file_info.global_block_offset);
238 file_info.display=HEX;
244 file_info.display=TEXT;
264 ch_ptr=file_info.buffer;
266 if (file_info.file_offset+offset>file_info.file_length-1) break;
270 if (file_info.file_offset+offset+i>file_info.file_length-1) {
275 if (file_info.offset_in_block==offset+i)
283 if (file_info.offset_in_block==offset+i)
290 if (file_info.file_offset+offset+i>file_info.file_length-1) break;
291 if (file_info.offset_in_block==offset+i)
296 if (file_info.offset_in_block==offset+i) {
327 ch_ptr=file_info.buffer;
331 if (file_info.file_offset+last_offset > file_info.file_length-1)
332 last_offset=file_info.file_length-1-file_info.file_offset;
342 if (file_info.offset_in_block==offset)
362 if (file_info.offset_in_block==offset) {
385 wprintw (show_win,"File contents. Block %ld. ",file_info.global_block_num);
386 wprintw (show_win,"File block %ld of %ld. ",file_info.block_num,file_info.blocks_count-1);
387 wprintw (show_win,"File Offset %ld of %ld.",file_info.file_offset,file_info.file_length-1);
390 inode_num=inode_offset_to_inode_num (file_info.inode_offset);
391 wprintw (show_win,"File inode %ld. Indirection level %ld.",inode_num,file_info.level);
467 file_info.buffer [file_info.offset_in_block]=tmp;
468 file_info.offset_in_block++;
470 if (file_info.offset_in_block==file_system_info.block_size) {
475 file_info.offset_in_block--;
484 file_info.buffer [file_info.offset_in_block]=tmp;
485 file_info.offset_in_block++;
486 if (file_info.offset_in_block==file_system_info.block_size) {
491 file_info.offset_in_block--;
502 low_write (file_info.buffer,file_system_info.block_size,file_info.global_block_offset);