Add support for Parallels Desktop FS (prlfs)
* mount.h (enum fs_info_type): Add prlfs (Parallels Desktop FS). (class fs_info): Add has_broken_fnoi flag. Implement prlfs FS flag. * mount.cc (fs_info::update): Handle PrlFS. Fill new has_broken_fnoi flag with life. (fs_names): Add prlfs. * globals.cc (ro_u_prlfs): Define. * path.h (path_conv::has_broken_fnoi): New method. * path.cc (symlink_info::check): Call file_get_fnoi utilizing new has_broken_fnoi filesystem flag. * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Ditto. * new-features.xml (ov-new2.3): Document Parallels Desktop FS support. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
		
							parent
							
								
									7ac60f6ceb
								
							
						
					
					
						commit
						df6206aa56
					
				|  | @ -1,3 +1,16 @@ | ||||||
|  | 2015-11-02  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  | 
 | ||||||
|  | 	* mount.h (enum fs_info_type): Add prlfs (Parallels Desktop FS). | ||||||
|  | 	(class fs_info): Add has_broken_fnoi flag.  Implement prlfs FS flag. | ||||||
|  | 	* mount.cc (fs_info::update): Handle PrlFS.  Fill new has_broken_fnoi | ||||||
|  | 	flag with life. | ||||||
|  | 	(fs_names): Add prlfs. | ||||||
|  | 	* globals.cc (ro_u_prlfs): Define. | ||||||
|  | 	* path.h (path_conv::has_broken_fnoi): New method. | ||||||
|  | 	* path.cc (symlink_info::check): Call file_get_fnoi utilizing new | ||||||
|  | 	has_broken_fnoi filesystem flag. | ||||||
|  | 	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Ditto. | ||||||
|  | 
 | ||||||
| 2015-10-30  Corinna Vinschen  <corinna@vinschen.de> | 2015-10-30  Corinna Vinschen  <corinna@vinschen.de> | ||||||
| 
 | 
 | ||||||
