]> sourceware.org Git - newlib-cygwin.git/commitdiff
* dir.cc (readdir_worker): Convert w32name to PUNICODE_STRING.
authorCorinna Vinschen <corinna@vinschen.de>
Thu, 16 Aug 2007 14:46:23 +0000 (14:46 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 16 Aug 2007 14:46:23 +0000 (14:46 +0000)
* sec_acl.cc (getacl): Convert debug output to print native NT path.
* security.cc (set_file_attribute): Ditto.
* syscalls.cc (try_to_bin): Ditto and fix buggy debug statement.

winsup/cygwin/ChangeLog
winsup/cygwin/dir.cc
winsup/cygwin/sec_acl.cc
winsup/cygwin/security.cc
winsup/cygwin/syscalls.cc

index 9f36db5a9380971e3cdf08ad4d5cc7f829309f12..7f95f16fd2b395260552f5552f005c123d374a42 100644 (file)
@@ -1,3 +1,10 @@
+2007-08-16  Corinna Vinschen  <corinna@vinschen.de>
+
+       * dir.cc (readdir_worker): Convert w32name to PUNICODE_STRING.
+       * sec_acl.cc (getacl): Convert debug output to print native NT path.
+       * security.cc (set_file_attribute): Ditto.
+       * syscalls.cc (try_to_bin): Ditto and fix buggy debug statement.
+
 2007-08-16  Corinna Vinschen  <corinna@vinschen.de>
 
        * ntdll.h (RtlAcquirePebLock): Declare.
index 72d6ac1abeaebfe7cfbf646a29d4c44cc581538b..c1f325ea63932a549b2b7596446b70e601140a55 100644 (file)
@@ -140,14 +140,15 @@ readdir_worker (DIR *dir, dirent *de)
          de->d_ino = ((fhandler_base *) dir->__fh)->get_namehash ();
          if (!is_dot && !is_dot_dot)
            {
-             const char *w32name = ((fhandler_base *) dir->__fh)->get_win32_name ();
+             PUNICODE_STRING w32name =
+                 ((fhandler_base *) dir->__fh)->pc.get_nt_native_path ();
              DWORD devn = ((fhandler_base *) dir->__fh)->get_device ();
              /* Paths below /proc don't have a Win32 pendant. */
              if (isproc_dev (devn))
-               de->d_ino = hash_path_name (de->d_ino, "/");
-             /* A drive's root dir has a trailing backslash already. */
-             else if (w32name[1] != ':' || w32name[2] != '\\' || w32name[3])
-               de->d_ino = hash_path_name (de->d_ino, "\\");
+               de->d_ino = hash_path_name (de->d_ino, L"/");
+             else if (w32name->Buffer[w32name->Length / sizeof (WCHAR) - 1]
+                      != L'\\')
+               de->d_ino = hash_path_name (de->d_ino, L"\\");
              de->d_ino = hash_path_name (de->d_ino, de->d_name);
            }
        }
index bd967f3d9990544aaf1ca38d98a360a6536012a6..4ba5a2c1be2ee23f587e8515ab783842bfad005b 100644 (file)
@@ -391,7 +391,7 @@ getacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp)
       aclbufp[i].a_perm &= ~(DENY_R | DENY_W | DENY_X);
     aclsort32 (pos, 0, aclbufp);
   }
-  syscall_printf ("%d = getacl (%s)", pos, pc.get_win32 ());
+  syscall_printf ("%d = getacl (%S)", pos, pc.get_nt_native_path ());
   return pos;
 }
 
index daf2861ed6d364e719724fcd2ed3ba195516949f..e4c82d538e3082317beea455cb070ce5439469dd 100644 (file)
@@ -715,8 +715,8 @@ set_file_attribute (HANDLE handle, path_conv &pc,
     }
   else
     ret = 0;
-  syscall_printf ("%d = set_file_attribute (%s, %d, %d, %p)",
-                 ret, pc.get_win32 (), uid, gid, attribute);
+  syscall_printf ("%d = set_file_attribute (%S, %d, %d, %p)",
+                 ret, pc.get_nt_native_path (), uid, gid, attribute);
   return ret;
 }
 
index 8e1c9796158495678fff08942b5b6cc1cad00042..63df37e2cff010affafb670b0dcadbd0c64e64fe 100644 (file)
@@ -358,8 +358,8 @@ try_to_bin (path_conv &win32_path, HANDLE h)
                                     FileRenameInformation);
     }
   if (!NT_SUCCESS (status))
-    debug_printf ("Move %s to %s failed, status = %p", win32_path.get_win32 (),
-                 recycler, status);
+    debug_printf ("Move %S to %S failed, status = %p",
+                 win32_path.get_nt_native_path (), &recycler, status);
 out:
   if (rootdir)
     NtClose (rootdir);
This page took 0.042602 seconds and 5 git commands to generate.