summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authordrochner <drochner@NetBSD.org>2007-02-08 21:36:58 +0000
committerdrochner <drochner@NetBSD.org>2007-02-08 21:36:58 +0000
commit628f1591c15bb912dce2b4a2f209de50c4293743 (patch)
treede0c68a18c0c097b2f98bd0605ca0ca98e2cb562 /sbin
parentc888080e0e44c2e4e29823112c8e5509def3df0a (diff)
include <signal.h> where signal(3) is used
Diffstat (limited to 'sbin')
-rw-r--r--sbin/disklabel/main.c14
-rw-r--r--sbin/fsck_ext2fs/main.c5
-rw-r--r--sbin/fsck_ext2fs/utilities.c5
-rw-r--r--sbin/fsck_ffs/main.c5
-rw-r--r--sbin/fsck_ffs/utilities.c5
-rw-r--r--sbin/fsck_lfs/main.c3
-rw-r--r--sbin/fsirand/fsirand.c5
-rw-r--r--sbin/newfs_msdos/newfs_msdos.c5
8 files changed, 27 insertions, 20 deletions
diff --git a/sbin/disklabel/main.c b/sbin/disklabel/main.c
index 0da9cedfce1..fd97a1378b3 100644
--- a/sbin/disklabel/main.c
+++ b/sbin/disklabel/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.14 2007/01/17 21:59:50 hubertf Exp $ */
+/* $NetBSD: main.c,v 1.15 2007/02/08 21:36:58 drochner Exp $ */
/*
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -83,7 +83,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993\n\
static char sccsid[] = "@(#)disklabel.c 8.4 (Berkeley) 5/4/95";
/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */
#else
-__RCSID("$NetBSD: main.c,v 1.14 2007/01/17 21:59:50 hubertf Exp $");
+__RCSID("$NetBSD: main.c,v 1.15 2007/02/08 21:36:58 drochner Exp $");
#endif
#endif /* not lint */
@@ -147,7 +147,7 @@ __RCSID("$NetBSD: main.c,v 1.14 2007/01/17 21:59:50 hubertf Exp $");
char specname[MAXPATHLEN];
/* Some global data, all too hard to pass about */
-int bootarea[BBSIZE / sizeof (int)]; /* Buffer matching part of disk */
+char bootarea[BBSIZE]; /* Buffer matching part of disk */
int bootarea_len; /* Number of bytes we actually read */
static struct disklabel lab; /* The label we have updated */
@@ -897,10 +897,10 @@ find_label(int f, u_int sector)
/* Check expected offset first */
for (offset = LABEL_OFFSET, i = -4;; offset = i += 4) {
is_deleted = "";
- lp = (void *)((char *)bootarea + offset);
+ lp = (void *)(bootarea + offset);
if (i == LABEL_OFFSET)
continue;
- if ((char *)(lp + 1) > (char *)bootarea + bootarea_len)
+ if ((char *)(lp + 1) > bootarea + bootarea_len)
break;
if (lp->d_magic2 != lp->d_magic)
continue;
@@ -1005,8 +1005,8 @@ update_label(int f, u_int label_sector, u_int label_offset)
if (label_offset == ~0u)
return 0;
/* Nothing on the disk - we need to add it */
- disk_lp = (void *)((char *)bootarea + label_offset);
- if ((char *)(disk_lp + 1) > (char *)bootarea + bootarea_len)
+ disk_lp = (void *)(bootarea + label_offset);
+ if ((char *)(disk_lp + 1) > bootarea + bootarea_len)
errx(1, "no space in bootarea (sector %u) "
"to create label", label_sector);
}
diff --git a/sbin/fsck_ext2fs/main.c b/sbin/fsck_ext2fs/main.c
index 3769a122869..948d98479fa 100644
--- a/sbin/fsck_ext2fs/main.c
+++ b/sbin/fsck_ext2fs/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.23 2005/09/23 12:10:34 jmmv Exp $ */
+/* $NetBSD: main.c,v 1.24 2007/02/08 21:36:58 drochner Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -68,7 +68,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\n\
#if 0
static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/23/94";
#else
-__RCSID("$NetBSD: main.c,v 1.23 2005/09/23 12:10:34 jmmv Exp $");
+__RCSID("$NetBSD: main.c,v 1.24 2007/02/08 21:36:58 drochner Exp $");
#endif
#endif /* not lint */
@@ -85,6 +85,7 @@ __RCSID("$NetBSD: main.c,v 1.23 2005/09/23 12:10:34 jmmv Exp $");
#include <stdio.h>
#include <time.h>
#include <unistd.h>
+#include <signal.h>
#include "fsck.h"
#include "extern.h"
diff --git a/sbin/fsck_ext2fs/utilities.c b/sbin/fsck_ext2fs/utilities.c
index 53bd8339504..84634a1ca07 100644
--- a/sbin/fsck_ext2fs/utilities.c
+++ b/sbin/fsck_ext2fs/utilities.c
@@ -1,4 +1,4 @@
-/* $NetBSD: utilities.c,v 1.14 2005/06/26 23:01:39 christos Exp $ */
+/* $NetBSD: utilities.c,v 1.15 2007/02/08 21:36:58 drochner Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -63,7 +63,7 @@
#if 0
static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) 6/5/93";
#else
-__RCSID("$NetBSD: utilities.c,v 1.14 2005/06/26 23:01:39 christos Exp $");
+__RCSID("$NetBSD: utilities.c,v 1.15 2007/02/08 21:36:58 drochner Exp $");
#endif
#endif /* not lint */
@@ -78,6 +78,7 @@ __RCSID("$NetBSD: utilities.c,v 1.14 2005/06/26 23:01:39 christos Exp $");
#include <string.h>
#include <ctype.h>
#include <unistd.h>
+#include <signal.h>
#include "fsutil.h"
#include "fsck.h"
diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c
index 96d3a932d21..9fa452dcb57 100644
--- a/sbin/fsck_ffs/main.c
+++ b/sbin/fsck_ffs/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.63 2007/01/17 21:59:49 hubertf Exp $ */
+/* $NetBSD: main.c,v 1.64 2007/02/08 21:36:58 drochner Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\n\
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95";
#else
-__RCSID("$NetBSD: main.c,v 1.63 2007/01/17 21:59:49 hubertf Exp $");
+__RCSID("$NetBSD: main.c,v 1.64 2007/02/08 21:36:58 drochner Exp $");
#endif
#endif /* not lint */
@@ -61,6 +61,7 @@ __RCSID("$NetBSD: main.c,v 1.63 2007/01/17 21:59:49 hubertf Exp $");
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <signal.h>
#include "fsck.h"
#include "extern.h"
diff --git a/sbin/fsck_ffs/utilities.c b/sbin/fsck_ffs/utilities.c
index aa966bd334f..9c00176581e 100644
--- a/sbin/fsck_ffs/utilities.c
+++ b/sbin/fsck_ffs/utilities.c
@@ -1,4 +1,4 @@
-/* $NetBSD: utilities.c,v 1.53 2006/03/20 01:30:34 christos Exp $ */
+/* $NetBSD: utilities.c,v 1.54 2007/02/08 21:36:58 drochner Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)utilities.c 8.6 (Berkeley) 5/19/95";
#else
-__RCSID("$NetBSD: utilities.c,v 1.53 2006/03/20 01:30:34 christos Exp $");
+__RCSID("$NetBSD: utilities.c,v 1.54 2007/02/08 21:36:58 drochner Exp $");
#endif
#endif /* not lint */
@@ -54,6 +54,7 @@ __RCSID("$NetBSD: utilities.c,v 1.53 2006/03/20 01:30:34 christos Exp $");
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <signal.h>
#include "fsutil.h"
#include "fsck.h"
diff --git a/sbin/fsck_lfs/main.c b/sbin/fsck_lfs/main.c
index 5eabcf715f2..cc3dd75a03d 100644
--- a/sbin/fsck_lfs/main.c
+++ b/sbin/fsck_lfs/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.33 2007/01/17 21:59:50 hubertf Exp $ */
+/* $NetBSD: main.c,v 1.34 2007/02/08 21:36:58 drochner Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -45,6 +45,7 @@
#include <unistd.h>
#include <err.h>
#include <util.h>
+#include <signal.h>
#include "fsck.h"
#include "extern.h"
diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c
index 66f88daf99b..b3c3c84474a 100644
--- a/sbin/fsirand/fsirand.c
+++ b/sbin/fsirand/fsirand.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fsirand.c,v 1.26 2005/06/02 00:01:47 lukem Exp $ */
+/* $NetBSD: fsirand.c,v 1.27 2007/02/08 21:36:58 drochner Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: fsirand.c,v 1.26 2005/06/02 00:01:47 lukem Exp $");
+__RCSID("$NetBSD: fsirand.c,v 1.27 2007/02/08 21:36:58 drochner Exp $");
#endif /* lint */
#include <sys/param.h>
@@ -56,6 +56,7 @@ __RCSID("$NetBSD: fsirand.c,v 1.26 2005/06/02 00:01:47 lukem Exp $");
#include <string.h>
#include <unistd.h>
#include <util.h>
+#include <signal.h>
#include <ufs/ufs/ufs_bswap.h>
diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c
index 82e4eae1a0d..389f288b733 100644
--- a/sbin/newfs_msdos/newfs_msdos.c
+++ b/sbin/newfs_msdos/newfs_msdos.c
@@ -1,4 +1,4 @@
-/* $NetBSD: newfs_msdos.c,v 1.25 2007/01/21 20:45:41 cbiere Exp $ */
+/* $NetBSD: newfs_msdos.c,v 1.26 2007/02/08 21:36:58 drochner Exp $ */
/*
* Copyright (c) 1998 Robert Nordier
@@ -33,7 +33,7 @@
static const char rcsid[] =
"$FreeBSD: src/sbin/newfs_msdos/newfs_msdos.c,v 1.15 2000/10/10 01:49:37 wollman Exp $";
#else
-__RCSID("$NetBSD: newfs_msdos.c,v 1.25 2007/01/21 20:45:41 cbiere Exp $");
+__RCSID("$NetBSD: newfs_msdos.c,v 1.26 2007/02/08 21:36:58 drochner Exp $");
#endif
#endif /* not lint */
@@ -58,6 +58,7 @@ __RCSID("$NetBSD: newfs_msdos.c,v 1.25 2007/01/21 20:45:41 cbiere Exp $");
#include <string.h>
#include <time.h>
#include <unistd.h>
+#include <signal.h>
#ifdef __NetBSD__
#include <disktab.h>
#include <util.h>