OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
KernelVersion.c File Reference
#include <Base.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/OcAppleKernelLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcStringLib.h>
#include "PrelinkedInternal.h"

Go to the source code of this file.

Functions

UINT32 OcParseDarwinVersion (IN CONST CHAR8 *String)
 
BOOLEAN OcMatchDarwinVersion (IN UINT32 CurrentVersion OPTIONAL, IN UINT32 MinVersion OPTIONAL, IN UINT32 MaxVersion OPTIONAL)
 
UINT32 OcKernelReadDarwinVersion (IN CONST UINT8 *Kernel, IN UINT32 KernelSize)
 

Detailed Description

Copyright (C) 2019, vit9696. All rights reserved.

All rights reserved.

This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file KernelVersion.c.

Function Documentation

◆ OcKernelReadDarwinVersion()

UINT32 OcKernelReadDarwinVersion ( IN CONST UINT8 * Kernel,
IN UINT32 KernelSize )

Read Apple kernel version in integer format.

Parameters
[in]KernelApple kernel binary.
[in]KernelSizeApple kernel size.
Returns
Kernel version or 0.

Definition at line 116 of file KernelVersion.c.

◆ OcMatchDarwinVersion()

BOOLEAN OcMatchDarwinVersion ( IN UINT32 CurrentVersion OPTIONAL,
IN UINT32 MinVersion OPTIONAL,
IN UINT32 MaxVersion OPTIONAL )

Check whether min <= current <= max is true. When current or max are 0 they are considered infinite.

Parameters
[in]CurrentVersionCurrent kernel version.
[in]MinVersionMinimal kernel version.
[in]MaxVersionMaximum kernel version.
Returns
TRUE on match.

Definition at line 73 of file KernelVersion.c.

◆ OcParseDarwinVersion()

UINT32 OcParseDarwinVersion ( IN CONST CHAR8 * String)

Create Apple kernel version in integer format. See KERNEL_VERSION on how to build it from integers.

Parameters
[in]StringApple kernel version.
Returns
Kernel version or 0.

Definition at line 27 of file KernelVersion.c.