PKUOS - Pintos
Pintos source browser for PKU Operating System course
Functions
dir-rm-cwd.c File Reference
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
Include dependency graph for dir-rm-cwd.c:

Go to the source code of this file.

Functions

static int wrap_open (const char *name)
 Tries to remove the current directory, which may succeed or fail. More...
 
void test_main (void)
 tests/main.h More...
 

Function Documentation

◆ test_main()

void test_main ( void  )

tests/main.h

tests/main.h

Definition at line 24 of file dir-rm-cwd.c.

References chdir(), CHECK, create(), inumber(), mkdir(), msg(), name, open(), readdir(), READDIR_MAX_LEN, remove(), and wrap_open().

Here is the call graph for this function:

◆ wrap_open()

static int wrap_open ( const char *  name)
static

Tries to remove the current directory, which may succeed or fail.

The requirements in each case are different; refer to the assignment for details.

Definition at line 10 of file dir-rm-cwd.c.

References CHECK, fail(), name, and open().

Referenced by test_main().

Here is the call graph for this function:
Here is the caller graph for this function: