From nobody Wed Dec 25 14:01:21 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1507185268255477.9994738906564; Wed, 4 Oct 2017 23:34:28 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E18A721E7821F; Wed, 4 Oct 2017 23:31:04 -0700 (PDT) Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0055.outbound.protection.outlook.com [104.47.37.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 845FF21E78218 for ; Wed, 4 Oct 2017 23:31:03 -0700 (PDT) Received: from CY4PR03CA0016.namprd03.prod.outlook.com (10.168.162.26) by CY4PR03MB2696.namprd03.prod.outlook.com (10.173.43.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 5 Oct 2017 06:34:24 +0000 Received: from BN1AFFO11FD037.protection.gbl (2a01:111:f400:7c10::121) by CY4PR03CA0016.outlook.office365.com (2603:10b6:903:33::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11 via Frontend Transport; Thu, 5 Oct 2017 06:34:24 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD037.mail.protection.outlook.com (10.58.52.241) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Thu, 5 Oct 2017 06:34:23 +0000 Received: from uefi-workstation.ap.freescale.net (uefi-workstation.ap.freescale.net [10.232.14.83]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v956YId8006505; Wed, 4 Oct 2017 23:34:21 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=104.47.37.55; helo=nam02-cy1-obe.outbound.protection.outlook.com; envelope-from=meenakshi.aggarwal@nxp.com; receiver=edk2-devel@lists.01.org Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; From: Meenakshi Aggarwal To: , , , Date: Thu, 5 Oct 2017 12:06:31 +0530 Message-ID: <1507185391-6076-1-git-send-email-meenakshi.aggarwal@nxp.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131516588639659200; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(7966004)(336005)(346002)(39860400002)(376002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(5003940100001)(50986999)(356003)(68736007)(189998001)(50226002)(47776003)(6666003)(8676002)(81166006)(305945005)(106466001)(53936002)(97736004)(104016004)(105606002)(81156014)(77096006)(33646002)(85426001)(316002)(50466002)(498600001)(2201001)(8656003)(8936002)(110136005)(2906002)(48376002)(16586007)(69596002)(36756003)(4326008)(5660300001)(86362001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2696; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD037; 1:3qYrj3hVRoAexJk9WTR9DeRbBvHMwnPz9kH+xnJ8Zi3R/0kR093BD+B22Uor1z3gp97CArc0OH5somNxAjNzmWh96480pVfRe/FX3p7ybMECg6hNPM4sWuGXQaXjcNlF MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 78576abd-cb72-4952-c35f-08d50bbb1e64 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CY4PR03MB2696; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 3:AFda4670Lb1S3fDl+2NfKaaX97WzE426houbFzSe1nJs98tbeCWg27S8cnRKzu8iZEskQTKJzgTPdK4PeP0hJyvbxqpdv0HVHad/Ob2vlaCNLrz6vcrVUYcfPI7GjFFWEPJNrZHnDOhPpnzXH73cqfkEvuCaor0FXLrhVKFyPv/MyLqgZuqVqMlHk+z8RLUZH6SEkkKQhgjPo6FfBLQ9BgMOcZ7cIpNbXtIJwHNfqmvQIDkvfvdLbOfRJGmiIncR/tNqwwFfNjqQo6LLagl6NK2rPxqAdKQbimPVtHJChKD+sPQs/xhBfLwbh1+O8AatypoJoSXExI0Tq/IHYdnKPw==; 25:4+O7r/ezZT3wtkoeGUoYC6KvRW1hSGFAUNgZ+VHmwImvzLc+0huaMM3+7cJm7/ZFjSxggB6j5uI5pz0xqCu6ZEOu4QQsnXEfZIyGhNFHIwBLBzD45/XOPsFKcrcUeZjJIURnVFCcgUM/ThlAaooXFlOoLagabwWMIzwJzTjTg0EfarfGvcmp1vVG5vgi/3C121adfW4suwiGi9lm8OBRGMgQzriQ/RO2aBkHYAlRdPT1zpaY3JjcUBXNnBPvy9+OPACTXMVk1nsMS6dFUI9ybotmyf8VCGamnfyJGtu+pr3/sloC1+Fzppo+iPzKpecny1egJw4L3thHf6LxqN/Ehw==; 31:E51jfS1UQd/OpxbKUi99R3NmSc1CwG6nYM6gpYaWUgDD4XcXuL+J83zP+EaWG5fwT6i98H60FTkpSmT89JsMNDlM1GKLTwg8cG6lPnJ0XNeNSIHxb8q5xq+4+i4KD0c5vP8Sj97TYzmo20dil9F6wVhMeX8xrWc2rkYfjO9Tp187yUje99BxYk95dOBgWwToKcTBvNO0xBzbIqggOqSDnjjgvVZcVIDtIkwdOPKrQOM= X-MS-TrafficTypeDiagnostic: CY4PR03MB2696: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6096035)(20161123556025)(20161123559100)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123565025)(20161123561025)(20161123563025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB2696; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB2696; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 4:skOENOYwx587I4hsVMx3VvoQKmapw5iMEWr3lmAEhlpoYfZO7FBENFijZF3tNGZA+vgigs0MuTMTH0ID1odSMUrrGmE9iAq+cQGp8DK+0CSAZyFAGlbcA/8smNNV8LKfC/ucIgtMrDOw72+a6c94jhzgrXVOlpaTlfOQanjctO6llLmQcC1Xf8g1Vyx079CJiPLjfVry2RBZiHqjkRa/lzBhc1PdZjL2lIFARJNvAvtxVHCKLsdagoxA9Zdfg3/1lVB6aGqnroeudV2AGHjdCzwHCUINdAQHG5/VlOMuZGQ= X-Forefront-PRVS: 04519BA941 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2696; 23:1QKX5xk2JmmMP8x2oKvwsfReCEO2Dh9JcjF2s4v3f?= =?us-ascii?Q?wcm9zZLhp1YL4Z0gBxzfq/rwP75FPMhUsAl67snK1AyWmlP8+4tkitz2MUZm?= =?us-ascii?Q?DjTck9rvDvWEQ1sI0AEIjyr4aKGQYllWBLjuyZ/Xq7HDxWr3YmJX2oCQW/P3?= =?us-ascii?Q?MPxL0QG70sVmMdyc/5Hh6/y8iOv/OlNzQDzOr5NTjUPXLMZqcMaFVwTaZACq?= =?us-ascii?Q?ZNP3xEQMRLWKVZVT/j+40o1bGJ1kKxZOBgDCDPN9DCgngyQP3FNolqPQycqA?= =?us-ascii?Q?4xJnHe1PK2sJTCVmjZCJPsjwXh1XC29wuKhYenK0E7CHGxLyIS3Bcks8xNmr?= =?us-ascii?Q?NCqGKw89B/vGB8A1nfTR1lCLeFLyuc2qSShN3fFC6VHmied73A6wJ9Enjaao?= =?us-ascii?Q?Tg04g0iTjcy78K903MN46T4maqzTqRQrg4LIMFH9gc1o2mQfGW+zRwo1NEWI?= =?us-ascii?Q?B6GHZlJowJLzUO013nR51D0CttEtXViK+qZOrLGV74BgxxtoCMQs2Zm8FZ28?= =?us-ascii?Q?R0gZJ9HZv83qr2dmIuo/LxeeLXCvH6GJK65w7ih+4wXuZz+mQymCbcDHte4b?= =?us-ascii?Q?CtcQXvMGs3b6IVnxOob5IkFQ+KS55MTaBTgRqNy68ZDAhDyY2RHIGMb6aqyX?= =?us-ascii?Q?i7med1MeF8FgQltNHMcff2DAGOyEV7UmgBjMz+Iw8hHArtWPsDsG+NZAMBDu?= =?us-ascii?Q?mZOnAwbmggMWMSPHsBvY7g7izxUmChaldjO8q4JTK98wlPzwH1t7Em0X3uNp?= =?us-ascii?Q?isQA18O17TsqSiUeMjfwZzrLvvqJnXGmMO9GJdS0g2S4r47atmNfFR1f2EmZ?= =?us-ascii?Q?qHaxa31ZFh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MfpfNy/Xzdkhv7qodxxwU7D42qPYtRePPbGIYilcdpImVqWQPptLut7CGJDl6CSotdPwIxjV9sR2Y=; 7:APOLkXp4FqG4w2iNRlY0sUDmF2kA08ED02uLGELUNq4vnaZxDrPhicp0GfArTUPkmWNRKXLTF1evZnsRNWTpZSdRUbc4nPf6416wteGor60xABMWM9QAZQh/44Ajn3JcdM/Be8DT7YUn3ZbEW5ovNs1mqv6EFE5aiFGES4OE9RLAqgst9z9iefsQhLVvvccYPwkRF0lU9rU6t0MUAOnQhO3HeaKiuGLB+mBgG0z7qvI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2017 06:34:23.7319 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2696 Subject: [edk2] [PATCH] Ifconfig : Fixed False information about Media State. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Issue : We were setting MediaPresent as TRUE (default), so even if NetLibDetectMedia() did not set MediaPresent Flag as TRUE, ifconfig always display Media State as 'Media Present' Fix : Set MediaPresent as FALSE before calling NetLibDetectMedia() Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal --- ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c b/She= llPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c index 4db07b2..7c05b68 100644 --- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c +++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c @@ -554,8 +554,6 @@ IfConfigShowInterfaceInfo ( EFI_IPv4_ADDRESS Gateway; UINT32 Index; =20 - MediaPresent =3D TRUE; - if (IsListEmpty (IfList)) { ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IFCONFIG_INVALID_INTE= RFACE), gShellNetwork1HiiHandle); } @@ -576,6 +574,8 @@ IfConfigShowInterfaceInfo ( // // Get Media State. // + MediaPresent =3D FALSE; + NetLibDetectMedia (IfCb->NicHandle, &MediaPresent); if (!MediaPresent) { ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IFCONFIG_INFO_MEDIA= _STATE), gShellNetwork1HiiHandle, L"Media disconnected"); --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel