dmi_platform_clone

Synopsis

#include <opendmi/platform.h>

dmi_platform_t *dmi_platform_clone(const dmi_platform_t *platform);

Description

The dmi_platform_clone function creates a copy of a platform, which belongs to the same context, has the same vendor and generation, and holds copies of the product name and the family code. The copy is independent of the original, and is destroyed with dmi_platform_destroy.

Parameters

platform

Platform to copy.

Return value

Returns the copy on success, or nullptr if platform is nullptr or memory is exhausted.

Errors

DMI_ERROR_OUT_OF_MEMORY

Memory is exhausted, reported to the context of platform, if it has one.