blob: 26067b5da90e2eec511365ad7aaf7c289e9a3098 [file] [log] [blame]
Patrick Venture7dad86f2019-05-17 08:52:20 -07001#pragma once
2
Patrick Venture1d5a31c2019-05-20 11:38:22 -07003namespace ipmi_flash
Patrick Venture7dad86f2019-05-17 08:52:20 -07004{
5
Patrick Ventureede9c9f2020-09-30 13:49:19 -07006inline constexpr char biosBlobId[] = "/flash/bios";
7inline constexpr char updateBlobId[] = "/flash/update";
8inline constexpr char verifyBlobId[] = "/flash/verify";
9inline constexpr char hashBlobId[] = "/flash/hash";
10inline constexpr char activeImageBlobId[] = "/flash/active/image";
11inline constexpr char activeHashBlobId[] = "/flash/active/hash";
12inline constexpr char staticLayoutBlobId[] = "/flash/image";
13inline constexpr char ubiTarballBlobId[] = "/flash/tarball";
14inline constexpr char cleanupBlobId[] = "/flash/cleanup";
Patrick Venture7dad86f2019-05-17 08:52:20 -070015
William A. Kennington IIIb45eb5e2020-12-23 11:47:05 -080016/** @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 */
20template <typename T>
21struct 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 Venture1d5a31c2019-05-20 11:38:22 -070037} // namespace ipmi_flash