From patchwork Sun Apr 2 11:07:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 746160 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vwssc0CqJz9ryk for ; Sun, 2 Apr 2017 21:08:04 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vwssb51LlzDqHJ for ; Sun, 2 Apr 2017 21:08:03 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vwssJ1FvgzDqH6 for ; Sun, 2 Apr 2017 21:07:47 +1000 (AEST) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v32B6BPC035023 for ; Sun, 2 Apr 2017 07:07:45 -0400 Received: from e28smtp06.in.ibm.com (e28smtp06.in.ibm.com [125.16.236.6]) by mx0a-001b2d01.pphosted.com with ESMTP id 29jvxxqr0x-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Sun, 02 Apr 2017 07:07:44 -0400 Received: from localhost by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 2 Apr 2017 16:37:41 +0530 Received: from d28relay08.in.ibm.com (9.184.220.159) by e28smtp06.in.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 2 Apr 2017 16:37:41 +0530 Received: from d28av07.in.ibm.com (d28av07.in.ibm.com [9.184.220.146]) by d28relay08.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v32B6MjP14352622 for ; Sun, 2 Apr 2017 16:36:22 +0530 Received: from d28av07.in.ibm.com (localhost [127.0.0.1]) by d28av07.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v32B7eKF026959 for ; Sun, 2 Apr 2017 16:37:40 +0530 Received: from hegdevasant.in.ibm.com ([9.77.203.198]) by d28av07.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v32B7da5026956; Sun, 2 Apr 2017 16:37:39 +0530 From: Vasant Hegde To: skiboot@lists.ozlabs.org Date: Sun, 2 Apr 2017 16:37:26 +0530 X-Mailer: git-send-email 2.9.3 X-TM-AS-MML: disable x-cbid: 17040211-0020-0000-0000-000000DE1CB5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17040211-0021-0000-0000-0000029D4915 Message-Id: <20170402110729.4785-1-hegdevasant@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-04-02_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704020107 Subject: [Skiboot] [PATCH 1/4] hdat: Populate model property with 'Unknown' in error path X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Linux kernel refers to model and sytem-id properties. Also some of the user space tools refers these properties. Hence in error path fill model/system-id property with "Unknown". Signed-off-by: Vasant Hegde --- hdata/vpd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hdata/vpd.c b/hdata/vpd.c index 639fa33..1533f3f 100644 --- a/hdata/vpd.c +++ b/hdata/vpd.c @@ -535,9 +535,14 @@ static void sysvpd_parse_opp(const void *sysvpd, unsigned int sysvpd_sz) v = vpd_find(sysvpd, sysvpd_sz, "OSYS", "MM", &sz); if (v) dt_add_property_nstr(dt_root, "model", v, sz); + else + dt_add_property_string(dt_root, "model", "Unknown"); + v = vpd_find(sysvpd, sysvpd_sz, "OSYS", "SS", &sz); if (v) dt_add_property_nstr(dt_root, "system-id", v, sz); + else + dt_add_property_string(dt_root, "system-id", "Unknown"); }