rust/hg-core/src/vfs.rs
branchstable
changeset 50287 0cc19a53cef4
parent 50252 a6b8b1ab9116
equal deleted inserted replaced
50286:5069a89a936e 50287:0cc19a53cef4
   191         let r = libc::statfs(path.as_ptr(), &mut buf);
   191         let r = libc::statfs(path.as_ptr(), &mut buf);
   192 
   192 
   193         r == 0 && buf.f_type as u32 == libc::NFS_SUPER_MAGIC as u32
   193         r == 0 && buf.f_type as u32 == libc::NFS_SUPER_MAGIC as u32
   194     }
   194     }
   195 }
   195 }
       
   196 
       
   197 /// Similar to what Cargo does; although detecting NFS (or non-local
       
   198 /// file systems) _should_ be possible on other operating systems,
       
   199 /// we'll just assume that mmap() works there, for now; after all,
       
   200 /// _some_ functionality is better than a compile error, i.e. none at
       
   201 /// all
       
   202 #[cfg(not(target_os = "linux"))]
       
   203 pub(crate) fn is_on_nfs_mount(_path: impl AsRef<Path>) -> bool {
       
   204     false
       
   205 }