Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sbin/gpt Pull up following revision(s) (requested by mrg ...
details: https://anonhg.NetBSD.org/src/rev/144efd337ac1
branches: netbsd-8
changeset: 434078:144efd337ac1
user: snj <snj%NetBSD.org@localhost>
date: Wed Jul 05 20:07:42 2017 +0000
description:
Pull up following revision(s) (requested by mrg in ticket #93):
sbin/gpt/biosboot.c: revision 1.28
only do wedges if not the tools version. fixes build on netbsd-4,
and any other place that might have the same ioctl name while having
something not quite right (in this case, cpuid_t in headers not
working properly..)
diffstat:
sbin/gpt/biosboot.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diffs (53 lines):
diff -r 0c194b355cb7 -r 144efd337ac1 sbin/gpt/biosboot.c
--- a/sbin/gpt/biosboot.c Wed Jul 05 20:06:26 2017 +0000
+++ b/sbin/gpt/biosboot.c Wed Jul 05 20:07:42 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: biosboot.c,v 1.27 2017/02/16 03:32:17 christos Exp $ */
+/* $NetBSD: biosboot.c,v 1.27.4.1 2017/07/05 20:07:42 snj Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -37,17 +37,21 @@
#include <sys/cdefs.h>
#ifdef __RCSID
-__RCSID("$NetBSD: biosboot.c,v 1.27 2017/02/16 03:32:17 christos Exp $");
+__RCSID("$NetBSD: biosboot.c,v 1.27.4.1 2017/07/05 20:07:42 snj Exp $");
#endif
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/ioctl.h>
-#ifdef DIOCGWEDGEINFO
+#include <sys/param.h>
+#include <sys/bootblock.h>
+
+#if defined(DIOCGWEDGEINFO) && !defined(HAVE_NBTOOL_CONFIG_H)
+#define USE_WEDGES
+#endif
+#ifdef USE_WEDGES
#include <sys/disk.h>
#endif
-#include <sys/param.h>
-#include <sys/bootblock.h>
#include <err.h>
#include <fcntl.h>
@@ -252,7 +256,7 @@
static int
cmd_biosboot(gpt_t gpt, int argc, char *argv[])
{
-#ifdef DIOCGWEDGEINFO
+#ifdef USE_WEDGES
struct dkwedge_info dkw;
#endif
int ch;
@@ -289,7 +293,7 @@
if (argc != optind)
return usage();
-#ifdef DIOCGWEDGEINFO
+#ifdef USE_WEDGES
if ((gpt->sb.st_mode & S_IFMT) != S_IFREG &&
ioctl(gpt->fd, DIOCGWEDGEINFO, &dkw) != -1) {
if (entry > 0)
Home |
Main Index |
Thread Index |
Old Index