elog-errors: remove generated file

Since we use meson subprojects to build this repository outside of
Yocto, there is no need to carry along a pre-generated elog-errors
file anymore.  Remove it and ensure all code is using the real one
from phosphor-logging.

The Software.Image errors have been moved over to
phosphor-dbus-interfaces and can be used from there.  Remove them from
this repository.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ic16fdef298361a878644e989b661f6312af8a0cb
diff --git a/elog-errors.hpp b/elog-errors.hpp
deleted file mode 100644
index 1b28415..0000000
--- a/elog-errors.hpp
+++ /dev/null
@@ -1,384 +0,0 @@
-// This file was autogenerated.  Do not edit!
-// See elog-gen.py for more details
-#pragma once
-
-#include <phosphor-logging/elog.hpp>
-#include <phosphor-logging/log.hpp>
-#include <sdbusplus/exception.hpp>
-
-#include <string>
-#include <tuple>
-#include <type_traits>
-
-namespace sdbusplus
-{
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Software
-{
-namespace Image
-{
-namespace Error
-{
-struct ManifestFileFailure;
-} // namespace Error
-} // namespace Image
-} // namespace Software
-} // namespace openbmc_project
-} // namespace xyz
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Software
-{
-namespace Image
-{
-namespace Error
-{
-struct ImageFailure;
-} // namespace Error
-} // namespace Image
-} // namespace Software
-} // namespace openbmc_project
-} // namespace xyz
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Software
-{
-namespace Image
-{
-namespace Error
-{
-struct BusyFailure;
-} // namespace Error
-} // namespace Image
-} // namespace Software
-} // namespace openbmc_project
-} // namespace xyz
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Software
-{
-namespace Image
-{
-namespace Error
-{
-struct UnTarFailure;
-} // namespace Error
-} // namespace Image
-} // namespace Software
-} // namespace openbmc_project
-} // namespace xyz
-} // namespace sdbusplus
-
-namespace sdbusplus
-{
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Software
-{
-namespace Image
-{
-namespace Error
-{
-struct InternalFailure;
-} // namespace Error
-} // namespace Image
-} // namespace Software
-} // namespace openbmc_project
-} // namespace xyz
-} // namespace sdbusplus
-
-namespace phosphor
-{
-
-namespace logging
-{
-
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Software
-{
-namespace Image
-{
-namespace _UnTarFailure
-{
-
-struct PATH
-{
-    /*
-     * We can't use -fsanitize=undefined if we declare a
-     * 'static constexpr auto str' member, so don't. Instead, open-code the
-     * mako template lookups.
-     */
-    static constexpr auto str_short = "PATH";
-    using type = std::tuple<std::decay_t<decltype("PATH=%s")>, const char*>;
-    explicit constexpr PATH(const char* a) : _entry(entry("PATH=%s", a)){};
-    type _entry;
-};
-
-} // namespace _UnTarFailure
-
-struct UnTarFailure
-{
-    static constexpr auto L = level::ERR;
-    using PATH = _UnTarFailure::PATH;
-    using metadata_types = std::tuple<PATH>;
-};
-
-} // namespace Image
-} // namespace Software
-} // namespace openbmc_project
-} // namespace xyz
-
-namespace details
-{
-
-template <>
-struct map_exception_type<
-    sdbusplus::xyz::openbmc_project::Software::Image::Error::UnTarFailure>
-{
-    using type = xyz::openbmc_project::Software::Image::UnTarFailure;
-};
-
-} // namespace details
-
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Software
-{
-namespace Image
-{
-namespace _ManifestFileFailure
-{
-
-struct PATH
-{
-    /*
-     * We can't use -fsanitize=undefined if we declare a
-     * 'static constexpr auto str' member, so don't. Instead, open-code the
-     * mako template lookups.
-     */
-    static constexpr auto str_short = "PATH";
-    using type = std::tuple<std::decay_t<decltype("PATH=%s")>, const char*>;
-    explicit constexpr PATH(const char* a) : _entry(entry("PATH=%s", a)){};
-    type _entry;
-};
-
-} // namespace _ManifestFileFailure
-
-struct ManifestFileFailure
-{
-    static constexpr auto L = level::ERR;
-    using PATH = _ManifestFileFailure::PATH;
-    using metadata_types = std::tuple<PATH>;
-};
-
-} // namespace Image
-} // namespace Software
-} // namespace openbmc_project
-} // namespace xyz
-
-namespace details
-{
-
-template <>
-struct map_exception_type<sdbusplus::xyz::openbmc_project::Software::Image::
-                              Error::ManifestFileFailure>
-{
-    using type = xyz::openbmc_project::Software::Image::ManifestFileFailure;
-};
-
-} // namespace details
-
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Software
-{
-namespace Image
-{
-namespace _InternalFailure
-{
-
-struct FAIL
-{
-    /*
-     * We can't use -fsanitize=undefined if we declare a
-     * 'static constexpr auto str' member, so don't. Instead, open-code the
-     * mako template lookups.
-     */
-    static constexpr auto str_short = "FAIL";
-    using type = std::tuple<std::decay_t<decltype("FAIL=%s")>, const char*>;
-    explicit constexpr FAIL(const char* a) : _entry(entry("FAIL=%s", a)){};
-    type _entry;
-};
-
-} // namespace _InternalFailure
-
-struct InternalFailure
-{
-    static constexpr auto L = level::ERR;
-    using FAIL = _InternalFailure::FAIL;
-    using metadata_types = std::tuple<FAIL>;
-};
-
-} // namespace Image
-} // namespace Software
-} // namespace openbmc_project
-} // namespace xyz
-
-namespace details
-{
-
-template <>
-struct map_exception_type<
-    sdbusplus::xyz::openbmc_project::Software::Image::Error::InternalFailure>
-{
-    using type = xyz::openbmc_project::Software::Image::InternalFailure;
-};
-
-} // namespace details
-
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Software
-{
-namespace Image
-{
-namespace _ImageFailure
-{
-
-struct FAIL
-{
-    /*
-     * We can't use -fsanitize=undefined if we declare a
-     * 'static constexpr auto str' member, so don't. Instead, open-code the
-     * mako template lookups.
-     */
-    static constexpr auto str_short = "FAIL";
-    using type = std::tuple<std::decay_t<decltype("FAIL=%s")>, const char*>;
-    explicit constexpr FAIL(const char* a) : _entry(entry("FAIL=%s", a)){};
-    type _entry;
-};
-struct PATH
-{
-    /*
-     * We can't use -fsanitize=undefined if we declare a
-     * 'static constexpr auto str' member, so don't. Instead, open-code the
-     * mako template lookups.
-     */
-    static constexpr auto str_short = "PATH";
-    using type = std::tuple<std::decay_t<decltype("PATH=%s")>, const char*>;
-    explicit constexpr PATH(const char* a) : _entry(entry("PATH=%s", a)){};
-    type _entry;
-};
-
-} // namespace _ImageFailure
-
-struct ImageFailure
-{
-    static constexpr auto L = level::ERR;
-    using FAIL = _ImageFailure::FAIL;
-    using PATH = _ImageFailure::PATH;
-    using metadata_types = std::tuple<FAIL, PATH>;
-};
-
-} // namespace Image
-} // namespace Software
-} // namespace openbmc_project
-} // namespace xyz
-
-namespace details
-{
-
-template <>
-struct map_exception_type<
-    sdbusplus::xyz::openbmc_project::Software::Image::Error::ImageFailure>
-{
-    using type = xyz::openbmc_project::Software::Image::ImageFailure;
-};
-
-} // namespace details
-
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Software
-{
-namespace Image
-{
-namespace _BusyFailure
-{
-
-struct PATH
-{
-    /*
-     * We can't use -fsanitize=undefined if we declare a
-     * 'static constexpr auto str' member, so don't. Instead, open-code the
-     * mako template lookups.
-     */
-    static constexpr auto str_short = "PATH";
-    using type = std::tuple<std::decay_t<decltype("PATH=%s")>, const char*>;
-    explicit constexpr PATH(const char* a) : _entry(entry("PATH=%s", a)){};
-    type _entry;
-};
-
-} // namespace _BusyFailure
-
-struct BusyFailure
-{
-    static constexpr auto L = level::ERR;
-    using PATH = _BusyFailure::PATH;
-    using metadata_types = std::tuple<PATH>;
-};
-
-} // namespace Image
-} // namespace Software
-} // namespace openbmc_project
-} // namespace xyz
-
-namespace details
-{
-
-template <>
-struct map_exception_type<
-    sdbusplus::xyz::openbmc_project::Software::Image::Error::BusyFailure>
-{
-    using type = xyz::openbmc_project::Software::Image::BusyFailure;
-};
-
-} // namespace details
-
-} // namespace logging
-
-} // namespace phosphor
diff --git a/image_manager.cpp b/image_manager.cpp
index baa0571..4fc4f8e 100644
--- a/image_manager.cpp
+++ b/image_manager.cpp
@@ -11,7 +11,7 @@
 #include <sys/wait.h>
 #include <unistd.h>
 
