From 8d43439640576789419797a6bc6501a90d742e4c Mon Sep 17 00:00:00 2001 From: David Adam Date: Wed, 29 Apr 2020 23:25:31 +0800 Subject: [PATCH] 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. --- src/wutil.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wutil.cpp b/src/wutil.cpp index 3eb90c507..f19790c75 100644 --- a/src/wutil.cpp +++ b/src/wutil.cpp @@ -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: