Final Year Project: Using Linux Filesystems Under Windows   Chris Bryden BEng. Electronics and Software Engineering    School of Computer Science   University of Birmingham 30 structure. Instead, a header file is supplied for each of layers 0 and 1 (layer_0.h and layer_1.h, respectively) that can be included in the source files of the next layer up. So, layer_0.h is included by layer 1 functions, and layer_1.h is included by layer 2 functions. These header files define the data structures and types and the function prototypes that are allowed to be used by the next layer. A header file, ext2lib.h, is also supplied. This is not included by any of the source  for  the  library,  but  is  provided  for  inclusion  in  the  source  for  the  calling application. It prototypes the exported functions of ext2lib and defines the data types that these functions return to the calling application. The data types and definitions used by the ext2 filesystem are defined in a source  file  called  ext2_fs.h.  This  is  part  of  the  linux  kernel  source,  and  was written by Remy Card. It is included by most of the source files for ext2lib, and also must be included in the source for the calling application wherever ext2lib.h is included. The copyright notice from the beginning of the file is shown here:   5.2  The implementation of layer 0: The Hardware access layer The first function to be implemented was the function to read a physical sector from the disk. The whole application is underpinned by this function as it is used whenever data has to be read from the disk. The function has to perform low level accesses on non-DOS hard disks, so this has to be performed at the BIOS level. This is quite simple under MS-DOS, but under Windows 95 presents a few problems. 5.3  Non-DOS Hard Disk Access Under MS-DOS: BIOS Disk Functions The principles behind talking to non-DOS disks under windows 95 is very similar  to  the  method  used  under  MS-DOS.  MS-DOS  does  not  assign  drive letters, or recognise in any other way the existence of non-DOS disks connected to the PC. This means that Linux partitions cannot be seen at all, therefore it is /* *   linux/include/linux/ext2_fs.h * * Copyright    (C)    1992,    1993,    1994 Remy    Card (card@masi.ibp.fr) * Laboratoire MASI - Institut Blaise Pascal * Universite Pierre et Marie Curie (Paris VI) * *   from * *   linux/include/linux/minix_fs.h * *   Copyright (C) 1991, 1992   Linus Torvalds */