-#include <elog-errors.hpp>
+#include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/elog.hpp>
 #include <phosphor-logging/lg2.hpp>
 #include <xyz/openbmc_project/Software/Image/error.hpp>
diff --git a/meson.build b/meson.build
index 41adfde..7338236 100644
--- a/meson.build
+++ b/meson.build
@@ -154,8 +154,6 @@
     'xyz.openbmc_project.Software.Version.service.in'
 ]
 
-subdir('xyz/openbmc_project/Software/Image')
-
 image_updater_sources = files(
     'activation.cpp',
     'images.cpp',
@@ -255,8 +253,6 @@
 
 executable(
     'phosphor-image-updater',
-    image_error_cpp,
-    image_error_hpp,
     image_updater_sources,
     dependencies: [deps, ssl],
     install: true
@@ -264,8 +260,6 @@
 
 executable(
     'phosphor-version-software-manager',
-    image_error_cpp,
-    image_error_hpp,
     'image_manager.cpp',
     'image_manager_main.cpp',
     'version.cpp',
diff --git a/xyz/openbmc_project/Software/Image.errors.yaml b/xyz/openbmc_project/Software/Image.errors.yaml
deleted file mode 100644
index c2fda85..0000000
--- a/xyz/openbmc_project/Software/Image.errors.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-- name: UnTarFailure
-  description: An error occurred during untar.
-- name: ManifestFileFailure
-  description: An error when reading the Manifest file.
-- name: InternalFailure
-  description: The operation failed internally during processing the image.
-- name: ImageFailure
-  description: An error occured processing the image.
-- name: BusyFailure
-  description: The device is busy during the update.
diff --git a/xyz/openbmc_project/Software/Image.metadata.yaml b/xyz/openbmc_project/Software/Image.metadata.yaml
deleted file mode 100644
index a63d4a1..0000000
--- a/xyz/openbmc_project/Software/Image.metadata.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
-- name: UnTarFailure
-  level: ERR
-  meta:
-      - str: "PATH=%s"
-        type: string
-- name: ManifestFileFailure
-  level: ERR
-  meta:
-      - str: "PATH=%s"
-        type: string
-- name: InternalFailure
-  level: ERR
-  meta:
-      - str: "FAIL=%s"
-        type: string
-- name: ImageFailure
-  level: ERR
-  meta:
-      - str: "FAIL=%s"
-        type: string
-      - str: "PATH=%s"
-        type: string
-- name: BusyFailure
-  level: ERR
-  meta:
-      - str: "PATH=%s"
-        type: string
diff --git a/xyz/openbmc_project/Software/Image/meson.build b/xyz/openbmc_project/Software/Image/meson.build
deleted file mode 100644
index 0783a60..0000000
--- a/xyz/openbmc_project/Software/Image/meson.build
+++ /dev/null
@@ -1,29 +0,0 @@
-image_error_hpp = custom_target(
-    'error.hpp',
-    capture: true,
-    command: [
-        sdbusplusplus_prog,
-        '-r', meson.project_source_root(),
-        'error',
-        'exception-header',
-        'xyz.openbmc_project.Software.Image',
-    ],
-    input: '../Image.errors.yaml',
-    install: true,
-    install_dir: get_option('includedir') / 'xyz/openbmc_project/Software/Image',
-    output: 'error.hpp',
-)
-
-image_error_cpp = custom_target(
-    'error.cpp',
-    capture: true,
-    command: [
-        sdbusplusplus_prog,
-        '-r', meson.project_source_root(),
-        'error',
-        'exception-cpp',
-        'xyz.openbmc_project.Software.Image',
-    ],
-    input: '../Image.errors.yaml',
-    output: 'error.cpp',
-)