Deleted Added
full compact
geom.subr (264840) geom.subr (280921)
1if [ ! "$_GEOM_SUBR" ]; then _GEOM_SUBR=1
2#
3# Copyright (c) 2012-2014 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 (INCLUDING, 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 [ ! "$_GEOM_SUBR" ]; then _GEOM_SUBR=1
2#
3# Copyright (c) 2012-2014 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 (INCLUDING, 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/share/geom.subr 264840 2014-04-23 22:04:04Z dteske $
27# $FreeBSD: head/usr.sbin/bsdconfig/share/geom.subr 280921 2015-03-31 21:34:42Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." geom.subr
34f_include $BSDCFG_SHARE/strings.subr
35f_include $BSDCFG_SHARE/struct.subr

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

404 echo "$__struct"
405 fi
406 f_struct "$__struct" # Return status
407}
408
409############################################################ MAIN
410
411#
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." geom.subr
34f_include $BSDCFG_SHARE/strings.subr
35f_include $BSDCFG_SHARE/struct.subr

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

404 echo "$__struct"
405 fi
406 f_struct "$__struct" # Return status
407}
408
409############################################################ MAIN
410
411#
412# Parse GEOM configuration unless requeted otherwise
412# Parse GEOM configuration unless requested otherwise
413#
414f_dprintf "%s: GEOM_SELF_SCAN_ALL=[%s]" geom.subr "$GEOM_SELF_SCAN_ALL"
415case "$GEOM_SELF_SCAN_ALL" in
416""|0|[Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee]) : do nothing ;;
417*)
418 f_geom_get_all
419 if [ "$debug" ]; then
420 debug= f_geom_find "" "$GEOM_CLASS_ANY" geoms
421 f_count ngeoms $geoms
422 f_dprintf "%s: Initialized %u geom devices in %u classes." \
423 geom.subr "$ngeoms" "$NGEOM_CLASSES"
424 unset geoms ngeoms
425 fi
426esac
427
428f_dprintf "%s: Successfully loaded." geom.subr
429
430fi # ! $_GEOM_SUBR
413#
414f_dprintf "%s: GEOM_SELF_SCAN_ALL=[%s]" geom.subr "$GEOM_SELF_SCAN_ALL"
415case "$GEOM_SELF_SCAN_ALL" in
416""|0|[Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee]) : do nothing ;;
417*)
418 f_geom_get_all
419 if [ "$debug" ]; then
420 debug= f_geom_find "" "$GEOM_CLASS_ANY" geoms
421 f_count ngeoms $geoms
422 f_dprintf "%s: Initialized %u geom devices in %u classes." \
423 geom.subr "$ngeoms" "$NGEOM_CLASSES"
424 unset geoms ngeoms
425 fi
426esac
427
428f_dprintf "%s: Successfully loaded." geom.subr
429
430fi # ! $_GEOM_SUBR