1 #include <lunaix/fctrl.h>
2 #include <lunaix/foptions.h>
3 #include <lunaix/proc.h>
4 #include <lunaix/syslog.h>
11 char test_sequence[] = "Once upon a time, in a magical land of Equestria. "
12 "There were two regal sisters who ruled together "
13 "and created harmony for all the land.";
14 int fd = open("/dev/block/bd0", 0);
17 kprintf(KERROR "fail to open (%d)\n", geterrno());
21 lseek(fd, 1, FSEEK_SET);
22 write(fd, test_sequence, sizeof(test_sequence));
24 lseek(fd, -1, FSEEK_CUR);
26 read(fd, read_out, sizeof(read_out));
28 kprintf("%s", read_out);