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

Go to the source code of this file.

Functions

static void remove_tree (int at, int bt, int ct, int dt)
 Creates directories /0/0/0 through /3/2/2 and files in the leaf directories, then removes them. More...
 
void test_main (void)
 tests/main.h More...
 
static void do_remove (const char *format,...) PRINTF_FORMAT(1
 

Function Documentation

◆ do_remove()

static void do_remove ( const char *  format,
  ... 
)
static

Definition at line 52 of file dir-rm-tree.c.

References CHECK, name, remove(), va_end, va_start, and vsnprintf().

Referenced by remove_tree().

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

◆ remove_tree()

static void static void remove_tree ( int  at,
int  bt,
int  ct,
int  dt 
)
static

Creates directories /0/0/0 through /3/2/2 and files in the leaf directories, then removes them.

Definition at line 23 of file dir-rm-tree.c.

References CHECK, do_remove(), msg(), open(), quiet, and snprintf().

Referenced by test_main().

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

◆ test_main()

void test_main ( void  )

tests/main.h

tests/main.h

tests/main.h

This must fail, because that directory is non-empty.

tests/main.h

This must fail.

Definition at line 14 of file dir-rm-tree.c.

References make_tree(), and remove_tree().

Here is the call graph for this function: