Skip to content
Snippets Groups Projects
Commit 7c77829e authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Added some more checks to filesystem_stat.

Rev: src/modules/files/efuns.c:1.25
parent 06b9a39d
No related branches found
No related tags found
No related merge requests found
......@@ -140,7 +140,11 @@ void f_filesystem_stat(INT32 args)
i = statvfs(s, &st);
#else
#ifdef HAVE_STATFS
#ifdef HAVE_SGI_STATFS
i = statfs(s, &st, sizeof(st), 0);
#else
i = statfs(s, &st);
#endif /* HAVE_SGI_STATFS */
#else
#ifdef HAVE_USTAT
if (!(i = stat(s, &statbuf))) {
......@@ -186,7 +190,11 @@ void f_filesystem_stat(INT32 args)
push_text("bfree");
push_int(st.f_bfree);
push_text("bavail");
#ifdef HAVE_STATFS_F_BAVAIL
push_int(st.f_bavail);
#else
push_int(st.f_bfree);
#endif /* HAVE_STATFS_F_BAVAIL */
push_text("files");
push_int(st.f_files);
push_text("ffree");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment