Subject: Re: [netatalk-admins] more than 2 GB
From: Jeff Wiegley (jeff@w3-design.com)
Date: Tue Oct 14 1997 - 19:50:11 EDT
I got this patch to install correctly.
but my volumes are still showing a size of 1.9Gig even with the patch
installed.
How can I get the true size working properly?
- Jeff
wesley.craig@umich.edu wrote:
>
> > From: Albrecht Jacobs <aj@klee.architektur.uni-stuttgart.de>
> > To: netatalk-admins@umich.edu
>
> > I am new to this list. I am looking for a patch which allows the use of
> > netatalk on partitions bigger than 2 GB. I am using 1.4b2. Any chance to
> > get this working?
>
> Give the attached patch a try.
>
> :wes
>
> ------------------------------------------------------------------------
> *** etc/afpd/unix.c- 1997/08/17 00:01:46
> --- etc/afpd/unix.c 1997/08/19 01:32:59
> ***************
> *** 78,100 ****
> #else ultrix
> struct statfs sfs;
> #endif ultrix
>
> if ( statfs( vol->v_path, &sfs ) < 0 ) {
> return( AFPERR_PARAM );
> }
> -
> #ifdef ultrix
> ! *bfree = sfs.fd_req.bfreen * 1024;
> #else
> ! *bfree = sfs.f_bavail * sfs.f_frsize;
> #endif ultrix
>
> #ifdef ultrix
> ! *btotal = ( sfs.fd_req.btot - ( sfs.fd_req.bfree - sfs.fd_req.bfreen )) *
> ! 1024;
> #else ultrix
> ! *btotal = ( sfs.f_blocks - ( sfs.f_bfree - sfs.f_bavail )) * sfs.f_frsize;
> #endif ultrix
>
> return( AFP_OK );
> }
> --- 78,113 ----
> #else ultrix
> struct statfs sfs;
> #endif ultrix
> + u_long multi;
>
> if ( statfs( vol->v_path, &sfs ) < 0 ) {
> return( AFPERR_PARAM );
> }
> #ifdef ultrix
> ! multi = 1024;
> ! *bfree = sfs.fd_req.bfreen;
> #else
> ! multi = sfs.f_frsize;
> ! *bfree = sfs.f_bavail;
> #endif ultrix
>
> + if ( *bfree > 0x7fffffff / multi ) {
> + *bfree = 0x7fffffff;
> + } else {
> + *bfree *= multi;
> + }
> +
> #ifdef ultrix
> ! *btotal = sfs.fd_req.btot - ( sfs.fd_req.bfree - sfs.fd_req.bfreen );
> #else ultrix
> ! *btotal = sfs.f_blocks - ( sfs.f_bfree - sfs.f_bavail );
> #endif ultrix
> +
> + if ( *btotal > 0x7fffffff / multi ) {
> + *btotal = 0x7fffffff;
> + } else {
> + *btotal *= multi;
> + }
>
> return( AFP_OK );
> }
-- <html><head><title> J E F F W I E G L E Y </title></head><body><a href="http://www.w3-design.com/"> W 3 - d e s i g n, I n c. <p> phone: (310) 815-1177 x 307 fax:(310) 815-1133 </p> </a></body></html>
This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:27:03 EST