projects
/
pintos-anon
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Move problem 1-2 (join) into project 2 as the "wait" system call.
[pintos-anon]
/
grading
/
filesys
/
grow-tell.c
1
/* -*- c -*- */
2
3
#include <syscall.h>
4
#include "fslib.h"
5
6
const char test_name[] = "grow-tell";
7
static char buf[2134];
8
9
static size_t
10
return_block_size (void)
11
{
12
return 37;
13
}
14
15
static void
16
check_tell (int fd, long ofs)
17
{
18
long pos = tell (fd);
19
if (pos != ofs)
20
fail ("file position not updated properly: should be %ld, actually %ld",
21
ofs, pos);
22
}
23
24
void
25
test_main (void)
26
{
27
seq_test ("foobar",
28
buf, sizeof buf, 0,
29
return_block_size, check_tell);
30
}