📄 common_head.h
字号:
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
void sync_inodes(void);
int bmap(struct m_inode * inode,int block);
int create_block(struct m_inode * inode, int block);
struct m_inode * get_empty_inode(void);
void iput(struct m_inode * inode);
struct m_inode * iget(int dev,int nr);
int read_inode(struct m_inode * inode);
int write_inode(struct m_inode * inode);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
void truncate(struct m_inode * inode);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
char * strcpy(char * dest, const char * src);
int strcmp(const char * cs, const char * ct);
void * memset(void * s, char c, int count);
unsigned char get_gs_byte(const char * addr);
void put_gs_byte(char val,char * addr);
unsigned long get_gs_long(const unsigned long * addr);
void put_gs_long(unsigned long val,unsigned long * addr);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
int msdos_read_super(void);
void invalid_fd(int invalid_flag);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
int change_current_name(void);
void change_current_name0(void);
int msdos_match(struct msdos_dir_entry * de);
int msdos_match0(struct msdos_dir_entry * de);
int msdos_match1(struct msdos_dir_entry * de);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
void cache_init(void);
void cache_inval_dev(void);
void cache_inval_inode(struct m_inode * inode);
void cache_lookup(struct m_inode * inode,int cluster,int * f_clu,int * d_clu);
void cache_add(struct m_inode * inode,int f_clu,int d_clu);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
int fat_access(int fatno,int new_value);
int new_cluster(void);
void free_cluster(int fatno);
void do_clrsector(int fatno);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
int get_cluster(struct m_inode * inode,int cluster,int flag);
int msdos_smap(struct m_inode * inode,int sector,int flag);
int fat_free(struct m_inode * inode,int skip);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
struct buffer_head * sread(int sector, struct msdos_dir_entry ** res_dir,
unsigned char floppy_importflag);
void srelse(struct buffer_head * buf);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
void msdos_smap0(int dir_firstsector);
int msdos_smap1(void);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
struct buffer_head * msdos_iget0(int dir_firstsector, struct msdos_dir_entry ** res_dir);
struct m_inode * msdos_iget(struct msdos_dir_entry * de, unsigned long inr, int parent_flag);
void msdos_iput(struct m_inode * inode);
int msdos_read_inode(struct m_inode * inode);
int msdos_write_inode(struct m_inode * inode);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
struct buffer_head * msdos_find_entry(struct m_inode * dir, struct msdos_dir_entry ** res_dir);
struct buffer_head * msdos_add_entry(struct m_inode * dir, struct msdos_dir_entry ** res_dir);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
struct m_inode * msdos_get_dir(const char * pathname);
struct m_inode * msdos_dir_namei(const char * pathname, int * namelen, const char ** name);
struct m_inode * msdos_namei(const char * pathname);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
int msdos_empty_dir(struct m_inode * dir);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
int msdos_open_namei(const char * pathname, unsigned char flag,
unsigned char mode,struct m_inode ** res_inode,unsigned char * buf,unsigned long length);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
int the_msdos_open(const char * filename,unsigned long flag,unsigned long mode,unsigned char * buf,unsigned long length);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
int msdos_file_rddir(struct file * filep, char * buf, int length);
int msdos_file_read(struct file * filep, char * buf, int count);
int msdos_file_write(struct file * filep, char * buf, int count);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
struct buffer_head * msdos_raw_rblock(struct buffer_head * bh);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
void setup_DMA(int temp_rwflag);
void fd_rwblock_1(void);
void do_request_1(void);
int output_byte(unsigned char Command);
int ll_rw_block_0(struct buffer_head * bh);
void ll_rw_block_1(void);
int ll_rw_block_2(struct buffer_head * bh);
int ll_rw_block_h0(struct buffer_head * bh);
void ll_rw_block_h1(void);
int ll_rw_block_h2(struct buffer_head * bh);
int ll_rw_block_f0(struct buffer_head * bh);
void ll_rw_block_f1(void);
int ll_rw_block_f2(struct buffer_head * bh);
struct buffer_head * raw_rblock(unsigned int temp_dev,unsigned int temp_cyl,
unsigned int temp_head,unsigned int temp_sec);
int raw_wblock(struct buffer_head * temp_bh,unsigned int temp_dev,unsigned int temp_cyl,
unsigned int temp_head,unsigned int temp_sec);
void do_formatboot(struct buffer_head * temp_bh);
void do_formathard(struct buffer_head * temp_bh);
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////!!!!!
void SHUTDOWN_files(void);
void set_kernel_gs(void);
void create_stack(unsigned char * stack_ptr, unsigned char * arg_ptr);
void backup_env(unsigned long the_entry);
void restore_env(void);
int sys1_open(const char * filename,unsigned long flag,unsigned long mode);
int sys1_close(int fd);
int sys1_lseek(unsigned int fd, int offset, int origin);
int sys1_read(unsigned int fd,char * buf,int count);
int sys1_write(unsigned int fd,char * buf,int count);
int sys1_getsize(unsigned int fd);
////////////////////////////////////////////////////////////////////////////////////!!!!!
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -