LCOV - code coverage report
Current view: top level - hdata - vpd-common.c (source / functions) Hit Total Coverage
Test: skiboot.info Lines: 4 5 80.0 %
Date: 2024-09-10 18:37:41 Functions: 1 1 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
       2                 :            : /* Copyright 2013-2017 IBM Corp. */
       3                 :            : 
       4                 :            : #include <skiboot.h>
       5                 :            : #include <vpd.h>
       6                 :            : #include <string.h>
       7                 :            : #include <device.h>
       8                 :            : 
       9                 :            : static const struct machine_info machine_table[] = {
      10                 :            :         {"8247-21L", "IBM Power System S812L"},
      11                 :            :         {"8247-22L", "IBM Power System S822L"},
      12                 :            :         {"8247-24L", "IBM Power System S824L"},
      13                 :            :         {"8286-41A", "IBM Power System S814"},
      14                 :            :         {"8286-22A", "IBM Power System S822"},
      15                 :            :         {"8286-42A", "IBM Power System S824"},
      16                 :            : };
      17                 :            : 
      18                 :          1 : const struct machine_info *machine_info_lookup(const char *mtm)
      19                 :            : {
      20                 :            :         int i;
      21                 :          4 :         for(i = 0; i < ARRAY_SIZE(machine_table); i++)
      22                 :          4 :                 if (!strcmp(machine_table[i].mtm, mtm))
      23                 :          1 :                         return &machine_table[i];
      24                 :          0 :         return NULL;
      25                 :            : }

Generated by: LCOV version 1.14