32,17 → 32,16 |
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
|
/** @addtogroup FileSystemImpl |
* @{ |
*/ |
|
|
/* This file contains the procedures for opening, closing, and seeking on files. */ |
|
/* Methods: |
* do_open: perform the OPEN system call |
* do_close: perform the CLOSE system call |
* do_lseek: perform the SEEK system call |
/** |
* @file open.c |
* @brief This file contains the procedures for opening, closing, and seeking on files. |
*/ |
|
|
#include "fs.h" |
#include "block.h" |
#include "file.h" |
50,7 → 49,9 |
#include "inode.h" |
#include "param.h" |
|
|
/** |
* Perform the OPEN system call |
*/ |
int do_open() |
{ |
|
82,6 → 83,9 |
return fd; |
} |
|
/** |
* Perform the CLOSE system call |
*/ |
int do_close() |
{ |
|
106,6 → 110,9 |
return OK; |
} |
|
/** |
* Perform the SEEK system call |
*/ |
int do_lseek() |
{ |
|
154,3 → 161,7 |
return pos; |
} |
|
/** |
* } |
*/ |
|