Final Year Project:
Using Linux Filesystems Under Windows
Chris Bryden
BEng. Electronics and Software Engineering
School of Computer Science
University of Birmingham
51
has to be altered accordingly. The function returns the current path to the calling
application.
The structure of the ext2_cd function:
5.24 Layer 2: The ext2_ls Function
The purpose of this function is to provide the calling application with a
directory listing. It takes one argument, the path name of the directory to list. The
supplied pathname has to be added to the end of the current path to give the
complete pathname. The function first performs some checking on the supplied
Resolve the inode number for the new directory
Check the new
directory is valid with a
call to the layer 1
function DirChk.
Return NULL
Has the user
stepped down a
directory level
using '..'
Set the current directory
inode, ulCurDir, to the inode
number of the new current
directory.
Remove last directory
name from the current
path variable, sCurPath
and return the new current
path
Has the user
stayed in the
current directory
using '.'
leave the current path
unchanged and return the
new current path.
Copy the new path into
the current directory
variable, sCurPath and
return the new current
path.
Invalid
Directory
Valid
Directory
NO
YES
YES
NO