diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-02-15 23:07:48 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-16 22:21:37 +0100 |
commit | 7923b3b884e69caa1616d81eb9ee10d1ac0e1257 (patch) | |
tree | 98b90a543e468858ce5a405f1d34c28733185653 | |
parent | 13f5d1c03739e3cf8f6fede91835b32f60375e2b (diff) | |
download | serenity-7923b3b884e69caa1616d81eb9ee10d1ac0e1257.zip |
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.
-rw-r--r-- | Userland/Libraries/LibEDID/EDID.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibEDID/EDID.h | 2 |
2 files changed, 4 insertions, 0 deletions
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<IterationDecision> Parser::for_each_display_descriptor(Function<Iteratio return result; } +#ifndef KERNEL String Parser::display_product_name() const { String product_name; @@ -1190,6 +1191,7 @@ String Parser::display_product_serial_number() const } return product_name; } +#endif auto Parser::supported_resolutions() const -> ErrorOr<Vector<SupportedResolution>> { 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<IterationDecision> for_each_detailed_timing(Function<IterationDecision(DetailedTiming const&, unsigned)>) const; Optional<DetailedTiming> detailed_timing(size_t) const; +#ifndef KERNEL String display_product_name() const; String display_product_serial_number() const; +#endif ErrorOr<IterationDecision> for_each_short_video_descriptor(Function<IterationDecision(unsigned, bool, VIC::Details const&)>) const; |