wutil: add SMB2 file type to fd_check_is_remote

The manual page for statfs(2) only lists SMB_SUPER_MAGIC and
CIFS_MAGIC_NUMBER, but it turns out there's a third type of CIFS/SMB
mount, represented by SMB2_MAGIC_NUMBER.

Haunting me from #6609.
This commit is contained in:
David Adam 2020-04-29 23:25:31 +08:00
parent 31cb615671
commit 8d43439640

View File

@ -268,6 +268,7 @@ int fd_check_is_remote(int fd) {
switch ((unsigned int)buf.f_type) {
case 0x6969: // NFS_SUPER_MAGIC
case 0x517B: // SMB_SUPER_MAGIC
case 0xFE534D42U: // SMB2_MAGIC_NUMBER - not in the manpage
case 0xFF534D42U: // CIFS_MAGIC_NUMBER
return 1;
default: