* fhandler.cc (fhandler_base::open): Drop local wpath and upath

variables.  Call pc.get_object_attr to create object attributes.
	* fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto.
	* syscalls.cc (unlink_nt): Ditto.
	* path.cc (path_conv::set_normalized_path): Set wide_path to NULL.
	(path_conv::get_nt_native_path): Drop parameter.  Create path in
	wide_path/uni_path members.
	(path_conv::get_object_attr): New method to create object attributes.
	(path_conv::get_wide_win32_path): New method to create Win32 wide path.
	(path_conv::check): Initialize wide_path to NULL.
	(path_conv::~path_conv): cfree wide_path.
	* path.h (class path_conv): New members wide_path and uni_path.
	Add declarations of get_object_attr and get_wide_win32_path.
	(path_conv::path_conv): Initialize wide_path to NULL.
	(path_conv::get_nt_native_path): Drop parameter.
This commit is contained in:
Corinna Vinschen
2007-07-19 11:41:17 +00:00
parent b0ff8192ad
commit 91d2f6eebf
6 changed files with 74 additions and 24 deletions

View File

@ -457,10 +457,6 @@ done:
int
fhandler_base::open (int flags, mode_t mode)
{
WCHAR wpath[CYG_MAX_PATH + 10];
UNICODE_STRING upath = {0, sizeof (wpath), wpath};
pc.get_nt_native_path (upath);
int res = 0;
HANDLE x;
ULONG file_attributes = 0;
@ -475,8 +471,7 @@ fhandler_base::open (int flags, mode_t mode)
syscall_printf ("(%s, %p)", get_win32_name (), flags);
InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE | OBJ_INHERIT,
NULL, sa.lpSecurityDescriptor);
pc.get_object_attr (attr, sa);
switch (query_open ())
{