student-distrib/fs_module.c
int32_t read_dentry_by_index(uint32_t index, dentry_t* dentry){

	if(dentry == NULL)						//Make sure pointer is valid
		return -1;

	if(index >= boot_block->dir_entries)	//Make sure inode index is valid
		return -1;

	//load file entry at index if index is valid
	*dentry = boot_block->entries[index];

	return 0;
}
/*
   read_dentry_by_index
   		DESCRIPTION: Finds dir. entry from given index node
   		INPUTS: index - index node of file
				dentry - pointer to dentery object
		OUTPUT: 0 on success, -1 on failure
		SIDE EFFECTS: dentry object populated with file
 */
read_dentry_by_index
DESCRIPTION: Finds dir. entry from given index node
INPUTS: index - index node of file
dentry - pointer to dentery object
OUTPUT: 0 on success, -1 on failure
SIDE EFFECTS: dentry object populated with file
read_dentry_by_index DESCRIPTION : Finds dir . entry from given index node INPUTS : index - index node of file dentry - pointer to dentery object OUTPUT : 0 on success - 1 on failure SIDE EFFECTS : dentry object populated with file
int32_t read_dentry_by_index(uint32_t index, dentry_t* dentry){
	if(dentry == NULL)						
		return -1;
	if(index >= boot_block->dir_entries)	
		return -1;
	*dentry = boot_block->entries[index];
	return 0;
}
int32_t read_dentry_by_index ( uint32_t index , dentry_t * dentry ) { if ( dentry == NULL ) return -1 ; if ( index >= boot_block -> dir_entries ) return -1 ; * dentry = boot_block -> entries [ index ] ; return 0 ; }
read_dentry_by_index
DESCRIPTION: Finds dir.
read_dentry_by_index DESCRIPTION : Finds dir .
//Make sure pointer is valid //Make sure inode index is valid //load file entry at index if index is valid