From 7923b3b884e69caa1616d81eb9ee10d1ac0e1257 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Tue, 15 Feb 2022 23:07:48 +0200 Subject: LibEDID: Exclude display_product_{name, serial_number} from the Kernel These APIs return Strings, which are OOM-infallibe, and as such, not appropriate for Kernel use. Since these APIs are only used by userland at the moment, we can just ifdef them out of the Kernel. --- Userland/Libraries/LibEDID/EDID.cpp | 2 ++ Userland/Libraries/LibEDID/EDID.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Userland/Libraries/LibEDID/EDID.cpp b/Userland/Libraries/LibEDID/EDID.cpp index dcd99790b3..6f7319095b 100644 --- a/Userland/Libraries/LibEDID/EDID.cpp +++ b/Userland/Libraries/LibEDID/EDID.cpp @@ -1145,6 +1145,7 @@ ErrorOr Parser::for_each_display_descriptor(Function ErrorOr> { diff --git a/Userland/Libraries/LibEDID/EDID.h b/Userland/Libraries/LibEDID/EDID.h index b3f15696c4..18ac90336f 100644 --- a/Userland/Libraries/LibEDID/EDID.h +++ b/Userland/Libraries/LibEDID/EDID.h @@ -364,8 +364,10 @@ public: ErrorOr for_each_detailed_timing(Function) const; Optional detailed_timing(size_t) const; +#ifndef KERNEL String display_product_name() const; String display_product_serial_number() const; +#endif ErrorOr for_each_short_video_descriptor(Function) const; -- cgit v1.2.3