mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-02 04:46:46 -05:00
Adds statfs() support to other unix.
This commit is contained in:
parent
e4e13a669b
commit
bec047b0b3
3 changed files with 47 additions and 30 deletions
4
unix.c
4
unix.c
|
|
@ -170,9 +170,7 @@ int filephy(const char* path, struct stat* st, uint64_t* physical)
|
|||
|
||||
int fsinfo(const char* path, int* has_persistent_inode)
|
||||
{
|
||||
/* statfs() is really not portable, and to limit possible incompatibility we limit it to Linux */
|
||||
/* for example, Solaris doesn't have the f_type field, BSD has it as "short" */
|
||||
#if HAVE_STATFS && HAVE_STRUCT_STATFS_F_TYPE && defined(__linux__)
|
||||
#if HAVE_STATFS && HAVE_STRUCT_STATFS_F_TYPE
|
||||
struct statfs st;
|
||||
|
||||
if (statfs(path, &st) != 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue