libc: refactoring

This commit is contained in:
2019-11-28 02:35:52 +01:00
parent f104c46858
commit 4067cb45cb
75 changed files with 596 additions and 355 deletions

View File

@@ -25,17 +25,17 @@ main(int argc, char**argv)
char *path;
path = smprint("/proc/%d/ctl", getpid());
fd = open(path, OWRITE);
fd = sys_open(path, OWRITE);
if(fd < 0){
print("FAIL: open");
exits("FAIL");
}
n = write(fd, "stop", 4);
n = jehanne_write(fd, "stop", 4);
if(n < 0){
print("FAIL: write");
exits("FAIL");
}
close(fd);
sys_close(fd);
print("PASS\n");
exits("PASS");
}