Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Matt Spinler | a34ab72 | 2019-12-16 10:39:32 -0600 | [diff] [blame] | 3 | #include "config.h" |
| 4 | |
Matt Spinler | c8705e2 | 2019-09-11 12:36:07 -0500 | [diff] [blame] | 5 | #include "data_interface.hpp" |
Matt Spinler | f682b40 | 2019-12-18 13:48:08 -0600 | [diff] [blame] | 6 | #include "event_logger.hpp" |
Matt Spinler | f60ac27 | 2019-12-11 13:47:50 -0600 | [diff] [blame] | 7 | #include "host_notifier.hpp" |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 8 | #include "log_manager.hpp" |
Matt Spinler | 89fa082 | 2019-07-17 13:54:30 -0500 | [diff] [blame] | 9 | #include "paths.hpp" |
Matt Spinler | 56ad2a0 | 2020-03-26 14:00:52 -0500 | [diff] [blame] | 10 | #include "pel.hpp" |
Matt Spinler | 367144c | 2019-09-19 15:33:52 -0500 | [diff] [blame] | 11 | #include "registry.hpp" |
Matt Spinler | 89fa082 | 2019-07-17 13:54:30 -0500 | [diff] [blame] | 12 | #include "repository.hpp" |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 13 | |
Matt Spinler | a34ab72 | 2019-12-16 10:39:32 -0600 | [diff] [blame] | 14 | #include <org/open_power/Logging/PEL/server.hpp> |
| 15 | #include <sdbusplus/server.hpp> |
Matt Spinler | 6b1a5c8 | 2020-01-07 08:48:53 -0600 | [diff] [blame] | 16 | #include <sdeventplus/event.hpp> |
| 17 | #include <sdeventplus/source/event.hpp> |
Matt Spinler | 44893cc | 2020-08-26 11:34:17 -0500 | [diff] [blame] | 18 | #include <xyz/openbmc_project/Logging/Create/server.hpp> |
Matt Spinler | a34ab72 | 2019-12-16 10:39:32 -0600 | [diff] [blame] | 19 | |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 20 | namespace openpower |
| 21 | { |
| 22 | namespace pels |
| 23 | { |
| 24 | |
Matt Spinler | a34ab72 | 2019-12-16 10:39:32 -0600 | [diff] [blame] | 25 | using PELInterface = sdbusplus::server::object::object< |
| 26 | sdbusplus::org::open_power::Logging::server::PEL>; |
| 27 | |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 28 | /** |
| 29 | * @brief PEL manager object |
| 30 | */ |
Matt Spinler | a34ab72 | 2019-12-16 10:39:32 -0600 | [diff] [blame] | 31 | class Manager : public PELInterface |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 32 | { |
| 33 | public: |
| 34 | Manager() = delete; |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 35 | Manager(const Manager&) = default; |
| 36 | Manager& operator=(const Manager&) = default; |
| 37 | Manager(Manager&&) = default; |
| 38 | Manager& operator=(Manager&&) = default; |
| 39 | |
| 40 | /** |
| 41 | * @brief constructor |
| 42 | * |
| 43 | * @param[in] logManager - internal::Manager object |
Matt Spinler | f60ac27 | 2019-12-11 13:47:50 -0600 | [diff] [blame] | 44 | * @param[in] dataIface - The data interface object |
Matt Spinler | f682b40 | 2019-12-18 13:48:08 -0600 | [diff] [blame] | 45 | * @param[in] creatorFunc - The function that EventLogger will |
| 46 | * use for creating event logs |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 47 | */ |
Matt Spinler | f60ac27 | 2019-12-11 13:47:50 -0600 | [diff] [blame] | 48 | Manager(phosphor::logging::internal::Manager& logManager, |
Matt Spinler | f682b40 | 2019-12-18 13:48:08 -0600 | [diff] [blame] | 49 | std::unique_ptr<DataInterfaceBase> dataIface, |
| 50 | EventLogger::LogFunction creatorFunc) : |
Matt Spinler | a34ab72 | 2019-12-16 10:39:32 -0600 | [diff] [blame] | 51 | PELInterface(logManager.getBus(), OBJ_LOGGING), |
Matt Spinler | 104e936 | 2020-04-02 09:34:41 -0500 | [diff] [blame] | 52 | _logManager(logManager), _eventLogger(std::move(creatorFunc)), |
Matt Spinler | f682b40 | 2019-12-18 13:48:08 -0600 | [diff] [blame] | 53 | _repo(getPELRepoPath()), |
Matt Spinler | 0d804ef | 2020-05-12 16:16:26 -0500 | [diff] [blame] | 54 | _registry(getPELReadOnlyDataPath() / message::registryFileName), |
Matt Spinler | ff9cec2 | 2020-07-15 13:06:35 -0500 | [diff] [blame] | 55 | _event(sdeventplus::Event::get_default()), |
Matt Spinler | 367144c | 2019-09-19 15:33:52 -0500 | [diff] [blame] | 56 | _dataIface(std::move(dataIface)) |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 57 | { |
Matt Spinler | ff9cec2 | 2020-07-15 13:06:35 -0500 | [diff] [blame] | 58 | setupPELDeleteWatch(); |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | /** |
Matt Spinler | f60ac27 | 2019-12-11 13:47:50 -0600 | [diff] [blame] | 62 | * @brief constructor that enables host notification |
| 63 | * |
| 64 | * @param[in] logManager - internal::Manager object |
| 65 | * @param[in] dataIface - The data interface object |
Matt Spinler | f682b40 | 2019-12-18 13:48:08 -0600 | [diff] [blame] | 66 | * @param[in] creatorFunc - The function that EventLogger will |
| 67 | * use for creating event logs |
Matt Spinler | f60ac27 | 2019-12-11 13:47:50 -0600 | [diff] [blame] | 68 | * @param[in] hostIface - The hostInterface object |
| 69 | */ |
| 70 | Manager(phosphor::logging::internal::Manager& logManager, |
| 71 | std::unique_ptr<DataInterfaceBase> dataIface, |
Matt Spinler | f682b40 | 2019-12-18 13:48:08 -0600 | [diff] [blame] | 72 | EventLogger::LogFunction creatorFunc, |
Matt Spinler | f60ac27 | 2019-12-11 13:47:50 -0600 | [diff] [blame] | 73 | std::unique_ptr<HostInterface> hostIface) : |
Matt Spinler | f682b40 | 2019-12-18 13:48:08 -0600 | [diff] [blame] | 74 | Manager(logManager, std::move(dataIface), std::move(creatorFunc)) |
Matt Spinler | f60ac27 | 2019-12-11 13:47:50 -0600 | [diff] [blame] | 75 | { |
| 76 | _hostNotifier = std::make_unique<HostNotifier>( |
| 77 | _repo, *(_dataIface.get()), std::move(hostIface)); |
| 78 | } |
| 79 | |
| 80 | /** |
Matt Spinler | ff9cec2 | 2020-07-15 13:06:35 -0500 | [diff] [blame] | 81 | * @brief Destructor |
| 82 | */ |
| 83 | ~Manager(); |
| 84 | |
| 85 | /** |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 86 | * @brief Creates a PEL based on the OpenBMC event log contents. If |
| 87 | * a PEL was passed in via the RAWPEL specifier in the |
| 88 | * additionalData parameter, use that instead. |
| 89 | * |
| 90 | * @param[in] message - the event log message property |
| 91 | * @param[in] obmcLogID - the corresponding OpenBMC event log id |
| 92 | * @param[in] timestamp - the Timestamp property |
| 93 | * @param[in] severity - the event log severity |
| 94 | * @param[in] additionalData - the AdditionalData property |
| 95 | * @param[in] associations - the Associations property |
Matt Spinler | 56ad2a0 | 2020-03-26 14:00:52 -0500 | [diff] [blame] | 96 | * @param[in] ffdc - A vector of FFDC file information |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 97 | */ |
| 98 | void create(const std::string& message, uint32_t obmcLogID, |
Matt Spinler | 367144c | 2019-09-19 15:33:52 -0500 | [diff] [blame] | 99 | uint64_t timestamp, phosphor::logging::Entry::Level severity, |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 100 | const std::vector<std::string>& additionalData, |
Matt Spinler | 56ad2a0 | 2020-03-26 14:00:52 -0500 | [diff] [blame] | 101 | const std::vector<std::string>& associations, |
| 102 | const phosphor::logging::FFDCEntries& ffdc = |
| 103 | phosphor::logging::FFDCEntries{}); |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 104 | |
| 105 | /** |
| 106 | * @brief Erase a PEL based on its OpenBMC event log ID |
| 107 | * |
| 108 | * @param[in] obmcLogID - the corresponding OpenBMC event log id |
| 109 | */ |
| 110 | void erase(uint32_t obmcLogID); |
| 111 | |
| 112 | /** @brief Says if an OpenBMC event log may not be manually deleted at this |
| 113 | * time because its corresponding PEL cannot be. |
| 114 | * |
| 115 | * There are PEL retention policies that can prohibit the manual deletion |
| 116 | * of PELs (and therefore OpenBMC event logs). |
| 117 | * |
| 118 | * @param[in] obmcLogID - the OpenBMC event log ID |
| 119 | * @return bool - true if prohibited |
| 120 | */ |
| 121 | bool isDeleteProhibited(uint32_t obmcLogID); |
| 122 | |
Matt Spinler | a34ab72 | 2019-12-16 10:39:32 -0600 | [diff] [blame] | 123 | /** |
| 124 | * @brief Return a file descriptor to the raw PEL data |
| 125 | * |
| 126 | * Throws InvalidArgument if the PEL ID isn't found, |
| 127 | * and InternalFailure if anything else fails. |
| 128 | * |
| 129 | * @param[in] pelID - The PEL ID to get the data for |
| 130 | * |
| 131 | * @return unix_fd - File descriptor to the file that contains the PEL |
| 132 | */ |
| 133 | sdbusplus::message::unix_fd getPEL(uint32_t pelID) override; |
| 134 | |
| 135 | /** |
| 136 | * @brief Returns data for the PEL corresponding to an OpenBMC |
| 137 | * event log. |
| 138 | * |
| 139 | * @param[in] obmcLogID - The OpenBMC event log ID |
| 140 | * |
| 141 | * @return vector<uint8_t> - The raw PEL data |
| 142 | */ |
| 143 | std::vector<uint8_t> getPELFromOBMCID(uint32_t obmcLogID) override; |
| 144 | |
| 145 | /** |
| 146 | * @brief The D-Bus method called when a host successfully processes |
| 147 | * a PEL. |
| 148 | * |
| 149 | * This D-Bus method is called from the PLDM daemon when they get an |
| 150 | * 'Ack PEL' PLDM message from the host, which indicates the host |
| 151 | * firmware successfully sent it to the OS and this code doesn't need |
| 152 | * to send it to the host again. |
| 153 | * |
| 154 | * @param[in] pelID - The PEL ID |
| 155 | */ |
| 156 | void hostAck(uint32_t pelID) override; |
| 157 | |
| 158 | /** |
| 159 | * @brief D-Bus method called when the host rejects a PEL. |
| 160 | * |
| 161 | * This D-Bus method is called from the PLDM daemon when they get an |
| 162 | * 'Ack PEL' PLDM message from the host with a payload that says |
| 163 | * something when wrong. |
| 164 | * |
| 165 | * The choices are either: |
| 166 | * * Host Full - The host's staging area is full - try again later |
| 167 | * * Malrformed PEL - The host received an invalid PEL |
| 168 | * |
| 169 | * @param[in] pelID - The PEL ID |
| 170 | * @param[in] reason - One of the above two reasons |
| 171 | */ |
| 172 | void hostReject(uint32_t pelID, RejectionReason reason) override; |
| 173 | |
Matt Spinler | 44893cc | 2020-08-26 11:34:17 -0500 | [diff] [blame] | 174 | /** |
| 175 | * @brief D-Bus method to create a PEL/OpenBMC event log and |
| 176 | * return the created OpenBMC and PEL log IDs. |
| 177 | * |
| 178 | * The same as the CreateWithFFDCFiles method on the |
| 179 | * xyz.openbmc_project.Logging.Create interface, except for |
| 180 | * the return values. |
| 181 | * |
| 182 | * @param[in] message - The event log message property |
| 183 | * @param[in] severity - The event log severity |
| 184 | * @param[in] additionalData - The AdditionalData property |
| 185 | * @param[in] ffdc - A vector of FFDC file information |
| 186 | */ |
Matt Spinler | 9cc3007 | 2020-09-16 15:39:34 -0500 | [diff] [blame] | 187 | std::tuple<uint32_t, uint32_t> createPELWithFFDCFiles( |
| 188 | std::string message, phosphor::logging::Entry::Level severity, |
| 189 | std::map<std::string, std::string> additionalData, |
| 190 | std::vector<std::tuple<sdbusplus::xyz::openbmc_project::Logging:: |
| 191 | server::Create::FFDCFormat, |
| 192 | uint8_t, uint8_t, sdbusplus::message::unix_fd>> |
Matt Spinler | 44893cc | 2020-08-26 11:34:17 -0500 | [diff] [blame] | 193 | fFDC) override; |
Matt Spinler | 9cc3007 | 2020-09-16 15:39:34 -0500 | [diff] [blame] | 194 | |
Matt Spinler | 19e7290 | 2020-01-24 11:05:20 -0600 | [diff] [blame] | 195 | /** |
| 196 | * @brief Converts the ESEL field in an OpenBMC event log to a |
| 197 | * vector of uint8_ts that just contains the PEL data. |
| 198 | * |
| 199 | * That data string looks like: "50 48 00 ab ..." |
| 200 | * |
| 201 | * Throws an exception on any failures. |
| 202 | * |
| 203 | * @param[in] esel - The ESEL string |
| 204 | * |
| 205 | * @return std::vector<uint8_t> - The contained PEL data |
| 206 | */ |
| 207 | static std::vector<uint8_t> eselToRawData(const std::string& esel); |
| 208 | |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 209 | private: |
| 210 | /** |
| 211 | * @brief Adds a received raw PEL to the PEL repository |
| 212 | * |
| 213 | * @param[in] rawPelPath - The path to the file that contains the |
| 214 | * raw PEL. |
| 215 | * @param[in] obmcLogID - the corresponding OpenBMC event log id |
| 216 | */ |
| 217 | void addRawPEL(const std::string& rawPelPath, uint32_t obmcLogID); |
| 218 | |
| 219 | /** |
| 220 | * @brief Creates a PEL based on the OpenBMC event log contents. |
| 221 | * |
| 222 | * @param[in] message - The event log message property |
| 223 | * @param[in] obmcLogID - the corresponding OpenBMC event log id |
| 224 | * @param[in] timestamp - The timestamp property |
| 225 | * @param[in] severity - The event log severity |
| 226 | * @param[in] additionalData - The AdditionalData property |
| 227 | * @param[in] associations - The associations property |
Matt Spinler | 56ad2a0 | 2020-03-26 14:00:52 -0500 | [diff] [blame] | 228 | * @param[in] ffdc - A vector of FFDC file information |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 229 | */ |
| 230 | void createPEL(const std::string& message, uint32_t obmcLogID, |
Matt Spinler | 367144c | 2019-09-19 15:33:52 -0500 | [diff] [blame] | 231 | uint64_t timestamp, phosphor::logging::Entry::Level severity, |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 232 | const std::vector<std::string>& additionalData, |
Matt Spinler | 56ad2a0 | 2020-03-26 14:00:52 -0500 | [diff] [blame] | 233 | const std::vector<std::string>& associations, |
| 234 | const phosphor::logging::FFDCEntries& ffdc); |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 235 | |
| 236 | /** |
Matt Spinler | 6b1a5c8 | 2020-01-07 08:48:53 -0600 | [diff] [blame] | 237 | * @brief Schedules a close of the file descriptor to occur from |
| 238 | * the event loop. |
| 239 | * |
| 240 | * Uses sd_event_add_defer |
| 241 | * |
| 242 | * @param[in] fd - The file descriptor to close |
| 243 | */ |
| 244 | void scheduleFDClose(int fd); |
| 245 | |
| 246 | /** |
| 247 | * @brief Closes the file descriptor passed in. |
| 248 | * |
| 249 | * This is called from the event loop to close FDs returned |
| 250 | * from getPEL(). |
| 251 | * |
| 252 | * @param[in] fd - The file descriptor to close |
| 253 | * @param[in] source - The event source object used |
| 254 | */ |
| 255 | void closeFD(int fd, sdeventplus::source::EventBase& source); |
| 256 | |
| 257 | /** |
Matt Spinler | 19e7290 | 2020-01-24 11:05:20 -0600 | [diff] [blame] | 258 | * @brief Adds a PEL to the repository given its data |
| 259 | * |
| 260 | * @param[in] pelData - The PEL to add as a vector of uint8_ts |
| 261 | * @param[in] obmcLogID - the OpenBMC event log ID |
| 262 | */ |
| 263 | void addPEL(std::vector<uint8_t>& pelData, uint32_t obmcLogID); |
| 264 | |
| 265 | /** |
| 266 | * @brief Adds the PEL stored in the ESEL field of the AdditionalData |
| 267 | * property of an OpenBMC event log to the repository. |
| 268 | * |
| 269 | * @param[in] esel - The ESEL AdditionalData contents |
| 270 | * @param[in] obmcLogID - The OpenBMC event log ID |
| 271 | */ |
| 272 | void addESELPEL(const std::string& esel, uint32_t obmcLogID); |
| 273 | |
| 274 | /** |
Matt Spinler | 56ad2a0 | 2020-03-26 14:00:52 -0500 | [diff] [blame] | 275 | * @brief Converts the D-Bus FFDC method argument into a data |
| 276 | * structure understood by the PEL code. |
| 277 | * |
| 278 | * @param[in] ffdc - A vector of FFDC file information |
| 279 | * |
| 280 | * @return PelFFDC - The PEL FFDC data structure |
| 281 | */ |
| 282 | PelFFDC convertToPelFFDC(const phosphor::logging::FFDCEntries& ffdc); |
| 283 | |
| 284 | /** |
Matt Spinler | 7e727a3 | 2020-07-07 15:00:17 -0500 | [diff] [blame] | 285 | * @brief Schedules a PEL repository prune to occur from |
| 286 | * the event loop. |
| 287 | * |
| 288 | * Uses sd_event_add_defer |
| 289 | */ |
| 290 | void scheduleRepoPrune(); |
| 291 | |
| 292 | /** |
| 293 | * @brief Prunes old PELs out of the repository to save space. |
| 294 | * |
| 295 | * This is called from the event loop. |
| 296 | * |
| 297 | * @param[in] source - The event source object used |
| 298 | */ |
| 299 | void pruneRepo(sdeventplus::source::EventBase& source); |
| 300 | |
| 301 | /** |
Matt Spinler | ff9cec2 | 2020-07-15 13:06:35 -0500 | [diff] [blame] | 302 | * @brief Sets up an inotify watch to watch for deleted PEL |
| 303 | * files. Calls pelFileDeleted() when that occurs. |
| 304 | */ |
| 305 | void setupPELDeleteWatch(); |
| 306 | |
| 307 | /** |
| 308 | * @brief Called when the inotify watch put on the repository directory |
| 309 | * detects a PEL file was deleted. |
| 310 | * |
| 311 | * Will tell the Repository class about the deleted PEL, and then tell |
| 312 | * the log manager class to delete the corresponding OpenBMC event log. |
| 313 | */ |
| 314 | void pelFileDeleted(sdeventplus::source::IO& io, int fd, uint32_t revents); |
| 315 | |
| 316 | /** |
Andrew Geissler | 44fc316 | 2020-07-09 09:21:31 -0500 | [diff] [blame] | 317 | * @brief Check if the input PEL should cause a quiesce of the system |
| 318 | * |
| 319 | * If QuiesceOnHwError is enabled within phosphor-settings and the PEL |
| 320 | * from the host has a severity which is not SeverityType::nonError then |
| 321 | * execute the quiesce and boot block logic. |
| 322 | * |
| 323 | * @param[in] pel - The PEL to check |
| 324 | */ |
| 325 | void checkPelAndQuiesce(std::unique_ptr<openpower::pels::PEL>& pel); |
| 326 | |
| 327 | /** |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 328 | * @brief Reference to phosphor-logging's Manager class |
| 329 | */ |
Matt Spinler | 367144c | 2019-09-19 15:33:52 -0500 | [diff] [blame] | 330 | phosphor::logging::internal::Manager& _logManager; |
Matt Spinler | 89fa082 | 2019-07-17 13:54:30 -0500 | [diff] [blame] | 331 | |
| 332 | /** |
Matt Spinler | f682b40 | 2019-12-18 13:48:08 -0600 | [diff] [blame] | 333 | * @brief Handles creating event logs/PELs from within |
| 334 | * the PEL extension code |
| 335 | */ |
| 336 | EventLogger _eventLogger; |
| 337 | |
| 338 | /** |
Matt Spinler | 89fa082 | 2019-07-17 13:54:30 -0500 | [diff] [blame] | 339 | * @brief The PEL repository object |
| 340 | */ |
| 341 | Repository _repo; |
Matt Spinler | c8705e2 | 2019-09-11 12:36:07 -0500 | [diff] [blame] | 342 | |
| 343 | /** |
Matt Spinler | 367144c | 2019-09-19 15:33:52 -0500 | [diff] [blame] | 344 | * @brief The PEL message registry object |
| 345 | */ |
| 346 | message::Registry _registry; |
| 347 | |
| 348 | /** |
Matt Spinler | ff9cec2 | 2020-07-15 13:06:35 -0500 | [diff] [blame] | 349 | * @brief The Event object this class uses |
| 350 | */ |
| 351 | sdeventplus::Event _event; |
| 352 | |
| 353 | /** |
Matt Spinler | c8705e2 | 2019-09-11 12:36:07 -0500 | [diff] [blame] | 354 | * @brief The API the PEL sections use to gather data |
| 355 | */ |
| 356 | std::unique_ptr<DataInterfaceBase> _dataIface; |
Matt Spinler | f60ac27 | 2019-12-11 13:47:50 -0600 | [diff] [blame] | 357 | |
| 358 | /** |
| 359 | * @brief The HostNotifier object used for telling the |
| 360 | * host about new PELs |
| 361 | */ |
| 362 | std::unique_ptr<HostNotifier> _hostNotifier; |
Matt Spinler | 6b1a5c8 | 2020-01-07 08:48:53 -0600 | [diff] [blame] | 363 | |
| 364 | /** |
| 365 | * @brief The event source for closing a PEL file descriptor after |
| 366 | * it has been returned from the getPEL D-Bus method. |
| 367 | */ |
| 368 | std::unique_ptr<sdeventplus::source::Defer> _fdCloserEventSource; |
Matt Spinler | 7e727a3 | 2020-07-07 15:00:17 -0500 | [diff] [blame] | 369 | |
| 370 | /** |
| 371 | * @brief The even source for removing old PELs when the repo is |
| 372 | * running out of space to make room for new ones. |
| 373 | */ |
| 374 | std::unique_ptr<sdeventplus::source::Defer> _repoPrunerEventSource; |
Matt Spinler | ff9cec2 | 2020-07-15 13:06:35 -0500 | [diff] [blame] | 375 | |
| 376 | /** |
| 377 | * @brief The even source for watching for deleted PEL files. |
| 378 | */ |
| 379 | std::unique_ptr<sdeventplus::source::IO> _pelFileDeleteEventSource; |
| 380 | |
| 381 | /** |
| 382 | * @brief The file descriptor returned by inotify_init1() used |
| 383 | * for watching for deleted PEL files. |
| 384 | */ |
| 385 | int _pelFileDeleteFD = -1; |
| 386 | |
| 387 | /** |
| 388 | * @brief The file descriptor returned by inotify_add_watch(). |
| 389 | */ |
| 390 | int _pelFileDeleteWatchFD = -1; |
Matt Spinler | 4e8078c | 2019-07-09 13:22:32 -0500 | [diff] [blame] | 391 | }; |
| 392 | |
| 393 | } // namespace pels |
| 394 | } // namespace openpower |