Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Make disklabel(8) and fdisk(8) into "host tools " last step:...
details: https://anonhg.NetBSD.org/src/rev/eaefabe38ee7
branches: trunk
changeset: 581978:eaefabe38ee7
user: dyoung <dyoung%NetBSD.org@localhost>
date: Sun Jun 12 19:46:15 2005 +0000
description:
Make disklabel(8) and fdisk(8) into "host tools " last step: build
and install ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-disklabel,
${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk by "reaching over" to
the sources in ${NETBSDSRCDIR}/sbin/{disklabel fdisk}/.
To avoid clashes with a build-host's header files, especially on
*BSD, the host-tools versions of fdisk and disklabel search for
#includes such as disklabel.h, disklabel_acorn.h, disklabel_gpt.h,
and bootinfo.h in a new #includes namespace, nbinclude/. That is,
they #include <nbinclude/sys/disklabel.h>, <nbinclude/machine/disklabel.h>,
<nbinclude/sparc64/disklabel.h>, instead of <sys/disklabel.h> and
such. I have also updated the system headers to #include from
nbinclude/-space when HAVE_NBTOOL_CONFIG_H is #defined.
diffstat:
include/util.h | 4 +++-
lib/libc/gen/disklabel.c | 19 ++++++++++++++-----
sys/arch/acorn26/include/disklabel.h | 6 +++++-
sys/arch/acorn32/include/disklabel.h | 6 +++++-
sys/arch/algor/include/disklabel.h | 6 +++++-
sys/arch/alpha/include/disklabel.h | 6 +++++-
sys/arch/amd64/include/disklabel.h | 10 +++++++++-
sys/arch/arc/include/disklabel.h | 10 +++++++++-
sys/arch/arm/include/disklabel.h | 8 +++++++-
sys/arch/bebox/include/disklabel.h | 10 +++++++++-
sys/arch/cats/include/disklabel.h | 6 +++++-
sys/arch/cobalt/include/disklabel.h | 10 +++++++++-
sys/arch/dreamcast/include/disklabel.h | 6 +++++-
sys/arch/evbarm/include/disklabel.h | 6 +++++-
sys/arch/evbmips/include/disklabel.h | 6 +++++-
sys/arch/evbppc/include/disklabel.h | 10 +++++++++-
sys/arch/evbsh3/include/disklabel.h | 6 +++++-
sys/arch/evbsh5/include/disklabel.h | 6 +++++-
sys/arch/hp700/include/disklabel.h | 10 +++++++++-
sys/arch/hpcarm/include/disklabel.h | 10 +++++++++-
sys/arch/hpcmips/include/disklabel.h | 10 +++++++++-
sys/arch/hpcsh/include/disklabel.h | 6 +++++-
sys/arch/i386/include/disklabel.h | 10 +++++++++-
sys/arch/ibmnws/include/disklabel.h | 7 ++++++-
sys/arch/iyonix/include/disklabel.h | 6 +++++-
sys/arch/mmeye/include/disklabel.h | 6 +++++-
sys/arch/mvmeppc/include/disklabel.h | 9 +++++++--
sys/arch/netwinder/include/disklabel.h | 6 +++++-
sys/arch/next68k/include/disklabel.h | 6 +++++-
sys/arch/playstation2/include/disklabel.h | 10 +++++++++-
sys/arch/pmppc/include/disklabel.h | 11 +++++++----
sys/arch/prep/include/disklabel.h | 11 +++++++----
sys/arch/sandpoint/include/disklabel.h | 11 +++++++----
sys/arch/sbmips/include/disklabel.h | 10 +++++++++-
sys/arch/sgimips/include/disklabel.h | 6 +++++-
sys/arch/sh3/include/disklabel.h | 10 +++++++++-
sys/arch/sh5/include/disklabel.h | 10 +++++++++-
sys/arch/shark/include/disklabel.h | 6 +++++-
sys/arch/sparc64/include/disklabel.h | 6 +++++-
sys/arch/sun2/include/disklabel.h | 6 +++++-
sys/arch/x68k/include/disklabel.h | 6 +++++-
sys/arch/x86/include/bootinfo.h | 6 +++++-
sys/sys/disklabel.h | 10 ++++++++--
tools/Makefile | 10 +++++++---
tools/Makefile.disklabel | 23 +++++++++++++++++++++++
tools/disklabel/Makefile | 10 ++++++++++
tools/fdisk/Makefile | 10 ++++++++++
47 files changed, 338 insertions(+), 61 deletions(-)
diffs (truncated from 1037 to 300 lines):
diff -r 5936242e00d2 -r eaefabe38ee7 include/util.h
--- a/include/util.h Sun Jun 12 19:31:25 2005 +0000
+++ b/include/util.h Sun Jun 12 19:46:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: util.h,v 1.35 2005/05/15 21:01:34 thorpej Exp $ */
+/* $NetBSD: util.h,v 1.36 2005/06/12 19:46:15 dyoung Exp $ */
/*-
* Copyright (c) 1995
@@ -33,7 +33,9 @@
#define _UTIL_H_
#include <sys/cdefs.h>
+#if !HAVE_NBTOOL_CONFIG_H
#include <sys/ttycom.h>
+#endif /* !HAVE_NBTOOL_CONFIG_H */
#include <sys/types.h>
#include <stdio.h>
#include <pwd.h>
diff -r 5936242e00d2 -r eaefabe38ee7 lib/libc/gen/disklabel.c
--- a/lib/libc/gen/disklabel.c Sun Jun 12 19:31:25 2005 +0000
+++ b/lib/libc/gen/disklabel.c Sun Jun 12 19:46:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.c,v 1.31 2004/04/23 14:47:23 christos Exp $ */
+/* $NetBSD: disklabel.c,v 1.32 2005/06/12 19:46:15 dyoung Exp $ */
/*
* Copyright (c) 1983, 1987, 1993
@@ -29,12 +29,16 @@
* SUCH DAMAGE.
*/
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 5/3/95";
#else
-__RCSID("$NetBSD: disklabel.c,v 1.31 2004/04/23 14:47:23 christos Exp $");
+__RCSID("$NetBSD: disklabel.c,v 1.32 2005/06/12 19:46:15 dyoung Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -42,10 +46,17 @@
#include <sys/param.h>
#define DKTYPENAMES
#define FSTYPENAMES
-#include <sys/disklabel.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
+#if HAVE_NBTOOL_CONFIG_H
+#include "../../sys/sys/disklabel.h"
+#include "../../include/disktab.h"
+#else
+#include <sys/disklabel.h>
+#include <disktab.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
+
#include <assert.h>
#include <ctype.h>
#include <errno.h>
@@ -55,8 +66,6 @@
#include <string.h>
#include <unistd.h>
-#include <disktab.h>
-
#ifdef __weak_alias
__weak_alias(getdiskbyname,_getdiskbyname)
#endif
diff -r 5936242e00d2 -r eaefabe38ee7 sys/arch/acorn26/include/disklabel.h
--- a/sys/arch/acorn26/include/disklabel.h Sun Jun 12 19:31:25 2005 +0000
+++ b/sys/arch/acorn26/include/disklabel.h Sun Jun 12 19:46:15 2005 +0000
@@ -1,3 +1,7 @@
-/* $NetBSD: disklabel.h,v 1.1 2002/03/24 15:46:56 bjh21 Exp $ */
+/* $NetBSD: disklabel.h,v 1.2 2005/06/12 19:46:15 dyoung Exp $ */
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/arm/disklabel.h>
+#else
#include <arm/disklabel.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
diff -r 5936242e00d2 -r eaefabe38ee7 sys/arch/acorn32/include/disklabel.h
--- a/sys/arch/acorn32/include/disklabel.h Sun Jun 12 19:31:25 2005 +0000
+++ b/sys/arch/acorn32/include/disklabel.h Sun Jun 12 19:46:15 2005 +0000
@@ -1,3 +1,7 @@
-/* $NetBSD: disklabel.h,v 1.1 2001/10/05 22:27:49 reinoud Exp $ */
+/* $NetBSD: disklabel.h,v 1.2 2005/06/12 19:46:15 dyoung Exp $ */
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/arm/disklabel.h>
+#else
#include <arm/disklabel.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
diff -r 5936242e00d2 -r eaefabe38ee7 sys/arch/algor/include/disklabel.h
--- a/sys/arch/algor/include/disklabel.h Sun Jun 12 19:31:25 2005 +0000
+++ b/sys/arch/algor/include/disklabel.h Sun Jun 12 19:46:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.1 2001/05/28 16:22:18 thorpej Exp $ */
+/* $NetBSD: disklabel.h,v 1.2 2005/06/12 19:46:15 dyoung Exp $ */
/*
* Copyright (c) 1994 Christopher G. Demetriou
@@ -38,7 +38,11 @@
#define MAXPARTITIONS 8 /* number of partitions */
#define RAW_PART 2 /* raw partition: xx?c */
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/sys/dkbad.h>
+#else
#include <sys/dkbad.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
/* Just a dummy */
struct cpu_disklabel {
diff -r 5936242e00d2 -r eaefabe38ee7 sys/arch/alpha/include/disklabel.h
--- a/sys/arch/alpha/include/disklabel.h Sun Jun 12 19:31:25 2005 +0000
+++ b/sys/arch/alpha/include/disklabel.h Sun Jun 12 19:46:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.7 2002/04/03 06:16:01 lukem Exp $ */
+/* $NetBSD: disklabel.h,v 1.8 2005/06/12 19:46:15 dyoung Exp $ */
/*
* Copyright (c) 1994, 1999 Christopher G. Demetriou
@@ -39,7 +39,11 @@
#define MAXPARTITIONS 8 /* number of partitions */
#define RAW_PART 2 /* raw partition: xx?c */
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/sys/dkbad.h>
+#else
#include <sys/dkbad.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
/* Just a dummy */
struct cpu_disklabel {
diff -r 5936242e00d2 -r eaefabe38ee7 sys/arch/amd64/include/disklabel.h
--- a/sys/arch/amd64/include/disklabel.h Sun Jun 12 19:31:25 2005 +0000
+++ b/sys/arch/amd64/include/disklabel.h Sun Jun 12 19:46:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.4 2003/10/08 04:25:44 lukem Exp $ */
+/* $NetBSD: disklabel.h,v 1.5 2005/06/12 19:46:15 dyoung Exp $ */
/*
* Copyright (c) 1994 Christopher G. Demetriou
@@ -44,10 +44,18 @@
* MAXPARTITIONS was increased.
*/
/* Pull in MBR partition definitions. */
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/sys/bootblock.h>
+#else
#include <sys/bootblock.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
#ifndef __ASSEMBLER__
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/sys/dkbad.h>
+#else
#include <sys/dkbad.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
struct cpu_disklabel {
struct dkbad bad;
};
diff -r 5936242e00d2 -r eaefabe38ee7 sys/arch/arc/include/disklabel.h
--- a/sys/arch/arc/include/disklabel.h Sun Jun 12 19:31:25 2005 +0000
+++ b/sys/arch/arc/include/disklabel.h Sun Jun 12 19:46:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.7 2003/10/08 04:25:44 lukem Exp $ */
+/* $NetBSD: disklabel.h,v 1.8 2005/06/12 19:46:15 dyoung Exp $ */
/* $OpenBSD: disklabel.h,v 1.14 1999/03/23 16:36:17 millert Exp $ */
/* NetBSD: disklabel.h,v 1.3 1996/03/09 20:52:54 ghudson Exp */
@@ -43,9 +43,17 @@
#define OPENBSD_RAW_PART 2 /* raw partition: XX?c */
/* Pull in MBR partition definitions. */
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/sys/bootblock.h>
+#else
#include <sys/bootblock.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/sys/dkbad.h>
+#else
#include <sys/dkbad.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
struct cpu_disklabel {
struct mbr_partition dosparts[MBR_PART_COUNT];
struct dkbad bad;
diff -r 5936242e00d2 -r eaefabe38ee7 sys/arch/arm/include/disklabel.h
--- a/sys/arch/arm/include/disklabel.h Sun Jun 12 19:31:25 2005 +0000
+++ b/sys/arch/arm/include/disklabel.h Sun Jun 12 19:46:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.5 2005/06/02 17:45:59 he Exp $ */
+/* $NetBSD: disklabel.h,v 1.6 2005/06/12 19:46:15 dyoung Exp $ */
/*
* Copyright (c) 1994 Mark Brinicombe.
@@ -51,9 +51,15 @@
#define MAXPARTITIONS 8 /* number of partitions */
#define RAW_PART 2 /* raw partition: XX?c */
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/sys/dkbad.h>
+#include <nbinclude/sys/disklabel_acorn.h>
+#include <nbinclude/sys/bootblock.h>
+#else
#include <sys/dkbad.h>
#include <sys/disklabel_acorn.h>
#include <sys/bootblock.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
struct cpu_disklabel {
struct mbr_partition mbrparts[MBR_PART_COUNT];
diff -r 5936242e00d2 -r eaefabe38ee7 sys/arch/bebox/include/disklabel.h
--- a/sys/arch/bebox/include/disklabel.h Sun Jun 12 19:31:25 2005 +0000
+++ b/sys/arch/bebox/include/disklabel.h Sun Jun 12 19:46:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.6 2003/10/08 04:25:44 lukem Exp $ */
+/* $NetBSD: disklabel.h,v 1.7 2005/06/12 19:46:15 dyoung Exp $ */
/*
* Copyright (c) 1994 Christopher G. Demetriou
@@ -39,9 +39,17 @@
#define RAW_PART 3 /* raw partition: XX?d (XXX) */
/* Pull in MBR partition definitions. */
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/sys/bootblock.h>
+#else
#include <sys/bootblock.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/sys/dkbad.h>
+#else
#include <sys/dkbad.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
struct cpu_disklabel {
struct mbr_partition dosparts[MBR_PART_COUNT];
struct dkbad bad;
diff -r 5936242e00d2 -r eaefabe38ee7 sys/arch/cats/include/disklabel.h
--- a/sys/arch/cats/include/disklabel.h Sun Jun 12 19:31:25 2005 +0000
+++ b/sys/arch/cats/include/disklabel.h Sun Jun 12 19:46:15 2005 +0000
@@ -1,3 +1,7 @@
-/* $NetBSD: disklabel.h,v 1.3 2001/11/25 15:55:55 thorpej Exp $ */
+/* $NetBSD: disklabel.h,v 1.4 2005/06/12 19:46:15 dyoung Exp $ */
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/arm/disklabel.h>
+#else
#include <arm/disklabel.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
diff -r 5936242e00d2 -r eaefabe38ee7 sys/arch/cobalt/include/disklabel.h
--- a/sys/arch/cobalt/include/disklabel.h Sun Jun 12 19:31:25 2005 +0000
+++ b/sys/arch/cobalt/include/disklabel.h Sun Jun 12 19:46:15 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.7 2003/10/08 04:25:44 lukem Exp $ */
+/* $NetBSD: disklabel.h,v 1.8 2005/06/12 19:46:15 dyoung Exp $ */
/*
* Copyright (c) 1994 Christopher G. Demetriou
@@ -39,10 +39,18 @@
#define RAW_PART 3
/* Pull in MBR partition definitions. */
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/sys/bootblock.h>
+#else
#include <sys/bootblock.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
#ifndef __ASSEMBLER__
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/sys/dkbad.h>
+#else
#include <sys/dkbad.h>
+#endif /* HAVE_NBTOOL_CONFIG_H */
struct cpu_disklabel {
struct mbr_partition dosparts[MBR_PART_COUNT];
struct dkbad bad;
diff -r 5936242e00d2 -r eaefabe38ee7 sys/arch/dreamcast/include/disklabel.h
--- a/sys/arch/dreamcast/include/disklabel.h Sun Jun 12 19:31:25 2005 +0000
+++ b/sys/arch/dreamcast/include/disklabel.h Sun Jun 12 19:46:15 2005 +0000
@@ -1,7 +1,11 @@
-/* $NetBSD: disklabel.h,v 1.1 2000/12/11 18:19:14 marcus Exp $ */
+/* $NetBSD: disklabel.h,v 1.2 2005/06/12 19:46:15 dyoung Exp $ */
#ifndef _DREAMCAST_DISKLABEL_H_
#define _DREAMCAST_DISKLABEL_H_
+#if HAVE_NBTOOL_CONFIG_H
+#include <nbinclude/sh3/disklabel.h>
+#else
#include <sh3/disklabel.h>
Home |
Main Index |
Thread Index |
Old Index