1 #pragma once 2 3 namespace ipmi_flash 4 { 5 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"; 15 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 37 } // namespace ipmi_flash 38