summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-09-16 13:43:00 +0000
committerphk <phk@FreeBSD.org>2000-09-16 13:43:00 +0000
commitfc5495e38e718593b4b118d08cfd5bfaaec0324e (patch)
tree288e533daff3fc8bb716c9d5d094e36bb94cc3bc /sbin
parentd927c81a820d92ba849c803c943f34c82608d3f2 (diff)
downloadFreeBSD-src-fc5495e38e718593b4b118d08cfd5bfaaec0324e.zip
FreeBSD-src-fc5495e38e718593b4b118d08cfd5bfaaec0324e.tar.gz
Turn dkcksum() into an __inline function.
Change its type to u_int_16_t.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/bsdlabel/Makefile2
-rw-r--r--sbin/bsdlabel/bsdlabel.c1
-rw-r--r--sbin/bsdlabel/dkcksum.c57
-rw-r--r--sbin/disklabel/Makefile2
-rw-r--r--sbin/disklabel/disklabel.c1
-rw-r--r--sbin/disklabel/dkcksum.c57
-rw-r--r--sbin/newfs/Makefile5
7 files changed, 5 insertions, 120 deletions
diff --git a/sbin/bsdlabel/Makefile b/sbin/bsdlabel/Makefile
index 4090fc4..5513ad3 100644
--- a/sbin/bsdlabel/Makefile
+++ b/sbin/bsdlabel/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PROG= disklabel
-SRCS= disklabel.c dkcksum.c
+SRCS= disklabel.c
MAN8= disklabel.8
MAN5= disklabel.5
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index 1f396a1..a3fc788 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -105,7 +105,6 @@ int checklabel __P((struct disklabel *));
void setbootflag __P((struct disklabel *));
void Warning (char *, ...);
void usage __P((void));
-extern u_short dkcksum __P((struct disklabel *));
struct disklabel * getvirginlabel __P((void));
#define DEFEDITOR _PATH_VI
diff --git a/sbin/bsdlabel/dkcksum.c b/sbin/bsdlabel/dkcksum.c
deleted file mode 100644
index 3a58aa2..0000000
--- a/sbin/bsdlabel/dkcksum.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. 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.
- */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)dkcksum.c 8.1 (Berkeley) 6/5/93";
-#endif
-static const char rcsid[] =
- "$FreeBSD$";
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/disklabel.h>
-
-u_short
-dkcksum(lp)
- register struct disklabel *lp;
-{
- register u_short *start, *end;
- register u_short sum = 0;
-
- start = (u_short *)lp;
- end = (u_short *)&lp->d_partitions[lp->d_npartitions];
- while (start < end)
- sum ^= *start++;
- return (sum);
-}
diff --git a/sbin/disklabel/Makefile b/sbin/disklabel/Makefile
index 4090fc4..5513ad3 100644
--- a/sbin/disklabel/Makefile
+++ b/sbin/disklabel/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PROG= disklabel
-SRCS= disklabel.c dkcksum.c
+SRCS= disklabel.c
MAN8= disklabel.8
MAN5= disklabel.5
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index 1f396a1..a3fc788 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -105,7 +105,6 @@ int checklabel __P((struct disklabel *));
void setbootflag __P((struct disklabel *));
void Warning (char *, ...);
void usage __P((void));
-extern u_short dkcksum __P((struct disklabel *));
struct disklabel * getvirginlabel __P((void));
#define DEFEDITOR _PATH_VI
diff --git a/sbin/disklabel/dkcksum.c b/sbin/disklabel/dkcksum.c
deleted file mode 100644
index 3a58aa2..0000000
--- a/sbin/disklabel/dkcksum.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. 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.
- */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)dkcksum.c 8.1 (Berkeley) 6/5/93";
-#endif
-static const char rcsid[] =
- "$FreeBSD$";
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/disklabel.h>
-
-u_short
-dkcksum(lp)
- register struct disklabel *lp;
-{
- register u_short *start, *end;
- register u_short sum = 0;
-
- start = (u_short *)lp;
- end = (u_short *)&lp->d_partitions[lp->d_npartitions];
- while (start < end)
- sum ^= *start++;
- return (sum);
-}
diff --git a/sbin/newfs/Makefile b/sbin/newfs/Makefile
index 7ad8c5a..7dc817c 100644
--- a/sbin/newfs/Makefile
+++ b/sbin/newfs/Makefile
@@ -1,12 +1,13 @@
# @(#)Makefile 8.2 (Berkeley) 3/27/94
+# $FreeBSD$
PROG= newfs
-SRCS= dkcksum.c getmntopts.c newfs.c mkfs.c
+SRCS= getmntopts.c newfs.c mkfs.c
MAN8= newfs.8
MOUNT= ${.CURDIR}/../mount
CFLAGS+=-DMFS -DFSIRAND -I${MOUNT}
-.PATH: ${MOUNT} ${.CURDIR}/../disklabel
+.PATH: ${MOUNT}
LINKS= ${BINDIR}/newfs ${BINDIR}/mount_mfs
MLINKS= newfs.8 mount_mfs.8 newfs.8 mfs.8 newfs.8 tmpfs.8
OpenPOWER on IntegriCloud