Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Simplify and get rid of extern...
details: https://anonhg.NetBSD.org/src/rev/6146de4a0286
branches: trunk
changeset: 318611:6146de4a0286
user: martin <martin%NetBSD.org@localhost>
date: Tue May 01 09:01:45 2018 +0000
description:
Simplify and get rid of external "grep" dependency which is not available
on all install meadia.
Sugested by kre.
diffstat:
usr.sbin/sysinst/disks.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (24 lines):
diff -r eaa34231390d -r 6146de4a0286 usr.sbin/sysinst/disks.c
--- a/usr.sbin/sysinst/disks.c Tue May 01 08:42:41 2018 +0000
+++ b/usr.sbin/sysinst/disks.c Tue May 01 09:01:45 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disks.c,v 1.13 2017/01/13 05:49:27 christos Exp $ */
+/* $NetBSD: disks.c,v 1.14 2018/05/01 09:01:45 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -1480,11 +1480,12 @@
static bool
is_gpt(const char *dev)
{
+
check_available_binaries();
if (!have_gpt)
return false;
- return !run_program(RUN_SILENT | RUN_ERROR_OK,
- "sh -c 'gpt show %s |grep -e Pri\\ GPT\\ table'", dev);
+ return run_program(RUN_SILENT | RUN_ERROR_OK,
+ "gpt -qr header %s", dev) == 0;
}
Home |
Main Index |
Thread Index |
Old Index