kernels/linux-2.4.0/fs/fat/misc.c
/*
 * raw_scan_nonroot performs raw_scan_sector on a non-root directory until the
 * requested entry is found or the end of the directory is reached.
 */
raw_scan_nonroot performs raw_scan_sector on a non-root directory until the
requested entry is found or the end of the directory is reached.
raw_scan_nonroot performs raw_scan_sector on a non - root directory until the requested entry is found or the end of the directory is reached .
static int raw_scan_nonroot(struct super_block *sb,int start,const char *name,
    int *number,int *ino,struct buffer_head **res_bh,struct msdos_dir_entry
    **res_de)
{
	int count,cluster;
#ifdef DEBUG
	printk("raw_scan_nonroot: start=%d\n",start);
#endif
	do {
		for (count = 0; count < MSDOS_SB(sb)->cluster_size; count++) {
			if ((cluster = raw_scan_sector(sb,(start-2)*
			    MSDOS_SB(sb)->cluster_size+MSDOS_SB(sb)->data_start+
			    count,name,number,ino,res_bh,res_de)) >= 0)
				return cluster;
		}
		if (!(start = fat_access(sb,start,-1))) {
			fat_fs_panic(sb,"FAT error");
			break;
		}
#ifdef DEBUG
	printk("next start: %d\n",start);
#endif
	}
	while (start != -1);
	return -ENOENT;
}
static int raw_scan_nonroot ( struct super_block * sb , int start , const char * name , int * number , int * ino , struct buffer_head * * res_bh , struct msdos_dir_entry * * res_de ) { int count , cluster ; #ifdef DEBUG printk ( " \n " , start ) ; #endif do { for ( count = 0 ; count < MSDOS_SB ( sb ) -> cluster_size ; count ++ ) { if ( ( cluster = raw_scan_sector ( sb , ( start - 2 ) * MSDOS_SB ( sb ) -> cluster_size + MSDOS_SB ( sb ) -> data_start + count , name , number , ino , res_bh , res_de ) ) >= 0 ) return cluster ; } if ( ! ( start = fat_access ( sb , start , -1 ) ) ) { fat_fs_panic ( sb , " " ) ; break ; } #ifdef DEBUG printk ( " \n " , start ) ; #endif } while ( start != -1 ) ; return - ENOENT ; }
raw_scan_nonroot performs raw_scan_sector on a non-root directory until the
 requested entry is found or the end of the directory is reached.
raw_scan_nonroot performs raw_scan_sector on a non - root directory until the requested entry is found or the end of the directory is reached .