cygwin: unify reparse point checking code into single function

So far we had two functions checking the content of a reparse point,
readdir_check_reparse_point in fhandler_disk_file.cc for the sake of
readdir, and symlink_info::check_reparse_point for the sake of
generic path checking.

* Rename check_reparse_point_target helper to check_reparse_point_string
  and convert to static function.
* Create new check_reparse_point_target helper containing the core
  reparse point checking code
* Just call check_reparse_point_target from readdir_check_reparse_point
  and symlink_info::check_reparse_point and only perform the unique
  task in those functions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2017-07-24 17:33:20 +02:00
parent 42f1be581c
commit 3e80cefb16
3 changed files with 68 additions and 87 deletions

View File

@@ -88,7 +88,8 @@ enum path_types
};
NTSTATUS file_get_fai (HANDLE, PFILE_ALL_INFORMATION);
bool check_reparse_point_target (PUNICODE_STRING);
int check_reparse_point_target (HANDLE, bool, PREPARSE_DATA_BUFFER,
PUNICODE_STRING);
class symlink_info;