Skip to content
Snippets Groups Projects
Commit ff6fa58e authored by Avi Kivity's avatar Avi Kivity
Browse files

file: make fo_init() optional


Derived file objects will be initialized by the class constructor, no need
for fo_init().

Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
parent 4bb5ad28
No related branches found
No related tags found
No related merge requests found
......@@ -163,7 +163,9 @@ file::file(unsigned flags, filetype_t type, void *opaque,
auto fp = this;
TAILQ_INIT(&fp->f_poll_list);
fo_init(fp);
if (ops) {
fo_init(fp);
}
}
int file::read(struct uio *uio, int flags)
......
......@@ -75,7 +75,7 @@ struct file;
*/
struct file {
file(unsigned flags, filetype_t type, void *opaque,
struct fileops *ops);
struct fileops *ops = nullptr);
virtual ~file();
void operator delete(void *p) { osv::rcu_dispose(p); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment