--- mgetty-1.1.31/getdisk.c.lfs 2005-04-21 10:16:18.794879186 +0200
+++ mgetty-1.1.31/getdisk.c 2005-04-21 10:30:41.013861698 +0200
@@ -192,11 +192,11 @@
*/
#ifndef TESTDISK
-int checkspace _P1 ((path), char *path)
+unsigned long long int checkspace _P1 ((path), char *path)
{
#ifdef HASDISKSTAT
struct mountinfo mi;
- unsigned int kbytes;
+ unsigned long long int kbytes;
if (getdiskstats(path, &mi))
return(1);
@@ -207,7 +207,7 @@
*/
kbytes = (mi.mi_bavail>>2) * (mi.mi_bsize>>8);
- lprintf( L_NOISE, "%d Mb free on %s", kbytes/1024, path );
+ lprintf( L_NOISE, "%llu Mb free on %s", kbytes/1024, path );
return( kbytes / minfreespace);
#else
return(1);
@@ -333,12 +333,12 @@
fprintf(stderr, "statfs on %s failed\n", *argv);
} else {
printf( "STATFS report on %s:\n", *argv );
- printf( "\tfundamental file system block size %ld\n", mi.mi_bsize);
- printf( "\ttotal data blocks in file system %ld\n", mi.mi_blocks);
- printf( "\tfree block in fs %ld\n", mi.mi_bfree);
- printf( "\tfree blocks avail to non-superuser %ld\n", mi.mi_bavail);
- printf( "\ttotal file nodes in file system %ld\n", mi.mi_files);
- printf( "\tfree file nodes in fs %ld\n", mi.mi_ffree);
+ printf( "\tfundamental file system block size %lu\n", (unsigned long int) mi.mi_bsize);
+ printf( "\ttotal data blocks in file system %llu\n", (unsigned long long int) mi.mi_blocks);
+ printf( "\tfree block in fs %llu\n", (unsigned long long int) mi.mi_bfree);
+ printf( "\tfree blocks avail to non-superuser %llu\n", (unsigned long long int) mi.mi_bavail);
+ printf( "\ttotal file nodes in file system %llu\n", (unsigned long long int) mi.mi_files);
+ printf( "\tfree file nodes in fs %llu\n", (unsigned long long int) mi.mi_ffree);
}
argv++;
}
--- mgetty-1.1.31/mgetty.h.lfs 2005-04-21 09:59:13.861615345 +0200
+++ mgetty-1.1.31/mgetty.h 2005-04-21 10:30:42.558639097 +0200
@@ -293,19 +293,28 @@
/* disk statistics retrieval in getdisk.c */
struct mountinfo {
+#ifndef _SYS_STATVFS_H
long mi_bsize; /* fundamental block size */
long mi_blocks; /* number of blocks in file system */
long mi_bfree; /* number of free blocks in file system */
long mi_bavail; /* blocks available to non-super user */
long mi_files; /* number of file nodes in file system */
long mi_ffree; /* number of free nodes in fs */
+#else
+ unsigned long int mi_bsize;
+ fsblkcnt_t mi_blocks;
+ fsblkcnt_t mi_bfree;
+ fsblkcnt_t mi_bavail;
+ fsfilcnt_t mi_files;
+ fsfilcnt_t mi_ffree;
+#endif /* _SYS_STATVFS_H */
};
typedef struct mountinfo mntinf;
extern long minfreespace;
-int checkspace _PROTO((char *path));
+unsigned long long int checkspace _PROTO((char *path));
int getdiskstats _PROTO ((char *path, mntinf *mi));
/********* system prototypes **************/