From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 303711A1E15 for ; Tue, 27 Sep 2016 02:03:43 -0700 (PDT) Received: by mail-io0-x232.google.com with SMTP id m79so9391309ioo.3 for ; Tue, 27 Sep 2016 02:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc; bh=XP/auJ/le6AWT1AmkqcNjgUHeWwpFiR8NHEycBOE8Po=; b=MMWHxlihdhmNiwi+EBdSVlXsi4fmPIVYK/39W9vrTfH/kYrKFb+YIzrAQyEiGa74MN CV/q/V2ckCak0NMOPKlIflNfEGC0c0VNcpadGLgG9fCjxNIiOF5cYrT9bPRa4jVXk/xn /C8iwnOctQHR6F8OYc/QsUvx0Kts2tw181orB/6cKFEQ210aXCKhyi+8oF2CQO+JA16t dpMBoKCRXNZGktowtBGMBP5P9e0DjQXKIlCZK6JGRazw4ixCSC9lXt7xa/gl9v+Tty6i hWLaqnJeUkuERvaWpA6uxtnBTdPBOZwfwxUNzzmrxfoTAT8IZOcnO7dSZ3hm79bG0fHI jFQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=XP/auJ/le6AWT1AmkqcNjgUHeWwpFiR8NHEycBOE8Po=; b=BdLjRXFJOqyz1hBF2qSPWZ2T9krw8kY/GR7frvdbzf2I/U6Wb/TL24N3rf0B+rWqNj U5k8XEvnIeyDIWkGg6OSwCG1S5vT0dB4a7MNOrncRruBDcRSvhw18iLD2SkSRHoxFrif eNrZPu2Eb2vjxVFthEkn4Lpt6WCg9plMHzXTm0TzFAV51r+I6CQsmd5Vapb1hxGV3ppk F85fnW2aSPl0AWRsRAvH7ZwAgwbcPGv15olLH+dfiU1hjOg+YCBoDHWFWi3AbFEdRd8q T5iYT+kkDPOznLBNqJOqUqdYoG45QkOrlDRFgtn9bP7A0SepI5V3/D2Nqd2ac+NrC5rQ Ylwg== X-Gm-Message-State: AE9vXwOkhszpkqrX1eeN+nCdu/YlCHtWcCa4gAZub4sJz1OxQPwR5E4Oke5/a2qSyAcwnlMZUjBS3oOraP6dNw== X-Received: by 10.107.152.74 with SMTP id a71mr28115006ioe.120.1474967022376; Tue, 27 Sep 2016 02:03:42 -0700 (PDT) MIME-Version: 1.0 From: GN Keshava Date: Tue, 27 Sep 2016 09:03:31 +0000 Message-ID: To: "edk2-devel@lists.01.org" Cc: "edk2-devel@lists.sourceforge.net" X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: How to open a file by it's full path in UEFI X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 09:03:43 -0000 Content-Type: text/plain; charset=UTF-8 Hi all, I'm trying to open a file from my UEFI application. The path of file is fs1:/myfolder/myfile.txt The code : efiStatus = bs->LocateHandleBuffer(ByProtocol, &sfspGuid, NULL, &handleCount, &handles); for (index = 0; index < (int)handleCount; ++ index) { EFI_SIMPLE_FILE_SYSTEM_PROTOCOL* fs = NULL; efiStatus = bs->HandleProtocol( handles[index], &sfspGuid, (void**)&fs); EFI_FILE_PROTOCOL* root = NULL; ... efiStatus = fs->OpenVolume(fs, &root); EFI_FILE_PROTOCOL* token = NULL; efiStatus = root->Open( root, &token, L"myfolder\\myfile.txt", EFI_FILE_MODE_READ, EFI_FILE_READ_ONLY | EFI_FILE_HIDDEN | EFI_FILE_SYSTEM); } But using this method, I can only go through all the file system handles and open each volume and try opening my file. But I want to give full path to my file and open it in it's volume. How can I acheive this? Thanks. With regards, Keshava GN