The isdev_dev check in rmdir is unclean. Create a virtual method
fhandler_dev::rmdir to handle this transparently.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
set_errno (ENOENT);
else if (has_dot_last_component (dir, false))
set_errno (EINVAL);
- else if (isdev_dev (fh->dev ()))
- set_errno (ENOTEMPTY);
else if (!fh->rmdir ())
res = 0;
delete fh;
int close ();
int __reg2 fstat (struct stat *buf);
int __reg2 fstatvfs (struct statvfs *buf);
+ int rmdir ();
DIR __reg2 *opendir (int fd);
int __reg3 readdir (DIR *, dirent *);
void rewinddir (DIR *);
return ret;
}
+int
+fhandler_dev::rmdir ()
+{
+ set_errno (ENOTEMPTY);
+ return -1;
+}
+
DIR *
fhandler_dev::opendir (int fd)
{