integrate into the source tree, yank to 5.1, minor lint
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 7 Aug 1992 03:38:26 +0000 (19:38 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 7 Aug 1992 03:38:26 +0000 (19:38 -0800)
SCCS-vsn: libexec/lfs_cleanerd/clean.h 5.1
SCCS-vsn: libexec/lfs_cleanerd/cleanerd.c 5.1
SCCS-vsn: libexec/lfs_cleanerd/library.c 5.1
SCCS-vsn: libexec/lfs_cleanerd/misc.c 5.1

usr/src/libexec/lfs_cleanerd/clean.h
usr/src/libexec/lfs_cleanerd/cleanerd.c
usr/src/libexec/lfs_cleanerd/library.c
usr/src/libexec/lfs_cleanerd/misc.c

index 9638974..84c5547 100644 (file)
@@ -1,7 +1,16 @@
+/*-
+ * Copyright (c) 1992 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
+ *
+ *     @(#)clean.h     5.1 (Berkeley) %G%
+ */
+
 /*
  * The LFS user-level library will be used when writing cleaners and
 /*
  * The LFS user-level library will be used when writing cleaners and
- * checkers for LFS file systems.  It will have facilities
- * for finding and parsing LFS segments.
+ * checkers for LFS file systems.  It will have facilities for finding
+ * and parsing LFS segments.
  */
 
 #define DUMP_SUM_HEADER                0x0001
  */
 
 #define DUMP_SUM_HEADER                0x0001
 
 #define IFILE_NAME "ifile"
 
 
 #define IFILE_NAME "ifile"
 
-#ifndef TRUE
-#define TRUE   (1)
-#define FALSE  (0)
-#endif
-
 /*
  * Cleaner parameters
  *     BUSY_LIM: lower bound of the number of segments currently available
 /*
  * Cleaner parameters
  *     BUSY_LIM: lower bound of the number of segments currently available
 
 #define        BUSY_LIM        0.50
 #define        IDLE_LIM        0.90
 
 #define        BUSY_LIM        0.50
 #define        IDLE_LIM        0.90
-#define        MIN_SEGS(lfsp)  (3)
+
+#define        MIN_SEGS(lfsp)          (3)
 #define        NUM_TO_CLEAN(fsp)       (5)
 
 #define MAXLOADS       3
 #define        NUM_TO_CLEAN(fsp)       (5)
 
 #define MAXLOADS       3
-#define        ONE_MIN 0
-#define        FIVE_MIN 1
-#define        FIFTEEN_MIN 2
+#define        ONE_MIN         0
+#define        FIVE_MIN        1
+#define        FIFTEEN_MIN     2
 
 typedef struct fs_info {
        struct  statfs  *fi_statfsp;    /* fsstat info from getfsstat */
 
 typedef struct fs_info {
        struct  statfs  *fi_statfsp;    /* fsstat info from getfsstat */
@@ -135,5 +140,4 @@ void         print_CLEANERINFO __P((CLEANERINFO *));
 #define        dump_cleaner_info(cip)
 #define        dump_super(lfsp)
 #endif
 #define        dump_cleaner_info(cip)
 #define        dump_super(lfsp)
 #endif
-
 __END_DECLS
 __END_DECLS
index 821bcf8..5247592 100644 (file)
@@ -1,6 +1,24 @@
+/*-
+ * Copyright (c) 1992 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
+ */
+
+#ifndef lint
+char copyright[] =
+"@(#) Copyright (c) 1992 The Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif /* not lint */
+
+#ifndef lint
+static char sccsid[] = "@(#)cleanerd.c 5.1 (Berkeley) %G%";
+#endif /* not lint */
+
 #include <sys/param.h>
 #include <sys/mount.h>
 #include <sys/time.h>
 #include <sys/param.h>
 #include <sys/mount.h>
 #include <sys/time.h>
+
 #include <ufs/ufs/dinode.h>
 #include <ufs/lfs/lfs.h>
 
 #include <ufs/ufs/dinode.h>
 #include <ufs/lfs/lfs.h>
 
@@ -88,6 +106,7 @@ cost_benefit(fsp, su)
        }
 }
 
        }
 }
 
+int
 main(argc, argv)
        int argc;
        char *argv[];
 main(argc, argv)
        int argc;
        char *argv[];
index 4b36fa6..aab7dd7 100644 (file)
@@ -1,3 +1,14 @@
+/*-
+ * Copyright (c) 1992 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)library.c  5.1 (Berkeley) %G%";
+#endif /* not lint */
+
 #include <sys/param.h>
 #include <sys/time.h>
 #include <sys/stat.h>
 #include <sys/param.h>
 #include <sys/time.h>
 #include <sys/stat.h>
index 7ae725c..3af35d2 100644 (file)
@@ -1,47 +1,24 @@
 /*-
 /*-
- * Copyright (c) 1991 The Regents of the University of California.
+ * Copyright (c) 1992 The Regents of the University of California.
  * All rights reserved.
  *
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * %sccs.include.redist.c%
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)misc.c     5.1 (Berkeley) 9/19/91";
+static char sccsid[] = "@(#)misc.c     5.1 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
+
 #include <unistd.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+
 extern char *special;
 extern char *special;
+
 #if __STDC__
 #include <stdarg.h>
 #else
 #if __STDC__
 #include <stdarg.h>
 #else
@@ -87,4 +64,3 @@ get(fd, off, p, len)
        if (rbytes != len)
                err(1, "%s: short read (%d, not %d)", special, rbytes, len);
 }
        if (rbytes != len)
                err(1, "%s: short read (%d, not %d)", special, rbytes, len);
 }
-