Patrick Venture | 7dad86f | 2019-05-17 08:52:20 -0700 | [diff] [blame] | 1 | #pragma once |
William A. Kennington III | 4857ab4 | 2021-01-21 03:14:08 -0800 | [diff] [blame] | 2 | #include <utility> |
Patrick Venture | 7dad86f | 2019-05-17 08:52:20 -0700 | [diff] [blame] | 3 | |
Patrick Venture | 1d5a31c | 2019-05-20 11:38:22 -0700 | [diff] [blame] | 4 | namespace ipmi_flash |
Patrick Venture | 7dad86f | 2019-05-17 08:52:20 -0700 | [diff] [blame] | 5 | { |
| 6 | |
Patrick Venture | ede9c9f | 2020-09-30 13:49:19 -0700 | [diff] [blame] | 7 | inline constexpr char biosBlobId[] = "/flash/bios"; |
| 8 | inline constexpr char updateBlobId[] = "/flash/update"; |
| 9 | inline constexpr char verifyBlobId[] = "/flash/verify"; |
| 10 | inline constexpr char hashBlobId[] = "/flash/hash"; |
| 11 | inline constexpr char activeImageBlobId[] = "/flash/active/image"; |
| 12 | inline constexpr char activeHashBlobId[] = "/flash/active/hash"; |
| 13 | inline constexpr char staticLayoutBlobId[] = "/flash/image"; |
| 14 | inline constexpr char ubiTarballBlobId[] = "/flash/tarball"; |
| 15 | inline constexpr char cleanupBlobId[] = "/flash/cleanup"; |
Jie Yang | 328f520 | 2021-03-16 00:52:07 -0700 | [diff] [blame^] | 16 | inline constexpr char biosVersionBlobId[] = "/version/bios"; |
Patrick Venture | 7dad86f | 2019-05-17 08:52:20 -0700 | [diff] [blame] | 17 | |
William A. Kennington III | b45eb5e | 2020-12-23 11:47:05 -0800 | [diff] [blame] | 18 | /** @brief Lightweight class wrapper that removes move operations from a class |
| 19 | * in order to guarantee the contents stay pinned to a specific location |
| 20 | * in memory. |
| 21 | */ |
| 22 | template <typename T> |
| 23 | struct Pinned : public T |
| 24 | { |
| 25 | template <typename... Args> |
| 26 | Pinned(Args&&... args) : T(std::forward<Args>(args)...) |
| 27 | {} |
| 28 | template <typename Arg> |
| 29 | Pinned& operator=(const Arg& o) |
| 30 | { |
| 31 | *static_cast<T*>(this) = o; |
| 32 | return *this; |
| 33 | } |
| 34 | |
| 35 | Pinned(Pinned&&) = delete; |
| 36 | Pinned& operator=(Pinned&&) = delete; |
| 37 | }; |
| 38 | |
Patrick Venture | 1d5a31c | 2019-05-20 11:38:22 -0700 | [diff] [blame] | 39 | } // namespace ipmi_flash |