mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-24 16:57:02 +00:00
Normalize module and add new v2 stubs.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
#include <onlp/platformi/attributei.h>
|
||||
#include <onlp/stdattrs.h>
|
||||
#include <onlplib/file.h>
|
||||
|
||||
int
|
||||
onlp_attributei_onie_info_get(onlp_oid_t oid, onlp_onie_info_t* rp)
|
||||
{
|
||||
if(oid != ONLP_OID_CHASSIS) {
|
||||
return ONLP_STATUS_E_UNSUPPORTED;
|
||||
}
|
||||
|
||||
if(rp == NULL) {
|
||||
return ONLP_STATUS_OK;
|
||||
}
|
||||
|
||||
//return onlp_onie_decode_file(rp, IDPROM_PATH);
|
||||
return ONLP_STATUS_E_UNSUPPORTED;
|
||||
}
|
||||
|
||||
int
|
||||
onlp_attributei_asset_info_get(onlp_oid_t oid, onlp_asset_info_t* rp)
|
||||
{
|
||||
if(oid != ONLP_OID_CHASSIS) {
|
||||
return ONLP_STATUS_E_UNSUPPORTED;
|
||||
}
|
||||
|
||||
if(rp == NULL) {
|
||||
return ONLP_STATUS_OK;
|
||||
}
|
||||
|
||||
rp->oid = oid;
|
||||
rp->firmware_revision = aim_strdup("fixme");
|
||||
return ONLP_STATUS_OK;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#include <onlp/platformi/chassisi.h>
|
||||
|
||||
int
|
||||
onlp_chassisi_hdr_get(onlp_oid_id_t id, onlp_oid_hdr_t* hdr)
|
||||
{
|
||||
int i;
|
||||
onlp_oid_t* e = hdr->coids;
|
||||
|
||||
ONLP_OID_STATUS_FLAG_SET(hdr, PRESENT);
|
||||
ONLP_OID_STATUS_FLAG_SET(hdr, OPERATIONAL);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
#include <onlp/platformi/base.h>
|
||||
|
||||
const char*
|
||||
onlp_platformi_get(void)
|
||||
{
|
||||
return "x86-64-inventec-d5254-r0";
|
||||
}
|
||||
|
||||
int
|
||||
onlp_platformi_sw_init(void)
|
||||
{
|
||||
return ONLP_STATUS_OK;
|
||||
}
|
||||
|
||||
int
|
||||
onlp_platformi_manage_fans(void)
|
||||
{
|
||||
return ONLP_STATUS_E_UNSUPPORTED;
|
||||
}
|
||||
|
||||
int
|
||||
onlp_platformi_manage_leds(void)
|
||||
{
|
||||
return ONLP_STATUS_E_UNSUPPORTED;
|
||||
}
|
||||
Reference in New Issue
Block a user