Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-08-13 19:08:25 +0400
committerCorinna Vinschen <corinna@vinschen.de>2007-08-13 19:08:25 +0400
commit19afaa1a50ad936d91cf898eb7bb7e24af8c573f (patch)
tree0a17146cd1be2f625f6ac68f802b3440339cba6f /winsup/cygwin/fhandler.cc
parente31a79b1d67d76260a1024957a89ad1320575b97 (diff)
* devices.in (dev_storage): Use native NT device name for kmsg mailslot.
* devices.cc: Regenerate. * fhandler.cc (fhandler_base::operator =): Use path_conv assignment operator. (fhandler_base::set_name): Ditto. (fhandler_base::open): Use NT native path in debug output. * fhandler_mailslot.cc: Convert to NT native function calls. * ntdll.h (struct _FILE_MAILSLOT_SET_INFORMATION): Define. (NtCreateMailslotFile): Declare. * path.cc (path_conv::set_normalized_path): Don't set wide_path to NULL. (path_conv::set_name): Remove unused function. * path.h (path_conv::set_name): Drop declaration. (path_conv::operator =): Define.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 59ee6a496..8b180b1c1 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -45,7 +45,7 @@ inline fhandler_base&
fhandler_base::operator =(fhandler_base& x)
{
memcpy (this, &x, sizeof *this);
- pc.set_normalized_path (x.pc.normalized_path, false);
+ pc = x.pc;
rabuf = NULL;
ralen = 0;
raixget = 0;
@@ -154,8 +154,7 @@ fhandler_base::get_readahead_into_buffer (char *buf, size_t buflen)
void
fhandler_base::set_name (path_conv &in_pc)
{
- memcpy (&pc, &in_pc, in_pc.size ());
- pc.set_normalized_path (in_pc.normalized_path, false);
+ pc = in_pc;
}
char *fhandler_base::get_proc_fd_name (char *buf)
@@ -469,7 +468,7 @@ fhandler_base::open (int flags, mode_t mode)
IO_STATUS_BLOCK io;
NTSTATUS status;
- syscall_printf ("(%s, %p)", get_win32_name (), flags);
+ syscall_printf ("(%S, %p)", pc.get_nt_native_path (), flags);
pc.get_object_attr (attr, sa);
@@ -577,12 +576,12 @@ fhandler_base::open (int flags, mode_t mode)
set_open_status ();
done:
debug_printf ("%x = NtCreateFile "
- "(%p, %x, %s, io, NULL, %x, %x, %x, %x, NULL, 0)",
- status, x, access, get_win32_name (), file_attributes, shared,
- create_disposition, create_options);
+ "(%p, %x, %S, io, NULL, %x, %x, %x, %x, NULL, 0)",
+ status, x, access, pc.get_nt_native_path (), file_attributes,
+ shared, create_disposition, create_options);
- syscall_printf ("%d = fhandler_base::open (%s, %p)", res, get_win32_name (),
- flags);
+ syscall_printf ("%d = fhandler_base::open (%s, %p)",
+ res, pc.get_nt_native_path (), flags);
return res;
}