* Makefile.in (DLL_OFILES): Add fhandler_dev.o.

* devices.h (DEV_DEV_MAJOR): Define.
	(FH_DEV): Redefine in terms of DEV_DEV_MAJOR.
	(ext_dev_storage): Declare.
	(dev_storage_size): Declare.
	(dev_dev_storage): Declare.
	(dev_dev): Define.
	(isdev_dev): Define.
	* devices.in (dev_dev_storage): Activate.
	(ext_dev_storage): Define as externally available pointer to
	dev_storage.
	(dev_storage_size): Define to contain number of dev_storage elements.
	* dir.cc (rmdir): Handle /dev as always not empty.
	* dtable.cc (fh_alloc): Handle DEV_DEV_MAJOR.
	* fhandler.h (fhandler_dev): New class, derived from fhandler_disk_file.
	(fhandler_union): Add fhandler_dev member.
	* fhandler_disk_file.cc (class __DIR_mounts): Handle /dev directory
	to make sure it always exists.
	* fhandler_dev.cc: New file implementing /dev.
	* globals.cc (ro_u_dev): New R/O unicode string.
	* path.cc (path_conv::check): Handle FH_DEV device.
This commit is contained in:
Corinna Vinschen
2012-03-29 18:02:54 +00:00
parent d46ed263af
commit 9ca7bca3c3
12 changed files with 325 additions and 37 deletions

View File

@ -730,17 +730,9 @@ path_conv::check (const char *src, unsigned opt,
}
goto out;
}
else if (dev == FH_DEV)
else if (isdev_dev (dev))
{
dev = FH_FS;
#if 0
fileattr = getfileattr (THIS_path, sym.pflags & MOUNT_NOPOSIX);
if (!component && fileattr == INVALID_FILE_ATTRIBUTES)
{
fileattr = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_READONLY;
goto out;
}
#endif
/* Just make sure that the path handling goes on as with FH_FS. */
}
else if (isvirtual_dev (dev))
{
@ -879,7 +871,9 @@ is_virtual_symlink:
if (!component)
{
fileattr = sym.fileattr;
/* Make sure that /dev always exists. */
fileattr = isdev_dev (dev) ? FILE_ATTRIBUTE_DIRECTORY
: sym.fileattr;
path_flags = sym.pflags;
}