From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=68.232.149.229; helo=esa6.dell-outbound.iphmx.com; envelope-from=jim.dailey@dell.com; receiver=edk2-devel@lists.01.org Received: from esa6.dell-outbound.iphmx.com (esa6.dell-outbound.iphmx.com [68.232.149.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 61EC32112DF76 for ; Thu, 4 Oct 2018 12:05:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1538679918; x=1570215918; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nmebqFormrqCqDA3dPwKK885WuJL+1ZooL4n5hP5j/A=; b=pDIbaU2m8Ov3hOg1INwkP/XMO40HCAd+nJRf1GuvTS8wsga9AM8TCQQS L5sJmDwtPPdJFWACf42f3WGr3UZiH50IvFEm6qjWhi/2S+sCu1SeM6uXP x3fDbcCnGBJEpjLXeL2GDcFQiImvhMzwaWk98T/rIx3Rnu1JaTshmUasw k=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EaAAAvY7ZbhyeV50NbHAEBAQQBAQc?= =?us-ascii?q?EAQGBUQcBAQsBg2ooCot/X4tBgg2WXYF6CwEBGIRUAoQmITQNDQEDAQECAQE?= =?us-ascii?q?CAQECEAEBARUJCCkvgjYigmIBAQEBAwERKD8QAgEIFSEJBygeEQIEDgUIGoJ?= =?us-ascii?q?/ggKaPYlXAQEBghuKEYssgheEJIVLhGkiAohRhUmPPQcCjDmDfx+Pa5U4AgQ?= =?us-ascii?q?CBAUCFIFCN4FXcIM8gjOOIW+MKoEfAQE?= X-IPAS-Result: =?us-ascii?q?A2EaAAAvY7ZbhyeV50NbHAEBAQQBAQcEAQGBUQcBAQsBg?= =?us-ascii?q?2ooCot/X4tBgg2WXYF6CwEBGIRUAoQmITQNDQEDAQECAQECAQECEAEBARUJC?= =?us-ascii?q?CkvgjYigmIBAQEBAwERKD8QAgEIFSEJBygeEQIEDgUIGoJ/ggKaPYlXAQEBg?= =?us-ascii?q?huKEYssgheEJIVLhGkiAohRhUmPPQcCjDmDfx+Pa5U4AgQCBAUCFIFCN4FXc?= =?us-ascii?q?IM8gjOOIW+MKoEfAQE?= Received: from mx0a-00154901.pphosted.com ([67.231.149.39]) by esa6.dell-outbound.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Oct 2018 14:05:16 -0500 Received: from pps.filterd (m0133268.ppops.net [127.0.0.1]) by mx0a-00154901.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w94J3G3r163011 for ; Thu, 4 Oct 2018 15:05:16 -0400 Received: from esa5.dell-outbound2.iphmx.com (esa5.dell-outbound2.iphmx.com [68.232.153.203]) by mx0a-00154901.pphosted.com with ESMTP id 2mt3mrnxn4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 04 Oct 2018 15:05:16 -0400 From: Received: from ausxippc110.us.dell.com ([143.166.85.200]) by esa5.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA256; 05 Oct 2018 01:05:14 +0600 X-LoopCount0: from 10.166.136.213 X-IronPort-AV: E=Sophos;i="5.54,341,1534827600"; d="scan'208";a="711136458" To: CC: , Thread-Topic: [edk2] [PATCH] ShellPkg: Create a homefilesystem environment variable Thread-Index: AQHUXAUSRbJtml/HR0WGBA/8lrhcnqUPbZZA Date: Thu, 4 Oct 2018 19:05:14 +0000 Message-ID: <720fd675cf8848eb8107b4efda23446c@ausx13mps335.AMER.DELL.COM> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Enabled=True; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SiteId=945c199a-83a2-4e80-9f8c-5a91be5752dd; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Owner=Jim_Dailey@Dell.com; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SetDate=2018-10-04T18:48:30.4189068Z; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Name=External Public; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Application=Microsoft Azure Information Protection; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Extended_MSFT_Method=Manual; Sensitivity=External Public x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.143.242.75] MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-10-04_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810040171 Subject: Re: [PATCH] ShellPkg: Create a homefilesystem environment variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2018 19:05:18 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Las= zlo Ersek I'll attempt answer some of your questions, but Jaben may have to answer some of them (like his commit speed :-) or questions about what the shell spec allows). > >So my first question would have been, what if the shell is memory mapped >(from a firmware volume), but the platform doesn't expose firmware >filesystems (FFSs) as EFI simple file system protocol instances? In that >case, the "file system on which the executing shell is located" seems >ill-defined. In such a case homefilesystem will not get defined, I think. >>>> execute %homefilesystem% to set the cwd to the root of the file system >>>> where the shell is located. > >I think the commit message here misses a "CD" command. The shell does not handle "cd fsN:". But "fsN:" does work. I suppose one could always add a "cd \" after "%hoemfilesystem%", but I think it will not have any effect in most (all?) cases where homefilesystem is defined. >>>> + InternalEfiShellSetEnv(L"homefilesystem", StartupScriptPath, TRUE= ); >>>> + > >Again, this refers to the startup script, not the shell itself. The variable's name implies the startup script, but at the point it is used, it contains only the file system where the shell itself was found. Code following this continues to modify the variable's value until it eventually does point to where the startup script *might* be. >Thanks >Laszlo > Regards, Jim