summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2015-03-05 00:32:54 +0000
committerdteske <dteske@FreeBSD.org>2015-03-05 00:32:54 +0000
commit390b17942b55523706ad01b4309ce40fe3b203a2 (patch)
treef11748b3d73f019bed55800e23177840c37985b9 /usr.sbin/bsdconfig
parenta1b0091ca7d685209dc41d66a718f2b0ed66f397 (diff)
downloadFreeBSD-src-390b17942b55523706ad01b4309ce40fe3b203a2.zip
FreeBSD-src-390b17942b55523706ad01b4309ce40fe3b203a2.tar.gz
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()
Diffstat (limited to 'usr.sbin/bsdconfig')
-rwxr-xr-xusr.sbin/bsdconfig/includes/includes4
-rw-r--r--usr.sbin/bsdconfig/share/device.subr4
-rw-r--r--usr.sbin/bsdconfig/share/packages/index.subr4
3 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/bsdconfig/includes/includes b/usr.sbin/bsdconfig/includes/includes
index 7bd5312..6e9906f 100755
--- a/usr.sbin/bsdconfig/includes/includes
+++ b/usr.sbin/bsdconfig/includes/includes
@@ -69,7 +69,7 @@ show_include()
-v use_color=${USE_COLOR:-0} \
-v re="$pattern" \
-v show_desc=${SHOW_DESC:-0} '
- function asorti(src, dest)
+ function _asorti(src, dest)
{
k = nitems = 0;
@@ -120,7 +120,7 @@ show_include()
}
}
END {
- n = asorti(syntax, sorted_indices)
+ n = _asorti(syntax, sorted_indices)
for (i = 1; i <= n; i++)
printf "%s", syntax[sorted_indices[i]]
}' "$file" )
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]]
}
'
diff --git a/usr.sbin/bsdconfig/share/packages/index.subr b/usr.sbin/bsdconfig/share/packages/index.subr
index 41934d4..f3c1713 100644
--- a/usr.sbin/bsdconfig/share/packages/index.subr
+++ b/usr.sbin/bsdconfig/share/packages/index.subr
@@ -241,7 +241,7 @@ f_index_read()
export msg_packages
eval "$( debug= f_getvar "$var_to_get" | awk -F'|' '
- function asorti(src, dest)
+ function _asorti(src, dest)
{
k = nitems = 0
@@ -292,7 +292,7 @@ f_index_read()
END {
print "_npkgs=" tpkgs # For convenience, total package count
- n = asorti(categories, categories_sorted)
+ n = _asorti(categories, categories_sorted)
# Produce package counts for each category
for (i = 1; i <= n; i++)
OpenPOWER on IntegriCloud