[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/mgetty/devel mgetty-1.1.31-lfs.patch, NONE, 1.1 mgetty.spec, 1.24, 1.25



Update of /cvs/dist/rpms/mgetty/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv22816

Modified Files:
	mgetty.spec 
Added Files:
	mgetty-1.1.31-lfs.patch 
Log Message:
support FILE_OFFSET_BITS=64 in statvfs (#155440)


mgetty-1.1.31-lfs.patch:
 getdisk.c |   18 +++++++++---------
 mgetty.h  |   11 ++++++++++-
 2 files changed, 19 insertions(+), 10 deletions(-)

--- NEW FILE mgetty-1.1.31-lfs.patch ---
--- 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 **************/


Index: mgetty.spec
===================================================================
RCS file: /cvs/dist/rpms/mgetty/devel/mgetty.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- mgetty.spec	16 Mar 2005 21:00:19 -0000	1.24
+++ mgetty.spec	21 Apr 2005 08:43:46 -0000	1.25
@@ -5,7 +5,7 @@
 Summary: A getty replacement for use with data and fax modems.
 Name: mgetty
 Version: 1.1.31
-Release: 4
+Release: 5
 Source: ftp://alpha.greenie.net/pub/mgetty/source/1.1/mgetty%{version}-Jul24.tar.gz
 Source1: ftp://alpha.greenie.net/pub/mgetty/source/1.1/mgetty%{version}-Jul24.tar.gz.asc
 Source2: logrotate.mgetty
@@ -27,6 +27,7 @@
 Patch12: mgetty-1.1.31-no-acroread.patch
 Patch13: mgetty-1.1.31-W-format.patch
 Patch14: mgetty-1.1.31-sendmail_path.patch
+Patch15: mgetty-1.1.31-lfs.patch
 License: GPL
 Group: Applications/Communications
 Prereq: /sbin/install-info
@@ -112,13 +113,14 @@
 %patch13 -p1 -b .-W-format
 cp policy.h-dist policy.h
 %patch14 -p1 -b .sendmail_path
+%patch15 -p1 -b .lfs
 
 
 %build
 PATH=$PATH:/usr/X11R6/bin
 export PATH
 
-%define makeflags CFLAGS="$RPM_OPT_FLAGS -Wall -DAUTO_PPP" prefix=%{_prefix} spool=%{_var}/spool BINDIR=%{_bindir} SBINDIR=%{_sbindir} LIBDIR=%{_libdir}/mgetty+sendfax HELPDIR=%{_libdir}/mgetty+sendfax CONFDIR=%{_sysconfdir}/mgetty+sendfax MANDIR=%{_mandir} MAN1DIR=%{_mandir}/man1 MAN4DIR=%{_mandir}/man4 MAN5DIR=%{_mandir}/man5 MAN8DIR=%{_mandir}/man8 INFODIR=%{_infodir} ECHO='"echo -e"' INSTALL=%{__install}
+%define makeflags CFLAGS="$RPM_OPT_FLAGS -Wall -DAUTO_PPP -D_FILE_OFFSET_BITS=64" prefix=%{_prefix} spool=%{_var}/spool BINDIR=%{_bindir} SBINDIR=%{_sbindir} LIBDIR=%{_libdir}/mgetty+sendfax HELPDIR=%{_libdir}/mgetty+sendfax CONFDIR=%{_sysconfdir}/mgetty+sendfax MANDIR=%{_mandir} MAN1DIR=%{_mandir}/man1 MAN4DIR=%{_mandir}/man4 MAN5DIR=%{_mandir}/man5 MAN8DIR=%{_mandir}/man8 INFODIR=%{_infodir} ECHO='"echo -e"' INSTALL=%{__install}
 make %{makeflags}
 make -C voice %{makeflags}
 make -C tools %{makeflags}
@@ -324,6 +326,9 @@
 %{_mandir}/man1/viewfax.1x*
 
 %changelog
+* Thu Apr 21 2005 Peter Vrabec <pvrabec redhat com> 1.1.31-5
+- support FILE_OFFSET_BITS=64 in statvfs (#155440)
+
 * Wed Mar 16 2005 Jason Vas Dias <jvdias redhat com> 1.1.31-4
 - Rebuild for gcc4
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]