- Oct 31, 2018
-
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
On C++14 make_unique function also zeroes the newly allocated buffer. It turns out that this operation is increadibly slow for such a big buffer. Moreover we don't need a zeroed buffer here.
-
Tommaso Tocci authored
writev could reveive no-ops blocks characterized by a zero size length. We simply need to skip them.
-
Tommaso Tocci authored
The decrement size operand does not have a trailing slash, thus we need to add it before to use std::stoul.
-
Tommaso Tocci authored
Some of the variables of stat struct are not initialized, thus they will remains will unpredictable junks data from memory. This random values could induct strange behaviours on user applications. Even if we don't support some of the fields in the struct stat, it is necessary to set them to some default value.
-
Tommaso Tocci authored
-
Tommaso Tocci authored
According to the glibc [1] the stat64 function family would be called only on 32-bit machine. To be sure we still intercept the function, but we now throw a NOTSUP error. In this way we can drop the adafs_stat64 function and implement just the logic to populate the `struct stat`. [1]: https://github.molgen.mpg.de/git-mirror/glibc/blob/20003c49884422da7ffbc459cdeee768a6fee07b/sysdeps/unix/sysv/linux/generic/xstat.c#L46
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
Implemented all the logic to handle truncate operation. Test: added truncate test
-
Tommaso Tocci authored
-
Tommaso Tocci authored
puts has nothing to do with the FS. thus we leave libc handling it directly
-
Tommaso Tocci authored
Ensure that the parent directory exists before to make a new node
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
mkdirat is not yet supported at the moment. As usual we should log error and return ENOTSUP
-
Tommaso Tocci authored
-
Tommaso Tocci authored
command like cp are relying on the dev_no and ino_num to monitor if the file have been changed during the copy operation. dev_no was not properly set, thus it was random. Now it is always 0/0
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
fcntl now is intercept and support the F_GETFD/F_SETFD command.
-
Tommaso Tocci authored
opendir need to check that the given path is actually a directory before to open it. Moreover now open can be called with the O_DIRECTORY flag in order to open an existent directory
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
The `cp` command double check the inode number to detect file changes during transfers, we need to set it properly and keep it consistent. inode(file) = std::hash(file_path)
-
Tommaso Tocci authored
In the daemon read handler manage read beyond end of file as normal case and not exceptional
-
Tommaso Tocci authored
-
Tommaso Tocci authored
-
Tommaso Tocci authored
According to the read manpage a read could return less bytes then requested due to an interrupt or an error. We now try to repeat the read operation until all the existent data have been read correctly.
-
Tommaso Tocci authored
It is possible that we read less bytes then requested cause the actual file doesn't have so much.
-
Tommaso Tocci authored
-