Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sunlabel When built as a host tool, don't search /d...
details: https://anonhg.NetBSD.org/src/rev/d58c1e4a96ef
branches: trunk
changeset: 542356:d58c1e4a96ef
user: uwe <uwe%NetBSD.org@localhost>
date: Mon Jan 27 01:29:06 2003 +0000
description:
When built as a host tool, don't search /dev as we only use sunlabel
on the disk image. This ifdefs out a call to getrawpartition() so we
don't have to provide a compatibility replacement for it.
diffstat:
usr.sbin/sunlabel/sunlabel.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r c6b3a9a3aee1 -r d58c1e4a96ef usr.sbin/sunlabel/sunlabel.c
--- a/usr.sbin/sunlabel/sunlabel.c Mon Jan 27 01:25:07 2003 +0000
+++ b/usr.sbin/sunlabel/sunlabel.c Mon Jan 27 01:29:06 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunlabel.c,v 1.8 2002/12/21 08:11:28 lukem Exp $ */
+/* $NetBSD: sunlabel.c,v 1.9 2003/01/27 01:29:06 uwe Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: sunlabel.c,v 1.8 2002/12/21 08:11:28 lukem Exp $");
+__RCSID("$NetBSD: sunlabel.c,v 1.9 2003/01/27 01:29:06 uwe Exp $");
#include <stdio.h>
#include <errno.h>
@@ -263,6 +263,7 @@
}
if (trydisk(s, 0))
return;
+#ifndef DISTRIB /* native tool: search in /dev */
tmp = malloc(strlen(s) + 7);
sprintf(tmp, "/dev/%s", s);
if (trydisk(tmp, 0))
@@ -270,6 +271,7 @@
sprintf(tmp, "/dev/%s%c", s, getrawpartition() + 'a');
if (trydisk(tmp, 0))
return;
+#endif
errx(1, "Can't find device for disk `%s'", s);
}
Home |
Main Index |
Thread Index |
Old Index