From 390b17942b55523706ad01b4309ce40fe3b203a2 Mon Sep 17 00:00:00 2001 From: dteske Date: Thu, 5 Mar 2015 00:32:54 +0000 Subject: MFC r273068: Rename awk(1) implementation of GNU awk's built-in asorti() function to prevent fatal conflict should one-true-awk ever be replaced -- e.g., in an appliance -- with GNU awk. NB: Renamed my implementation to _asorti() --- usr.sbin/bsdconfig/share/device.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/bsdconfig/share/device.subr') diff --git a/usr.sbin/bsdconfig/share/device.subr b/usr.sbin/bsdconfig/share/device.subr index 4e60d84..d95684d 100644 --- a/usr.sbin/bsdconfig/share/device.subr +++ b/usr.sbin/bsdconfig/share/device.subr @@ -1116,7 +1116,7 @@ f_device_shutdown() f_device_sort_by_awk=' # Variables that should be defined on the invocation line: # -v prop="property" -function asorti(src, dest) +function _asorti(src, dest) { k = nitems = 0 for (i in src) dest[++nitems] = i @@ -1137,7 +1137,7 @@ function asorti(src, dest) } } END { - nitems = asorti(devices, devices_sorted) + nitems = _asorti(devices, devices_sorted) for (i = 1; i <= nitems; i++) print devices[devices_sorted[i]] } ' -- cgit v1.1