# -*- shell-script -*-

# 00minimal - Minimal, usually empty routines for extra lscfg output.

# This file is part of the Linux lsvpd package.

# (C) Copyright IBM Corp. 2002, 2003, 2004

# Maintained by Martin Schwenke <martins@au.ibm.com>

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    
# $Id: 00minimal,v 1.7 2004/04/16 03:51:34 martins Exp $

true || return 0

######################################################################

do_pre_items ()
{
    :
}

do_post_items ()
{
    :
}

do_platform_specific_section ()
{
    :
}

get_architecture ()
{
    local arch="unknown"

    local f="${db_uname_dir}/machine"
    [ -r "$f" ] && read arch <"$f"

    echo "$arch"
}

get_cpus_basic ()
{
    local count=1

    local f="${db_proc_dir}/cpuinfo"
    [ -f "$f" ] && count=$(grep -c '^processor[^[:alnum:]]*:' "$f")

    if [ $count -lt 2 ] ; then
	echo "Uni-Processor"
    else
	echo "Multiple Processor"
    fi
}

get_cpus ()
{
    get_cpus_basic
}
