From: rufustfirefly Date: Tue, 8 Aug 2000 16:28:48 +0000 (+0000) Subject: Wesley Craig's > 2GB patch X-Git-Tag: netatalk-1-5-rc1~708 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=e9ea8267c58570779c9512d567be12e59a8e08c9 Wesley Craig's > 2GB patch --- diff --git a/etc/afpd/unix.c b/etc/afpd/unix.c index a566697e..121be60c 100644 --- a/etc/afpd/unix.c +++ b/etc/afpd/unix.c @@ -51,6 +51,12 @@ int ustatfs_getvolspace( vol, bfree, btotal, bsize ) *bsize = sfs.f_frsize; #endif ultrix + if ( *bfree > 0x7fffffff / *bsize ) { + *bfree = 0x7fffffff; + } else { + *bfree *= *bsize; + } + #ifdef ultrix *btotal = (VolSpace) ( sfs.fd_req.btot - ( sfs.fd_req.bfree - sfs.fd_req.bfreen )) * 1024; @@ -58,6 +64,11 @@ int ustatfs_getvolspace( vol, bfree, btotal, bsize ) *btotal = (VolSpace) ( sfs.f_blocks - ( sfs.f_bfree - sfs.f_bavail )) * sfs.f_frsize; #endif ultrix + if ( *bfree > 0x7fffffff / *bsize ) { + *bfree = 0x7fffffff; + } else { + *bfree *= *bsize; + } return( AFP_OK ); }