summaryrefslogtreecommitdiff
path: root/libexec/lfs_cleanerd
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2001-07-27 20:34:37 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2001-07-27 20:34:37 +0000
commit078253af8b9273a3cd3303ffa535f76e3260ac17 (patch)
tree5411e5337586aceb81ad2f64e4b31ea0f65e0c53 /libexec/lfs_cleanerd
parent8303d75019d73ec9a16cd4b93b922fc1d9859743 (diff)
Wall cleanup
Diffstat (limited to 'libexec/lfs_cleanerd')
-rw-r--r--libexec/lfs_cleanerd/cleanerd.c8
-rw-r--r--libexec/lfs_cleanerd/library.c8
-rw-r--r--libexec/lfs_cleanerd/print.c6
3 files changed, 9 insertions, 13 deletions
diff --git a/libexec/lfs_cleanerd/cleanerd.c b/libexec/lfs_cleanerd/cleanerd.c
index 094ce86f0cd..8b0db6d4e3f 100644
--- a/libexec/lfs_cleanerd/cleanerd.c
+++ b/libexec/lfs_cleanerd/cleanerd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cleanerd.c,v 1.5 1997/08/05 23:42:54 angelos Exp $ */
+/* $OpenBSD: cleanerd.c,v 1.6 2001/07/27 20:34:36 pvalchev Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)cleanerd.c 8.5 (Berkeley) 6/10/95";*/
-static char rcsid[] = "$OpenBSD: cleanerd.c,v 1.5 1997/08/05 23:42:54 angelos Exp $";
+static char rcsid[] = "$OpenBSD: cleanerd.c,v 1.6 2001/07/27 20:34:36 pvalchev Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -162,7 +162,7 @@ main(argc, argv)
struct timeval timeout; /* sleep timeout */
fsid_t fsid;
long clean_opts; /* cleaning options */
- int i, nodaemon, segs_per_clean;
+ int nodaemon, segs_per_clean;
int opt, cmd_err;
char *fs_name; /* name of filesystem to clean */
extern int optind;
@@ -278,7 +278,7 @@ clean_loop(fsp, nsegs, options)
(fsp->fi_cip->clean < max_free_segs &&
(fsp->fi_cip->clean <= MIN_SEGS(&fsp->fi_lfs) ||
fsp->fi_cip->clean < max_free_segs * BUSY_LIM))) {
- printf("Cleaner Running at %s (%d of %d segments available)\n",
+ printf("Cleaner Running at %s (%d of %lu segments available)\n",
ctime(&now), fsp->fi_cip->clean, max_free_segs);
clean_fs(fsp, cost_benefit, nsegs, options);
return (1);
diff --git a/libexec/lfs_cleanerd/library.c b/libexec/lfs_cleanerd/library.c
index 5ea628761c1..cdf0bfeaa1f 100644
--- a/libexec/lfs_cleanerd/library.c
+++ b/libexec/lfs_cleanerd/library.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: library.c,v 1.3 1997/07/23 20:36:30 kstailey Exp $ */
+/* $OpenBSD: library.c,v 1.4 2001/07/27 20:34:36 pvalchev Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -35,7 +35,7 @@
#ifndef lint
/*static char sccsid[] = "@(#)library.c 8.3 (Berkeley) 5/24/95";*/
-static char rcsid[] = "$OpenBSD: library.c,v 1.3 1997/07/23 20:36:30 kstailey Exp $";
+static char rcsid[] = "$OpenBSD: library.c,v 1.4 2001/07/27 20:34:36 pvalchev Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -110,7 +110,6 @@ get_fs_info (lstatfsp, use_mmap)
int use_mmap; /* IN: mmap or read */
{
FS_INFO *fsp;
- int i;
fsp = (FS_INFO *)malloc(sizeof(FS_INFO));
if (fsp == NULL)
@@ -136,8 +135,6 @@ reread_fs_info(fsp, use_mmap)
FS_INFO *fsp; /* IN: prointer fs_infos to reread */
int use_mmap;
{
- int i;
-
if (statfs(fsp->fi_statfsp->f_mntonname, fsp->fi_statfsp))
err(1, "reread_fs_info: statfs failed");
get_ifile (fsp, use_mmap);
@@ -376,7 +373,6 @@ add_blocks (fsp, bip, countp, sp, seg_buf, segaddr, psegaddr)
int db_per_block, i, j;
int db_frag;
u_long page_size;
-long *lp;
#ifdef VERBOSE
printf("FILE INFOS\n");
diff --git a/libexec/lfs_cleanerd/print.c b/libexec/lfs_cleanerd/print.c
index 9aacedef429..86b491cc5ec 100644
--- a/libexec/lfs_cleanerd/print.c
+++ b/libexec/lfs_cleanerd/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.2 1996/07/01 11:04:58 downsj Exp $ */
+/* $OpenBSD: print.c,v 1.3 2001/07/27 20:34:36 pvalchev Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -35,7 +35,7 @@
#ifndef lint
/*static char sccsid[] = "@(#)print.c 8.2 (Berkeley) 5/24/95";*/
-static char rcsid[] = "$OpenBSD: print.c,v 1.2 1996/07/01 11:04:58 downsj Exp $";
+static char rcsid[] = "$OpenBSD: print.c,v 1.3 2001/07/27 20:34:36 pvalchev Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -101,7 +101,7 @@ dump_summary(lfsp, sp, flags, iaddrp)
dp = (daddr_t *)((caddr_t)sp + LFS_SUMMARY_SIZE);
for (--dp, i = 0; i < sp->ss_ninos; --dp)
if (flags & DUMP_INODE_ADDRS) {
- (void)printf("\t0x%lx", *dp);
+ (void)printf("\t0x%x", *dp);
if (++i % 7 == 0)
(void)printf("\n");
} else