<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/FmpDevicePkg/Include/Library/FmpDeviceLib.h, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-02-23T21:01:28+00:00</updated>
<entry>
<title>FmpDevicePkg: Replace include guards with #pragma once</title>
<updated>2026-02-23T21:01:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-03T18:28:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=58ace50a43097df8408d41aec81e4b47a5a79cfc'/>
<id>urn:sha1:58ace50a43097df8408d41aec81e4b47a5a79cfc</id>
<content type='text'>
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.

`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.

Compared to macro-based include guards, `#pragma once`:

- Eliminates the risk of macro name collisions or copy/paste errors
  where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
  (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
  file entirely, rather than re-reading it to find the matching
  `#endif` ("multiple-include optimization").
  - Note that some compilers may already optimize traditional include
    guards, by recognzining the idiomatic pattern.

This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.

However, this is considered acceptable given:

1. edk2 already defines a subset of supported compilers in
   BaseTools/Conf/tools_def.template, all of which have supported
   `#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
   include guard naming and potential macro collisions.

Approximate compiler support dates:

- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
  (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>FmpDevicePkg/FmpDxe: Update FmpDeviceCheckImageWithStatus() handling</title>
<updated>2022-01-20T01:41:06+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2022-01-04T20:38:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=772c5bb8dcb9841f1839dec02f33324e31b36d25'/>
<id>urn:sha1:772c5bb8dcb9841f1839dec02f33324e31b36d25</id>
<content type='text'>
Update the logic handling last attempt status codes from
FmpDeviceCheckImageWithStatus() implementations to account for
cases when the function return status code is EFI_SUCCESS
(since the image was checked successfully) but the ImageUpdatable
value is not valid.

In addition the following sentence is removed from the
LastAttemptStatus parameter definition for
FmpDeviceCheckImageWithStatus() since it can lead to confusion.
The expected status code value range is sufficient to implement
the library API.

  "This value will only be checked when this
   function returns an error."

Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Guomin Jiang &lt;guomin.jiang@intel.com&gt;
Cc: Wei6 Xu &lt;wei6.xu@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Guomin Jiang &lt;guomin.jiang@intel.com&gt;
</content>
</entry>
<entry>
<title>FmpDevicePkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:53:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=45ce0a67bb4ee80f27da93777c623f51f344f23b'/>
<id>urn:sha1:45ce0a67bb4ee80f27da93777c623f51f344f23b</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the FmpDevicePkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>FmpDevicePkg: Change OPTIONAL keyword usage style</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2021-12-03T02:00:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9c721071d30e69fd47f583cde370c3954cba974d'/>
<id>urn:sha1:9c721071d30e69fd47f583cde370c3954cba974d</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760

Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>FmpDevicePkg/FmpDeviceLib: Add Last Attempt Status to Check/Set API</title>
<updated>2020-10-28T06:05:52+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2020-10-19T23:59:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6ad819c1abe3c49b9648769f5111eca491c0add3'/>
<id>urn:sha1:6ad819c1abe3c49b9648769f5111eca491c0add3</id>
<content type='text'>
Provides the ability for a given FMP device library instance to
return a Last Attempt Status code during check image and set image
operations with FmpDeviceCheckImageEx() and FmpDeviceSetImageEx().

Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Guomin Jiang &lt;guomin.jiang@intel.com&gt;
Cc: Wei6 Xu &lt;wei6.xu@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Acked-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Reviewed-by: Wei6 Xu &lt;wei6.xu@intel.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>FmpDevicePkg: Fix spelling errors</title>
<updated>2019-10-23T15:08:08+00:00</updated>
<author>
<name>Sean Brogan</name>
<email>sean.brogan@microsoft.com</email>
</author>
<published>2019-10-09T04:38:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=95d2883647dd8bf91f65cde87e73cede1dcc6574'/>
<id>urn:sha1:95d2883647dd8bf91f65cde87e73cede1dcc6574</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=2262

Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Philippe Mathieu-Daude &lt;philmd@redhat.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>FmpDevicePkg: Add APIs to FmpDeviceLib</title>
<updated>2019-08-14T04:29:28+00:00</updated>
<author>
<name>Eric Jin</name>
<email>eric.jin@intel.com</email>
</author>
<published>2019-08-11T02:55:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=8d01f2f4d618d81ba5f1b9351a4554e1c6e9682f'/>
<id>urn:sha1:8d01f2f4d618d81ba5f1b9351a4554e1c6e9682f</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1525
Add new APIs to FmpDevideLib to support multiple controllers
* RegisterFmpUninstaller()
* FmpDeviceSetContext()
* FmpDeviceGetHardwareInstance()

Cc: Sean Brogan &lt;sean.brogan@microsoft.com&gt;
Cc: Bret Barkelew &lt;Bret.Barkelew@microsoft.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Eric Jin &lt;eric.jin@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>FmpDevicePkg: Fix various typos</title>
<updated>2019-07-12T13:09:36+00:00</updated>
<author>
<name>Antoine Cœur</name>
<email>coeur@gmx.fr</email>
</author>
<published>2019-07-11T07:42:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=43622317c67f031f9b2e33c3320f2c89484bd506'/>
<id>urn:sha1:43622317c67f031f9b2e33c3320f2c89484bd506</id>
<content type='text'>
Fix one typo in FmpDevicePkg.

Signed-off-by: Cœur &lt;coeur@gmx.fr&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>FmpDevicePkg: Replace BSD License with BSD+Patent License</title>
<updated>2019-04-09T17:58:00+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2019-04-03T23:03:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=bcef758cbac5f3e136e7ec458e3690e615591ca0'/>
<id>urn:sha1:bcef758cbac5f3e136e7ec458e3690e615591ca0</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>FmpDevicePkg: Fix code style issue</title>
<updated>2018-08-02T21:46:19+00:00</updated>
<author>
<name>Star Zeng</name>
<email>star.zeng@intel.com</email>
</author>
<published>2018-07-30T09:47:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=a6d73269b134116cfb84830d81f5ac2a389eb91b'/>
<id>urn:sha1:a6d73269b134116cfb84830d81f5ac2a389eb91b</id>
<content type='text'>
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng &lt;star.zeng@intel.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
</feed>
