1 #pragma once 2 #include <utility> 3 4 namespace ipmi_flash 5 { 6 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"; 16 inline constexpr char biosVersionBlobId[] = "/version/bios"; 17 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> Pinnedipmi_flash::Pinned26 Pinned(Args&&... args) : T(std::forward<Args>(args)...) 27 {} 28 template <typename Arg> operator =ipmi_flash::Pinned29 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 39 } // namespace ipmi_flash 40