* mount.cc (mount_info::init): Revert previous change.
(mount_info::from_fstab): Change system_printf to debug_printf. Just use a local NT_MAX_PATH sized temporary buffer.
This commit is contained in:
		
							parent
							
								
									0fd62c686d
								
							
						
					
					
						commit
						f524521aab
					
				| 
						 | 
				
			
			@ -1,3 +1,9 @@
 | 
			
		|||
2008-05-24  Christopher Faylor  <me+cygwin@cgf.cx>
 | 
			
		||||
 | 
			
		||||
	* mount.cc (mount_info::init): Revert previous change.
 | 
			
		||||
	(mount_info::from_fstab): Change system_printf to debug_printf.  Just
 | 
			
		||||
	use a local NT_MAX_PATH sized temporary buffer.
 | 
			
		||||
 | 
			
		||||
2008-05-24  Corinna Vinschen  <corinna@vinschen.de>
 | 
			
		||||
 | 
			
		||||
	* mount.cc (mount_info::init): Recreate path when trying to read the
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -126,8 +126,7 @@ mount_info::init ()
 | 
			
		|||
      create_root_entry (path);
 | 
			
		||||
      pathend = wcpcpy (pathend, L"\\etc\\fstab");
 | 
			
		||||
      if (from_fstab (false, path, pathend)   /* The single | is correct! */
 | 
			
		||||
	  | from_fstab (true, path, wcpcpy (find_root_from_cygwin_dll (path),
 | 
			
		||||
				    L"\\etc\\fstab")))
 | 
			
		||||
	  | from_fstab (true, path, pathend))
 | 
			
		||||
	  return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -925,7 +924,7 @@ mount_info::from_fstab (bool user, WCHAR fstab[], PWCHAR fstab_end)
 | 
			
		|||
    sys_mbstowcs (wcpcpy (fstab_end, L".d\\"),
 | 
			
		||||
		  NT_MAX_PATH - (fstab_end - fstab),
 | 
			
		||||
		  cygheap->user.name ());
 | 
			
		||||
  system_printf ("Try to read mounts from %W", fstab);
 | 
			
		||||
  debug_printf ("Try to read mounts from %W", fstab);
 | 
			
		||||
  HANDLE h = CreateFileW (fstab, GENERIC_READ, FILE_SHARE_READ, &sec_none_nih,
 | 
			
		||||
			  OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
 | 
			
		||||
  if (h == INVALID_HANDLE_VALUE)
 | 
			
		||||
| 
						 | 
				
			
			@ -933,7 +932,7 @@ mount_info::from_fstab (bool user, WCHAR fstab[], PWCHAR fstab_end)
 | 
			
		|||
      debug_printf ("CreateFileW, %E");
 | 
			
		||||
      return false;
 | 
			
		||||
    }
 | 
			
		||||
  char *const buf = reinterpret_cast<char *const> (fstab);
 | 
			
		||||
  char buf[NT_MAX_PATH];
 | 
			
		||||
  char *got = buf;
 | 
			
		||||
  DWORD len = 0;
 | 
			
		||||
  /* Using NT_MAX_PATH-1 leaves space to append two \0. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue