Fix the write-without-updating-size bug of SEFS

This commit is contained in:
Wang Runji 2019-08-02 12:49:30 +08:00 committed by Tate, Hongliang Tian
parent a2169e63e8
commit c68c3c9a94
2 changed files with 7 additions and 1 deletions

2
deps/sefs vendored

@ -1 +1 @@
Subproject commit 1be96ad39575361037b456f4e5c1eb7b4fbfacec
Subproject commit e0cf9c102875e9589ac862766cb8a17f94bfbee4

@ -23,6 +23,12 @@ int main(int argc, const char* argv[]) {
printf("ERROR: failed to write to the file\n");
return -1;
}
// lseek
if ((offset = lseek(fd, 0, SEEK_END)) != 12) {
printf("ERROR: failed to lseek the file\n");
return -1;
}
close(fd);
// read