From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 1A18B21A1098E for ; Sun, 26 Nov 2017 16:53:51 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Nov 2017 16:58:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,461,1505804400"; d="scan'208";a="12243953" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.15]) by orsmga002.jf.intel.com with ESMTP; 26 Nov 2017 16:58:12 -0800 From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Mon, 27 Nov 2017 08:58:07 +0800 Message-Id: <20171127005810.274328-1-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.15.0.gvfs.1.preview.4 Subject: [PATCH 0/3] Convert from NULL class library to Dynamic Command 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: , X-List-Received-Date: Mon, 27 Nov 2017 00:53:52 -0000 UEFI Shell spec defines Shell Dynamic Command protocol which is just for the purpose to extend internal command. So tftp and dp are changed from NULL class library to be drivers producing DynamicCommand protocol. The guideline is: 1. Only use NULL class library for Shell spec defined commands. 2. New commands can be provided as not only a standalone application but also a dynamic command. So it can be used either as an internal command, but also as a standalone application. Ruiyu Ni (3): ShellPkg/ShellLib: Constructor doesn't depend on ShellParameters ShellPkg/tftp: Convert from NULL class library to Dynamic Command ShellPkg/dp: Convert from NULL class library to Dynamic Command .../DpDynamicCommand}/Dp.c | 100 +++++++---- .../DpDynamicCommand}/Dp.h | 63 ++++++- .../DpDynamicCommand/Dp.uni} | 0 ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.c | 53 ++++++ ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf | 73 +++++++++ .../DpDynamicCommand/DpDynamicCommand.c | 130 +++++++++++++++ .../DpDynamicCommand/DpDynamicCommand.inf | 78 +++++++++ .../DpDynamicCommand}/DpInternal.h | 2 +- .../DpDynamicCommand}/DpProfile.c | 34 ++-- .../DpDynamicCommand}/DpTrace.c | 182 ++++++++++----------- .../DpDynamicCommand}/DpUtilities.c | 44 +++-- .../DpDynamicCommand}/Literals.c | 0 .../DpDynamicCommand}/Literals.h | 0 .../DpDynamicCommand}/PerformanceTokens.h | 0 .../TftpDynamicCommand}/Tftp.c | 91 ++++++++--- .../TftpDynamicCommand/Tftp.h} | 40 +++-- .../TftpDynamicCommand/Tftp.uni} | 0 .../DynamicCommand/TftpDynamicCommand/TftpApp.c | 54 ++++++ .../TftpDynamicCommand/TftpApp.inf} | 34 ++-- .../TftpDynamicCommand/TftpDynamicCommand.c | 131 +++++++++++++++ .../TftpDynamicCommand/TftpDynamicCommand.inf} | 39 +++-- ShellPkg/Library/UefiDpLib/Readme.txt | 2 - ShellPkg/Library/UefiDpLib/UefiDpLib.c | 101 ------------ ShellPkg/Library/UefiDpLib/UefiDpLib.h | 64 -------- ShellPkg/Library/UefiDpLib/UefiDpLib.inf | 77 --------- ShellPkg/Library/UefiShellLib/UefiShellLib.c | 12 +- .../UefiShellTftpCommandLib.c | 97 ----------- ShellPkg/ShellPkg.dsc | 20 ++- 28 files changed, 936 insertions(+), 585 deletions(-) rename ShellPkg/{Library/UefiDpLib => DynamicCommand/DpDynamicCommand}/Dp.c (84%) rename ShellPkg/{Library/UefiDpLib => DynamicCommand/DpDynamicCommand}/Dp.h (70%) rename ShellPkg/{Library/UefiDpLib/UefiDpLib.uni => DynamicCommand/DpDynamicCommand/Dp.uni} (100%) create mode 100644 ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.c create mode 100644 ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.inf create mode 100644 ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.c create mode 100644 ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf rename ShellPkg/{Library/UefiDpLib => DynamicCommand/DpDynamicCommand}/DpInternal.h (96%) rename ShellPkg/{Library/UefiDpLib => DynamicCommand/DpDynamicCommand}/DpProfile.c (87%) rename ShellPkg/{Library/UefiDpLib => DynamicCommand/DpDynamicCommand}/DpTrace.c (89%) rename ShellPkg/{Library/UefiDpLib => DynamicCommand/DpDynamicCommand}/DpUtilities.c (87%) rename ShellPkg/{Library/UefiDpLib => DynamicCommand/DpDynamicCommand}/Literals.c (100%) rename ShellPkg/{Library/UefiDpLib => DynamicCommand/DpDynamicCommand}/Literals.h (100%) rename ShellPkg/{Library/UefiDpLib => DynamicCommand/DpDynamicCommand}/PerformanceTokens.h (100%) rename ShellPkg/{Library/UefiShellTftpCommandLib => DynamicCommand/TftpDynamicCommand}/Tftp.c (91%) mode change 100755 => 100644 rename ShellPkg/{Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.h => DynamicCommand/TftpDynamicCommand/Tftp.h} (56%) rename ShellPkg/{Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.uni => DynamicCommand/TftpDynamicCommand/Tftp.uni} (100%) create mode 100644 ShellPkg/DynamicCommand/TftpDynamicCommand/TftpApp.c copy ShellPkg/{Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf => DynamicCommand/TftpDynamicCommand/TftpApp.inf} (59%) create mode 100644 ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.c rename ShellPkg/{Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf => DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf} (55%) delete mode 100644 ShellPkg/Library/UefiDpLib/Readme.txt delete mode 100644 ShellPkg/Library/UefiDpLib/UefiDpLib.c delete mode 100644 ShellPkg/Library/UefiDpLib/UefiDpLib.h delete mode 100644 ShellPkg/Library/UefiDpLib/UefiDpLib.inf delete mode 100644 ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.c -- 2.15.0.gvfs.1.preview.4