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