Final Year Project: Using Linux Filesystems Under Windows   Chris Bryden BEng. Electronics and Software Engineering    School of Computer Science   University of Birmingham 53   The  two  values  that  are  used  are  time  and  millitm which   hold   the   current   time,   in   seconds   since 00:00:00  GMT  Jan  1st  1970,  and  the  fractional  part of  a  second  in  milliseconds,  respectively.  The  time that   it   took   to   copy   of   the   file   is   calculated   by subtracting  the  two  recorded  times.  This  is  then  used  to  calculate  the  average transfer time by dividng the file size by the time taken to copy it. The ext2_cp function returns an error code: Error Code Value No Error 0 INODE_NOT_FOUND 1 BLK_LIST_ERR 2 OPEN_FILE_ERR 3 FILE_EXISTS 4 PATH_NOT_FOUND 5 5.27  The Cmdlin User Interface The cmdlin user interface was developed alongside ext2lib for testing and debugging purposes. It now forms the simple user interface used to demonstrate the functions of ext2lib. It provides a very simple ‘command line in a window’ that can  be  used  to  mount  and  navigate  an  ext2  filesystem.  It  was  constructed  in Borland  C’s  EasyWin  format.  This  allows  a  simple  windows  application  to  be programmed as if it were a DOS application, however Borland C will compile the application  to  run  under  Windows.  This  route  was  chosen  because  cmdlin needed to be developed rapidly to test and debug ext2lib.   The source code for cmdlin is contained in the file cmdlin.c. Examining the source  shows  a  simple  structure  implementing  the  ext2lib  functions  to  give command  line  output.  The  main  event  loop  is  provided  by  a  switch  command which  executes  small  functions  to  perform  the  help,  part,  mount,  cd,  ls  and cp commands. The code is self-explanitory.   For instructions on using the cmdlin interface, please see appendix D .   For more information on implementing the ext2lib.dll library in application programs,   please   see   the   Ext2lib   Programmers   Implementation   Guide’   in appendix E. struct timeb { long time ; short millitm ; short _timezone ; short dstflag ; };