| 	* nlsfuncs.cc (__get_lcid_from_locale): Handle LocaleNameToLCID | 	* nlsfuncs.cc (__get_lcid_from_locale): Handle LocaleNameToLCID | ||||||
|  |  | ||||||
|  | @ -416,7 +416,7 @@ fhandler_base::fstat_by_handle (struct stat *buf) | ||||||
|      on the information stored in pc.fnoi.  So we overwrite them here. */ |      on the information stored in pc.fnoi.  So we overwrite them here. */ | ||||||
|   if (get_io_handle ()) |   if (get_io_handle ()) | ||||||
|     { |     { | ||||||
|       status = file_get_fnoi (h, pc.fs_is_netapp (), pc.fnoi ()); |       status = file_get_fnoi (h, pc.has_broken_fnoi (), pc.fnoi ()); | ||||||
|       if (!NT_SUCCESS (status)) |       if (!NT_SUCCESS (status)) | ||||||
|        { |        { | ||||||
| 	 debug_printf ("%y = NtQueryInformationFile(%S, " | 	 debug_printf ("%y = NtQueryInformationFile(%S, " | ||||||
|  |  | ||||||
|  | @ -138,6 +138,7 @@ extern "C" { | ||||||
|   extern UNICODE_STRING _RDATA ro_u_mvfs = _ROU (L"MVFS"); |   extern UNICODE_STRING _RDATA ro_u_mvfs = _ROU (L"MVFS"); | ||||||
|   extern UNICODE_STRING _RDATA ro_u_nfs = _ROU (L"NFS"); |   extern UNICODE_STRING _RDATA ro_u_nfs = _ROU (L"NFS"); | ||||||
|   extern UNICODE_STRING _RDATA ro_u_ntfs = _ROU (L"NTFS"); |   extern UNICODE_STRING _RDATA ro_u_ntfs = _ROU (L"NTFS"); | ||||||
|  |   extern UNICODE_STRING _RDATA ro_u_prlfs = _ROU (L"PrlSF"); /* No typo! */ | ||||||
|   extern UNICODE_STRING _RDATA ro_u_refs = _ROU (L"ReFS"); |   extern UNICODE_STRING _RDATA ro_u_refs = _ROU (L"ReFS"); | ||||||
|   extern UNICODE_STRING _RDATA ro_u_sunwnfs = _ROU (L"SUNWNFS"); |   extern UNICODE_STRING _RDATA ro_u_sunwnfs = _ROU (L"SUNWNFS"); | ||||||
|   extern UNICODE_STRING _RDATA ro_u_udf = _ROU (L"UDF"); |   extern UNICODE_STRING _RDATA ro_u_udf = _ROU (L"UDF"); | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| /* mount.cc: mount handling.
 | /* mount.cc: mount handling.
 | ||||||
| 
 | 
 | ||||||
|    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | ||||||
|    2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc. |    2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc. | ||||||
| 
 | 
 | ||||||
| This file is part of Cygwin. | This file is part of Cygwin. | ||||||
| 
 | 
 | ||||||
|  | @ -370,7 +370,8 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol) | ||||||
| 	  && !is_unixfs (RtlEqualUnicodeString (&fsname, &ro_u_unixfs, FALSE)) | 	  && !is_unixfs (RtlEqualUnicodeString (&fsname, &ro_u_unixfs, FALSE)) | ||||||
| 	  /* AFSRDRFsd == Andrew File System.  Doesn't support DOS attributes.
 | 	  /* AFSRDRFsd == Andrew File System.  Doesn't support DOS attributes.
 | ||||||
| 	     Only native symlinks are supported. */ | 	     Only native symlinks are supported. */ | ||||||
| 	  && !is_afs (RtlEqualUnicodeString (&fsname, &ro_u_afs, FALSE))) | 	  && !is_afs (RtlEqualUnicodeString (&fsname, &ro_u_afs, FALSE)) | ||||||
|  | 	  && !is_prlfs (RtlEqualUnicodeString (&fsname, &ro_u_prlfs, FALSE))) | ||||||
| 	{ | 	{ | ||||||
| 	  /* Known remote file system with buggy open calls.  Further
 | 	  /* Known remote file system with buggy open calls.  Further
 | ||||||
| 	     explanation in fhandler.cc (fhandler_disk_file::open_fs). */ | 	     explanation in fhandler.cc (fhandler_disk_file::open_fs). */ | ||||||
|  | @ -402,6 +403,10 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol) | ||||||
| 	     only support this if the filename is non-null and the handle is | 	     only support this if the filename is non-null and the handle is | ||||||
| 	     the handle to a directory. NcFsd IR10 is supposed to be ok. */ | 	     the handle to a directory. NcFsd IR10 is supposed to be ok. */ | ||||||
| 	  has_buggy_reopen (is_netapp () || is_nwfs ()); | 	  has_buggy_reopen (is_netapp () || is_nwfs ()); | ||||||
|  | 	  /* Netapp and Parallels Desktop FS have problems with the
 | ||||||
|  | 	     FileNetworkOpenInformation info class.  Netapp doesn't | ||||||
|  | 	     implement it at all, Parallels always returns a size of 0. */ | ||||||
|  | 	  has_broken_fnoi (is_netapp () || is_prlfs ()); | ||||||
| 	} | 	} | ||||||
|     } |     } | ||||||
|   if (!got_fs () |   if (!got_fs () | ||||||
|  | @ -1527,6 +1532,7 @@ fs_names_t fs_names[] = { | ||||||
|     { "nwfs", false }, |     { "nwfs", false }, | ||||||
|     { "ncfsd", false }, |     { "ncfsd", false }, | ||||||
|     { "afs", false }, |     { "afs", false }, | ||||||
|  |     { "prlfs", false }, | ||||||
|     { NULL, false } |     { NULL, false } | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| /* mount.h: mount definitions.
 | /* mount.h: mount definitions.
 | ||||||
| 
 | 
 | ||||||
|    Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |    Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | ||||||
|    2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc. |    2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc. | ||||||
| 
 | 
 | ||||||
| This file is part of Cygwin. | This file is part of Cygwin. | ||||||
| 
 | 
 | ||||||
|  | @ -45,6 +45,7 @@ enum fs_info_type | ||||||
|   nwfs, |   nwfs, | ||||||
|   ncfsd, |   ncfsd, | ||||||
|   afs, |   afs, | ||||||
|  |   prlfs, | ||||||
|   /* Always last. */ |   /* Always last. */ | ||||||
|   max_fs_type |   max_fs_type | ||||||
| }; | }; | ||||||
|  | @ -75,6 +76,7 @@ class fs_info | ||||||
|     unsigned has_buggy_fileid_dirinfo	: 1; |     unsigned has_buggy_fileid_dirinfo	: 1; | ||||||
|     unsigned has_buggy_basic_info	: 1; |     unsigned has_buggy_basic_info	: 1; | ||||||
|     unsigned has_dos_filenames_only	: 1; |     unsigned has_dos_filenames_only	: 1; | ||||||
|  |     unsigned has_broken_fnoi		: 1; | ||||||
|   } status; |   } status; | ||||||
|   ULONG sernum;			/* Volume Serial Number */ |   ULONG sernum;			/* Volume Serial Number */ | ||||||
|   char fsn[80];			/* Windows filesystem name */ |   char fsn[80];			/* Windows filesystem name */ | ||||||
|  | @ -100,6 +102,7 @@ class fs_info | ||||||
|   IMPLEMENT_STATUS_FLAG (bool, has_buggy_fileid_dirinfo) |   IMPLEMENT_STATUS_FLAG (bool, has_buggy_fileid_dirinfo) | ||||||
|   IMPLEMENT_STATUS_FLAG (bool, has_buggy_basic_info) |   IMPLEMENT_STATUS_FLAG (bool, has_buggy_basic_info) | ||||||
|   IMPLEMENT_STATUS_FLAG (bool, has_dos_filenames_only) |   IMPLEMENT_STATUS_FLAG (bool, has_dos_filenames_only) | ||||||
|  |   IMPLEMENT_STATUS_FLAG (bool, has_broken_fnoi) | ||||||
|   IMPLEMENT_FS_FLAG (fat) |   IMPLEMENT_FS_FLAG (fat) | ||||||
|   IMPLEMENT_FS_FLAG (ntfs) |   IMPLEMENT_FS_FLAG (ntfs) | ||||||
|   IMPLEMENT_FS_FLAG (refs) |   IMPLEMENT_FS_FLAG (refs) | ||||||
|  | @ -116,6 +119,7 @@ class fs_info | ||||||
|   IMPLEMENT_FS_FLAG (nwfs) |   IMPLEMENT_FS_FLAG (nwfs) | ||||||
|   IMPLEMENT_FS_FLAG (ncfsd) |   IMPLEMENT_FS_FLAG (ncfsd) | ||||||
|   IMPLEMENT_FS_FLAG (afs) |   IMPLEMENT_FS_FLAG (afs) | ||||||
|  |   IMPLEMENT_FS_FLAG (prlfs) | ||||||
|   fs_info_type what_fs () const { return status.fs_type; } |   fs_info_type what_fs () const { return status.fs_type; } | ||||||
|   bool got_fs () const { return status.fs_type != none; } |   bool got_fs () const { return status.fs_type != none; } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -2828,7 +2828,8 @@ restart: | ||||||
| 	    } | 	    } | ||||||
| 	  else | 	  else | ||||||
| 	    { | 	    { | ||||||
| 	      status = file_get_fnoi (h, fs.is_netapp (), conv_hdl.fnoi ()); | 	      status = file_get_fnoi (h, fs.has_broken_fnoi (), | ||||||
|  | 				      conv_hdl.fnoi ()); | ||||||
| 	      if (NT_SUCCESS (status)) | 	      if (NT_SUCCESS (status)) | ||||||
| 		fileattr = conv_hdl.fnoi ()->FileAttributes; | 		fileattr = conv_hdl.fnoi ()->FileAttributes; | ||||||
| 	    } | 	    } | ||||||
|  |  | ||||||
|  | @ -169,6 +169,7 @@ class path_conv | ||||||
|   int has_buggy_reopen () const {return fs.has_buggy_reopen ();} |   int has_buggy_reopen () const {return fs.has_buggy_reopen ();} | ||||||
|   int has_buggy_fileid_dirinfo () const {return fs.has_buggy_fileid_dirinfo ();} |   int has_buggy_fileid_dirinfo () const {return fs.has_buggy_fileid_dirinfo ();} | ||||||
|   int has_buggy_basic_info () const {return fs.has_buggy_basic_info ();} |   int has_buggy_basic_info () const {return fs.has_buggy_basic_info ();} | ||||||
|  |   int has_broken_fnoi () const {return fs.has_broken_fnoi ();} | ||||||
|   int binmode () const |   int binmode () const | ||||||
|   { |   { | ||||||
|     if (path_flags & PATH_BINARY) |     if (path_flags & PATH_BINARY) | ||||||
|  |  | ||||||
|  | @ -22,6 +22,8 @@ What's new: | ||||||
| What changed: | What changed: | ||||||
| ------------- | ------------- | ||||||
| 
 | 
 | ||||||
|  | - Add support for Parallels Desktop FS (prlfs). | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| Bug Fixes | Bug Fixes | ||||||
| --------- | --------- | ||||||
|  |  | ||||||
|  | @ -1,3 +1,7 @@ | ||||||
|  | 2015-11-02  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  | 
 | ||||||
|  | 	* new-features.xml (ov-new2.3): Document Parallels Desktop FS support. | ||||||
|  | 
 | ||||||
| 2015-10-27  Corinna Vinschen  <corinna@vinschen.de> | 2015-10-27  Corinna Vinschen  <corinna@vinschen.de> | ||||||
| 
 | 
 | ||||||
| 	* new-features.xml (ov-new2.3): Document strftime %s addition. | 	* new-features.xml (ov-new2.3): Document strftime %s addition. | ||||||
|  |  | ||||||
|  | @ -35,6 +35,10 @@ sysconf() now supports returning CPU cache information: | ||||||
| New API: aligned_alloc, at_quick_exit, quick_exit. | New API: aligned_alloc, at_quick_exit, quick_exit. | ||||||
| </para></listitem> | </para></listitem> | ||||||
| 
 | 
 | ||||||
|  | <listitem><para> | ||||||
|  | Add support for Parallels Desktop FS (prlfs). | ||||||
|  | </para></listitem> | ||||||
|  | 
 | ||||||
| </itemizedlist> | </itemizedlist> | ||||||
| 
 | 
 | ||||||
| </sect2> | </sect2> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue