freespace=>freediskspace, enoughspace=>enoughdiskspace to avoid
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 5 Jun 1995 22:26:26 +0000 (14:26 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 5 Jun 1995 22:26:26 +0000 (14:26 -0800)
conflicts with some memory allocators (e.g., A/UX)

SCCS-vsn: usr.sbin/sendmail/src/collect.c 8.43
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 8.80
SCCS-vsn: usr.sbin/sendmail/src/conf.c 8.187

usr/src/usr.sbin/sendmail/src/collect.c
usr/src/usr.sbin/sendmail/src/conf.c
usr/src/usr.sbin/sendmail/src/srvrsmtp.c

index 461758b..85b389b 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)collect.c  8.42 (Berkeley) %G%";
+static char sccsid[] = "@(#)collect.c  8.43 (Berkeley) %G%";
 #endif /* not lint */
 
 # include <errno.h>
 #endif /* not lint */
 
 # include <errno.h>
@@ -595,7 +595,7 @@ tferror(tf, e)
                                st.st_size);
                fprintf(tf, "*** at %s due to lack of disk space for temp file.\n",
                        MyHostName);
                                st.st_size);
                fprintf(tf, "*** at %s due to lack of disk space for temp file.\n",
                        MyHostName);
-               avail = freespace(QueueDir, &bsize);
+               avail = freediskspace(QueueDir, &bsize);
                if (avail > 0)
                {
                        if (bsize > 1024)
                if (avail > 0)
                {
                        if (bsize > 1024)
index e904f20..88086fa 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)conf.c     8.186 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c     8.187 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -1532,7 +1532,7 @@ shouldqueue(pri, ctime)
 bool
 refuseconnections()
 {
 bool
 refuseconnections()
 {
-       extern bool enoughspace();
+       extern bool enoughdiskspace();
 
 #ifdef XLA
        if (!xla_smtp_ok())
 
 #ifdef XLA
        if (!xla_smtp_ok())
@@ -1540,7 +1540,7 @@ refuseconnections()
 #endif
 
        /* this is probably too simplistic */
 #endif
 
        /* this is probably too simplistic */
-       return CurrentLA >= RefuseLA || !enoughspace(MinBlocksFree + 1);
+       return CurrentLA >= RefuseLA || !enoughdiskspace(MinBlocksFree + 1);
 }
 \f/*
 **  SETPROCTITLE -- set process title for ps
 }
 \f/*
 **  SETPROCTITLE -- set process title for ps
@@ -2327,7 +2327,7 @@ usershellok(shell)
 #endif
 }
 \f/*
 #endif
 }
 \f/*
-**  FREESPACE -- see how much free space is on the queue filesystem
+**  FREEDISKSPACE -- see how much free space is on the queue filesystem
 **
 **     Only implemented if you have statfs.
 **
 **
 **     Only implemented if you have statfs.
 **
@@ -2374,7 +2374,7 @@ usershellok(shell)
 #endif
 
 long
 #endif
 
 long
-freespace(dir, bsize)
+freediskspace(dir, bsize)
        char *dir;
        long *bsize;
 {
        char *dir;
        long *bsize;
 {
@@ -2429,7 +2429,7 @@ freespace(dir, bsize)
        return (-1);
 }
 \f/*
        return (-1);
 }
 \f/*
-**  ENOUGHSPACE -- check to see if there is enough free space on the queue fs
+**  ENOUGHDISKSPACE -- is there enough free space on the queue fs?
 **
 **     Only implemented if you have statfs.
 **
 **
 **     Only implemented if you have statfs.
 **
@@ -2444,7 +2444,7 @@ freespace(dir, bsize)
 */
 
 bool
 */
 
 bool
-enoughspace(msize)
+enoughdiskspace(msize)
        long msize;
 {
        long bfree, bsize;
        long msize;
 {
        long bfree, bsize;
@@ -2452,14 +2452,14 @@ enoughspace(msize)
        if (MinBlocksFree <= 0 && msize <= 0)
        {
                if (tTd(4, 80))
        if (MinBlocksFree <= 0 && msize <= 0)
        {
                if (tTd(4, 80))
-                       printf("enoughspace: no threshold\n");
+                       printf("enoughdiskspace: no threshold\n");
                return TRUE;
        }
 
                return TRUE;
        }
 
-       if ((bfree = freespace(QueueDir, &bsize)) >= 0)
+       if ((bfree = freediskspace(QueueDir, &bsize)) >= 0)
        {
                if (tTd(4, 80))
        {
                if (tTd(4, 80))
-                       printf("enoughspace: bavail=%ld, need=%ld\n",
+                       printf("enoughdiskspace: bavail=%ld, need=%ld\n",
                                bfree, msize);
 
                /* convert msize to block count */
                                bfree, msize);
 
                /* convert msize to block count */
@@ -2482,7 +2482,7 @@ enoughspace(msize)
                }
        }
        else if (tTd(4, 80))
                }
        }
        else if (tTd(4, 80))
-               printf("enoughspace failure: min=%ld, need=%ld: %s\n",
+               printf("enoughdiskspace failure: min=%ld, need=%ld: %s\n",
                        MinBlocksFree, msize, errstring(errno));
        return TRUE;
 }
                        MinBlocksFree, msize, errstring(errno));
        return TRUE;
 }
index 5f30547..5ff31e1 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)srvrsmtp.c 8.79 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.80 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)srvrsmtp.c 8.79 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.80 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -432,7 +432,7 @@ smtp(e)
                                /* NOTREACHED */
                        }
                                
                                /* NOTREACHED */
                        }
                                
-                       if (!enoughspace(e->e_msgsize))
+                       if (!enoughdiskspace(e->e_msgsize))
                        {
                                message("452 Insufficient disk space; try again later");
                                break;
                        {
                                message("452 Insufficient disk space; try again later");
                                break;