[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Version 2.99.7 is out
At 09:14 AM 1/2/95 +0200, Matti Aarnio wrote:
>> I have 2.99.6 and this appears to have been done already. I produced a
>> patch for 2.99.6 fdstatfs.c for 4.4BSD systems, would this still be of
any use?
>
> Yes, I did get a report that patching from 2.99.3 to ..6 was not
> completely successfull, so I was not sure if it would succeed.
> (Basically the code that was moved to fdstatfs.c was not removed
> from smtpserver.c itself for some reason...)
Hmm, I better check smtpserver.c, but I didn't have any problems compiling
except for that seq_remap thing.... is the mmap stuff recommended? I seem
to recall a define that resulted in the seq_remap function being ifdef'ed out...
> Are you sure your patch won't break BSDI ?
> I was not quite sure, so I didn't introduce it.
Pretty sure, BSD4_4 is defined on bsdi (according to what someone on this
list said) in param.h, so changing the ifdef's around the includes in
smptserver.c, to BSD4_4 shouldn't be a problem. And my 4.4BSD Programmer
Reference says that fstatfs returns a struct with f_bsize and f_bavail
fields, so the #if define(__linux__) || (defined(BSD4_4) && !defined(bsdi))
should take care of linux and 4.4bsd systems except for bsdi which gets
handled later. (I've attached a patch from 2.99.6)
> On overall I think the service could use the code used on
> GNU fileutils "df", but it calls for complete rewrite of
> the configuring mechanism...
It seems that every vendor has made their "df" produce a different output
format. However, you could borrow the strategy from innwatch (from INN) of
using a user definable shell script to parse the output of df.
>> Tom
>
> /Matti Aarnio <mea@utu.fi>
>
*** zmailer-2.99.6/smtpserver/fdstatfs.c Sat Dec 31 14:14:09 1994
--- zmailer-2.99.6-bsd/smtpserver/fdstatfs.c Sat Dec 31 14:35:40 1994
***************
*** 8,13 ****
--- 8,14 ----
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
+ #include <sys/param.h>
#ifdef USE_STATVFS
***************
*** 32,47 ****
# define FSTATFS statfs /* Existence of this means (usually) SYSV
code */
# define STATFSTYPE struct statfs
#else /* !ULTRIX */
! #ifdef bsdi
# include <sys/types.h>
# include <sys/mount.h>
/* # define FSTATFS fstatfs */ /* nonexistence of this means BSD code */
# define STATFSTYPE struct statfs
! #else /* !bsdi */
# include <sys/vfs.h>
/* # define FSTATFS fstatfs */ /* nonexistence of this means BSD code */
# define STATFSTYPE struct statfs
! #endif /* !bsdi */
#endif /* !ULTRIX */
#endif /* !SYSV */
#endif /* !USE_STATVFS */
--- 33,48 ----
# define FSTATFS statfs /* Existence of this means (usually) SYSV
code */
# define STATFSTYPE struct statfs
#else /* !ULTRIX */
! #ifdef BSD4_4
# include <sys/types.h>
# include <sys/mount.h>
/* # define FSTATFS fstatfs */ /* nonexistence of this means BSD code */
# define STATFSTYPE struct statfs
! #else /* !BSD4_4 */
# include <sys/vfs.h>
/* # define FSTATFS fstatfs */ /* nonexistence of this means BSD code */
# define STATFSTYPE struct statfs
! #endif /* !BSD4_4 */
#endif /* !ULTRIX */
#endif /* !SYSV */
#endif /* !USE_STATVFS */
***************
*** 58,64 ****
should be available on all systems, and given valid
parametrization, never fail... */
! #if defined(__linux__)
if ((rc = fstatfs(fd, &statbuf)) == 0) {
availspace = statbuf.f_bavail * statbuf.f_bsize;
}
--- 59,65 ----
should be available on all systems, and given valid
parametrization, never fail... */
! #if defined(__linux__) || (defined(BSD4_4) && !defined(bsdi))
if ((rc = fstatfs(fd, &statbuf)) == 0) {
availspace = statbuf.f_bavail * statbuf.f_bsize;
}
Tom Samplonius
---
UNIServe Online
tom@haven.uniserve.com
http://www.uniserve.com