patch-src_fs_c 793 B

123456789101112131415161718192021222324
  1. $OpenBSD: patch-src_fs_c,v 1.3 2012/12/31 09:36:39 chrisz Exp $
  2. --- src/fs.c.orig Tue Jul 24 18:26:13 2012
  3. +++ src/fs.c Tue Jul 24 18:32:23 2012
  4. @@ -118,16 +118,16 @@ struct fs_stat *prepare_fs_stat(const char *s)
  5. static void update_fs_stat(struct fs_stat *fs)
  6. {
  7. - struct statfs64 s;
  8. + struct statfs s;
  9. - if (statfs64(fs->path, &s) == 0) {
  10. + if (statfs(fs->path, &s) == 0) {
  11. fs->size = (long long)s.f_blocks * s.f_bsize;
  12. /* bfree (root) or bavail (non-roots) ? */
  13. fs->avail = (long long)s.f_bavail * s.f_bsize;
  14. fs->free = (long long)s.f_bfree * s.f_bsize;
  15. get_fs_type(fs->path, fs->type);
  16. } else {
  17. - NORM_ERR("statfs64 '%s': %s", fs->path, strerror(errno));
  18. + NORM_ERR("statfs '%s': %s", fs->path, strerror(errno));
  19. fs->size = 0;
  20. fs->avail = 0;
  21. fs->free = 0;