From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-x22d.google.com (mail-yw0-x22d.google.com [IPv6:2607:f8b0:4002:c05::22d]) (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 140B81A1E20 for ; Mon, 17 Oct 2016 10:52:11 -0700 (PDT) Received: by mail-yw0-x22d.google.com with SMTP id t192so122920058ywf.0 for ; Mon, 17 Oct 2016 10:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:references:in-reply-to:mime-version:thread-index:date :message-id:subject:to:cc; bh=9WxTH4DfNeLzC3/wJqMrx9qoy+m5IbBKnQuAh2yVWJk=; b=gEPiOXe5BKJhj/Yw4EmdDDc2/7jUVmh7SWojXPxPxKr6VTJ0azyWoK8NF/ALcftN7R i/1woQAer0k94Yo7otKySuE8tyTzk4h6TKC9ANw/f5sqQ9s3zcQ32SIG0ysZFl+jv6Z/ j2As/umXxiC8j2sclkJrkUVxTDDEIwDZEbTCg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc; bh=9WxTH4DfNeLzC3/wJqMrx9qoy+m5IbBKnQuAh2yVWJk=; b=Kn/gy3CyRB/9tjZBZJF+KcQvo3DdCj6fLuHv3rnz4TR1UxR8IWqDeib95KE+OjULr7 gVwnLMsr0hAqSgAhyeJJ1VhIH41hMHxHrZM+LnAev9Xb1L6cQ/5sKvM0bNzkCbTAjiYb rhc4OsG6C9VPTutvru9jeY9dl+fpe4dO20Dibmvul59FbCHdpDgnnETIQpwIylNOzuz1 glP7PqFGORPgI6q1Ngs8W778ND+Dchdz2da+p/TYFcpS8EuIGIPwk+u/wMCLUG5vpST6 zTDIwEUPdAx0Cg2ALfivHtq/U4Ki/RVAAfRGSuYulssWmWpd4+uY+2Hb0zbwB7FCr39F WuMg== X-Gm-Message-State: AA6/9Rk5YFC7C8lddp50z/v76F/lRUgd0D+BJnL2rmCzxAPheNHooajmItMDislf3Xo3uBC4y6tJdQsO5FCI0Vfv X-Received: by 10.13.214.86 with SMTP id y83mr25922985ywd.93.1476726729999; Mon, 17 Oct 2016 10:52:09 -0700 (PDT) From: Vladimir Olovyannikov References: <1476595420-12566-1-git-send-email-vladimir.olovyannikov@broadcom.com> <40b80588-1bb4-e5f2-439c-97a405c873d3@redhat.com> In-Reply-To: MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQER8uOXAe1T3m2dQCB9BI96nx1WVQI0U20WAsr2fFcB2sPwFgJQQiVlAZQGnGeh12LNAA== Date: Mon, 17 Oct 2016 10:52:08 -0700 Message-ID: <1e599793ddedca50db54fb22b429cf53@mail.gmail.com> To: Michael Zimmermann Cc: Laszlo Ersek , Jaben Carsey , "Ni, Ruiyu" , "edk2-devel@lists.01.org" X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: [PATCH] GPT Shell Application/Library 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: Mon, 17 Oct 2016 17:52:11 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Michael, I am absolutely agree with your proposal. In the gpt Shell library/application I had to =E2=80=9Cborrow=E2=80=9D some= stuff from PartitionDxe.c to not reinvent a wheel. If the PartitionDxe maintainer agrees to have a separate library available for everybody, I would move all the GPT-related stuff from the GptWorker (and partially from the PartitionDxe itself) to that independent library. This could be a longer-term task. Right now I just wanted to share the tool which could be useful for anybody who would wish to manage GPT partitions (and/or do a FAT32 format of either a disk or a GPT partition) from within the Shell. What do you think? Thank you, Vladimir *From:* Michael Zimmermann [mailto:sigmaepsilon92@gmail.com] *Sent:* October-17-16 12:25 AM *To:* Vladimir Olovyannikov *Cc:* Laszlo Ersek; Jaben Carsey; Ni, Ruiyu; edk2-devel@lists.01.org *Subject:* Re: [edk2] [PATCH] GPT Shell Application/Library Hi, wouldn't it be better to make a generic gpt parsing library which is independent of the shell so both the shell and PartitionDxe can use it? It may also be useful for other applications which need additional information like the gpt partition names. Thanks Michael On Mon, Oct 17, 2016 at 8:49 AM, Vladimir Olovyannikov < vladimir.olovyannikov@broadcom.com> wrote: Thank you Laszlo, Sorry, I missed the fields; it is my first contribution, I will add the required lines, review the source according to your comments and will resubmit the patch. So do you think the command should be _gpt instead of gpt? I was following TFTP and SF commands as a template. Thank you, Vladimir On Oct 16, 2016 1:05 PM, "Laszlo Ersek" wrote: > > On 10/16/16 07:23, Vladimir Olovyannikov wrote: > > This allows managing (create, delete, modify, fat format) of GPT > > partitions from within UEFI Shell. > > Syntax: > > gpt [device_mapped_name] [parameters...] > > See usage examples in the .uni file > > --- > > .../Library/UefiShellGptCommandLib/FatFormat.c | 611 +++++++ > > .../Library/UefiShellGptCommandLib/FatFormat.h | 111 ++ > > .../Library/UefiShellGptCommandLib/GptWorker.c | 1902 ++++++++++++++++++++ > > .../Library/UefiShellGptCommandLib/GptWorker.h | 186 ++ > > .../UefiShellGptCommandLib.c | 1135 ++++++++++++ > > .../UefiShellGptCommandLib.inf | 79 + > > .../UefiShellGptCommandLib.uni | 117 ++ > > ShellPkg/ShellPkg.dec | 1 + > > ShellPkg/ShellPkg.dsc | 4 + > > 9 files changed, 4146 insertions(+) > > create mode 100644 ShellPkg/Library/UefiShellGptCommandLib/FatFormat.c > > create mode 100644 ShellPkg/Library/UefiShellGptCommandLib/FatFormat.h > > create mode 100644 ShellPkg/Library/UefiShellGptCommandLib/GptWorker.c > > create mode 100644 ShellPkg/Library/UefiShellGptCommandLib/GptWorker.h > > create mode 100644 ShellPkg/Library/UefiShellGptCommandLib/UefiShellGptCommandLib.c > > create mode 100644 ShellPkg/Library/UefiShellGptCommandLib/UefiShellGptCommandLib.inf > > create mode 100644 ShellPkg/Library/UefiShellGptCommandLib/UefiShellGptCommandLib.uni > > This looks like a supremely welcome, long-awaited addition (latest > request: > ), > but it really needs your Signed-off-by, and the Contributed-under line > above it: > > ShellPkg/Contributions.txt > > I would also suggest (simply based on what I've seen elsewhere in edk2) > to keep the copyright notices tightly collected in the file headings. > > Someone will have to go over all the licenses too -- does the "Marvell > BSD License Option" for example correspond to the 3-clause BSDL? > > On the technical side, I believe that as long as a shell command (or a > command option) is not standardized (in the shell spec), it usually > starts with an underscore (_), so as to prevent future name collisions. > (I could be wrong about this -- I now recall the TFTP command, which is > also not in the 2.2 spec.) > > Just my two cents. > > Thanks > Laszlo _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel