Cygwin: Rename WSYM_sysfile to WSYM_default

Rename WSYM_sysfile to WSYM_default, since it selects more than just
sysfile with magic cookie now.
This commit is contained in:
Jon Turney 2021-07-17 15:47:34 +01:00
parent 26d6595f54
commit 66eefa25f2
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
2 changed files with 5 additions and 5 deletions

View File

@ -53,7 +53,7 @@ enum exit_states
"winsymlinks" setting of the CYGWIN environment variable. */ "winsymlinks" setting of the CYGWIN environment variable. */
enum winsym_t enum winsym_t
{ {
WSYM_sysfile = 0, WSYM_default = 0,
WSYM_lnk, WSYM_lnk,
WSYM_native, WSYM_native,
WSYM_nativestrict, WSYM_nativestrict,
@ -71,7 +71,7 @@ bool ignore_case_with_glob;
bool pipe_byte; bool pipe_byte;
bool reset_com; bool reset_com;
bool wincmdln; bool wincmdln;
winsym_t allow_winsymlinks = WSYM_sysfile; winsym_t allow_winsymlinks = WSYM_default;
bool disable_pcon; bool disable_pcon;
bool NO_COPY in_forkee; bool NO_COPY in_forkee;

View File

@ -2013,7 +2013,7 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
/* Don't try native symlinks on FSes not supporting reparse points. */ /* Don't try native symlinks on FSes not supporting reparse points. */
else if ((wsym_type == WSYM_native || wsym_type == WSYM_nativestrict) else if ((wsym_type == WSYM_native || wsym_type == WSYM_nativestrict)
&& !(win32_newpath.fs_flags () & FILE_SUPPORTS_REPARSE_POINTS)) && !(win32_newpath.fs_flags () & FILE_SUPPORTS_REPARSE_POINTS))
wsym_type = WSYM_sysfile; wsym_type = WSYM_default;
/* Attach .lnk suffix when shortcut is requested. */ /* Attach .lnk suffix when shortcut is requested. */
if (wsym_type == WSYM_lnk && !win32_newpath.exists () if (wsym_type == WSYM_lnk && !win32_newpath.exists ()
@ -2059,9 +2059,9 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice)
__leave; __leave;
} }
/* Otherwise, fall back to default symlink type. */ /* Otherwise, fall back to default symlink type. */
wsym_type = WSYM_sysfile; wsym_type = WSYM_default;
fallthrough; fallthrough;
case WSYM_sysfile: case WSYM_default:
if (win32_newpath.fs_flags () & FILE_SUPPORTS_REPARSE_POINTS) if (win32_newpath.fs_flags () & FILE_SUPPORTS_REPARSE_POINTS)
{ {
res = symlink_wsl (oldpath, win32_newpath); res = symlink_wsl (oldpath, win32_newpath);