Deleted Added
full compact
netmask.subr (252077) netmask.subr (252178)
1if [ ! "$_NETWORKING_NETMASK_SUBR" ]; then _NETWORKING_NETMASK_SUBR=1
2#
3# Copyright (c) 2006-2013 Devin Teske
4# All Rights Reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
1if [ ! "$_NETWORKING_NETMASK_SUBR" ]; then _NETWORKING_NETMASK_SUBR=1
2#
3# Copyright (c) 2006-2013 Devin Teske
4# All Rights Reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD: head/usr.sbin/bsdconfig/networking/share/netmask.subr 252077 2013-06-21 23:13:55Z dteske $
27# $FreeBSD: head/usr.sbin/bsdconfig/networking/share/netmask.subr 252178 2013-06-24 20:58:54Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." networking/netmask.subr
34f_include $BSDCFG_SHARE/dialog.subr
35f_include $BSDCFG_SHARE/networking/common.subr

--- 11 unchanged lines hidden (view full) ---

47#
48f_dialog_maskerror()
49{
50 local error="$1" netmask="$2"
51
52 [ ${error:-0} -ne 0 ] || return $SUCCESS
53
54 case "$error" in
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." networking/netmask.subr
34f_include $BSDCFG_SHARE/dialog.subr
35f_include $BSDCFG_SHARE/networking/common.subr

--- 11 unchanged lines hidden (view full) ---

47#
48f_dialog_maskerror()
49{
50 local error="$1" netmask="$2"
51
52 [ ${error:-0} -ne 0 ] || return $SUCCESS
53
54 case "$error" in
55 1) f_show_msg "$msg_ipv4_mask_field_contains_invalid_chars" "$mask";;
56 2) f_show_msg "$msg_ipv4_mask_field_is_null" "$mask";;
57 3) f_show_msg "$msg_ipv4_mask_field_exceeds_max_value" "$mask";;
58 4) f_show_msg "$msg_ipv4_mask_field_missing_or_extra" "$mask";;
59 5) f_show_msg "$msg_ipv4_mask_field_invalid_value" "$mask";;
55 1) f_show_msg "$msg_ipv4_mask_field_contains_invalid_chars" "$mask" ;;
56 2) f_show_msg "$msg_ipv4_mask_field_is_null" "$mask" ;;
57 3) f_show_msg "$msg_ipv4_mask_field_exceeds_max_value" "$mask" ;;
58 4) f_show_msg "$msg_ipv4_mask_field_missing_or_extra" "$mask" ;;
59 5) f_show_msg "$msg_ipv4_mask_field_invalid_value" "$mask" ;;
60 esac
61}
62
63# f_dialog_validate_netmask $netmask
64#
65# Returns zero if the given argument (a subnet mask) is of the proper format.
66#
67# If the subnet mask is determined to be invalid, the appropriate error will be

--- 68 unchanged lines hidden ---
60 esac
61}
62
63# f_dialog_validate_netmask $netmask
64#
65# Returns zero if the given argument (a subnet mask) is of the proper format.
66#
67# If the subnet mask is determined to be invalid, the appropriate error will be

--- 68 unchanged lines hidden ---