PKUOS - Pintos
Pintos source browser for PKU Operating System course
src
tests
userprog
open-null.c
Go to the documentation of this file.
1
/** Tries to open a file with the null pointer as its name.
2
The process must be terminated with exit code -1. */
3
4
#include <
stddef.h
>
5
#include <syscall.h>
6
#include "
tests/main.h
"
7
8
void
9
test_main
(
void
)
10
{
11
open
(
NULL
);
12
}
open
int open(const char *file)
Definition:
syscall.c:103
main.h
test_main
void test_main(void)
Tries to open a file with the null pointer as its name.
Definition:
open-null.c:9
stddef.h
NULL
#define NULL
Definition:
stddef.h:4
Generated on Thu Nov 4 2021 19:31:01 for PKUOS - Pintos by
1.9.2