Misc file clean

上级 d9af5f78
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
u64 namehash(const strbuf<DIRSIZ>&); u64 namehash(const strbuf<DIRSIZ>&);
struct file : public referenced { struct file : public referenced {
static file *alloc(); static file* alloc();
file *dup(); file* dup();
int stat(struct stat*); int stat(struct stat*);
int read(char *addr, int n); int read(char *addr, int n);
ssize_t pread(char *addr, size_t n, off_t offset); ssize_t pread(char *addr, size_t n, off_t offset);
int write(char *addr, int n); int write(char *addr, int n);
enum { FD_NONE, FD_PIPE, FD_INODE, FD_SOCKET } type; enum { FD_NONE, FD_PIPE, FD_INODE, FD_SOCKET } type;
...@@ -25,10 +25,12 @@ struct file : public referenced { ...@@ -25,10 +25,12 @@ struct file : public referenced {
struct pipe *pipe; struct pipe *pipe;
struct inode *ip; struct inode *ip;
u32 off; u32 off;
NEW_DELETE_OPS(file);
private: private:
file(); file();
file& operator=(const file&);
file(const file& x);
NEW_DELETE_OPS(file);
protected: protected:
virtual void onzero() const; virtual void onzero() const;
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论