libfru 2.0+git20240917.25293b1
FRU Manupulation Library
Loading...
Searching...
No Matches
Functions
frugen-json.h File Reference

FRU generator utility JSON support code. More...

#include "fru.h"
#include "frugen.h"
Include dependency graph for frugen-json.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void load_from_json_file (const char *fname, struct frugen_fruinfo_s *info)
 
void save_to_json_file (FILE **fp, const char *fname, const struct frugen_fruinfo_s *info, const struct frugen_config_s *config)
 

Detailed Description

FRU generator utility JSON support code.

Copyright (C) 2016-2023 Alexander Amelkin alexa.nosp@m.nder.nosp@m.@amel.nosp@m.kin..nosp@m.msk.r.nosp@m.u SPDX-License-Identifier: GPL-2.0-or-later OR Apache-2.0

Function Documentation

◆ load_from_json_file()

void load_from_json_file ( const char *  fname,
struct frugen_fruinfo_s info 
)

Load a FRU template from JSON file into a FRU information structure

References datestr_to_tv(), debug, fatal, frugen_fruinfo_s::fru, frugen_fruinfo_s::has_bdate, frugen_fruinfo_s::has_board, frugen_fruinfo_s::has_chassis, frugen_fruinfo_s::has_internal, frugen_fruinfo_s::has_multirec, and frugen_fruinfo_s::has_product.

Referenced by load_fromfile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_to_json_file()

void save_to_json_file ( FILE **  fp,
const char *  fname,
const struct frugen_fruinfo_s info,
const struct frugen_config_s config 
)