{
int n;
- n = os_read_file(fd, c_out, sizeof(*c_out));
+ n = os_read_file_k(fd, c_out, sizeof(*c_out));
if(n == -EAGAIN)
return 0;
int generic_write(int fd, const char *buf, int n, void *unused)
{
- return os_write_file(fd, buf, n);
+ return os_write_file_k(fd, buf, n);
}
int generic_window_size(int fd, void *unused, unsigned short *rows_out,
static inline int cow_write_file(int fd, void *buf, int size)
{
- return(os_write_file(fd, buf, size));
+ return(os_write_file_k(fd, buf, size));
}
#endif
while(remain != 0){
expected = (remain < len) ? remain : len;
- ret = os_read_file(fd, output, expected);
+ ret = os_read_file_k(fd, output, expected);
if (ret != expected) {
str = "data";
goto err;
{
int n;
- n = os_read_file(fd, buf, len);
+ n = os_read_file_k(fd, buf, len);
if(n == -EAGAIN)
return 0;
{
int n;
- n = os_write_file(fd, buf, len);
+ n = os_write_file_k(fd, buf, len);
if(n == -EAGAIN)
return 0;
if(err < 0)
return(err);
- err = os_read_file(fd, buf, len);
+ err = os_read_file_k(fd, buf, len);
if(err < 0)
return(err);
printk("Opening '%s' failed - err = %d\n", filename, -fd);
return(-1);
}
- n = os_read_file(fd, buf, size);
+ n = os_read_file_k(fd, buf, size);
if(n != size){
printk("Read of %d bytes from '%s' failed, err = %d\n", size,
filename, -n);
panic("physmem_forget_descriptor - failed to seek "
"to %lld in fd %d, error = %d\n",
offset, fd, -err);
- err = os_read_file(fd, addr, PAGE_SIZE);
+ err = os_read_file_k(fd, addr, PAGE_SIZE);
if(err < 0)
panic("physmem_forget_descriptor - failed to read "
"from fd %d to 0x%p, error = %d\n",
ptr = buf;
end = &buf[len];
do {
- n = os_read_file(fd, ptr, sizeof(*ptr));
+ n = os_read_file_k(fd, ptr, sizeof(*ptr));
c = *ptr++;
if(n != sizeof(*ptr)){
if(n == 0)