* devices.h (device::get_device): New method.

* fhandler_dev.cc (fhandler_dev::readdir): Set st_ino to device number.
	* syscalls.cc (fhandler_base::stat_fixup): Ditto.  Fix link count for
	CD-ROM devices.  Fix typo in comment.
This commit is contained in:
Corinna Vinschen
2012-04-02 19:25:58 +00:00
parent 467e17b9af
commit eb7729eb36
4 changed files with 17 additions and 5 deletions

View File

@ -208,11 +208,10 @@ fhandler_dev::readdir (DIR *dir, dirent *de)
{
/* Make sure conin, conout, and console have the same inode number
as the current consX. */
dev.parse (myself->ctty);
de->d_ino = hash_path_name (0, dev.native);
de->d_ino = myself->ctty;
}
else
de->d_ino = hash_path_name (0, curdev->native);
de->d_ino = curdev->get_device ();
de->d_type = curdev->type ();
ret = 0;
break;