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

file: remove badfileops


Unused.

Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
parent 356d6909
No related branches found
No related tags found
No related merge requests found
......@@ -252,66 +252,6 @@ void file_setdata(file* fp, void* data)
fp->f_data = data;
}
static int
badfo_init(struct file *fp)
{
return EBADF;
}
static int
badfo_readwrite(struct file *fp, struct uio *uio, int flags)
{
return EBADF;
}
static int
badfo_truncate(struct file *fp, off_t length)
{
return EINVAL;
}
static int
badfo_ioctl(struct file *fp, u_long com, void *data)
{
return EBADF;
}
static int
badfo_poll(struct file *fp, int events)
{
return 0;
}
static int
badfo_stat(struct file *fp, struct stat *sb)
{
return EBADF;
}
static int
badfo_close(struct file *fp)
{
return EBADF;
}
static int
badfo_chmod(struct file *fp, mode_t mode)
{
return EBADF;
}
struct fileops badfileops = {
.fo_init = badfo_init,
.fo_read = badfo_readwrite,
.fo_write = badfo_readwrite,
.fo_truncate = badfo_truncate,
.fo_ioctl = badfo_ioctl,
.fo_poll = badfo_poll,
.fo_stat = badfo_stat,
.fo_close = badfo_close,
.fo_chmod = badfo_chmod,
};
int
fo_init(struct file *fp)
{
......
......@@ -137,8 +137,6 @@ struct fileops {
fo_chmod_t *fo_chmod;
};
extern struct fileops badfileops;
/* Alloc an fd for fp */
int _fdalloc(struct file *fp, int *newfd, int min_fd);
int fdalloc(struct file* fp, int *newfd);
......
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