mirror of
https://github.com/ipxe/ipxe
synced 2025-12-30 13:11:11 +03:00
[Settings] show_setting() functions return snprintf()-style length.
show_setting() and related functions now return an "actual length" in the style of snprintf(). This is to allow consumers to allocate buffers large enough to hold the formatted setting.
This commit is contained in:
@@ -48,7 +48,7 @@ struct config_setting_type {
|
||||
* @v setting Configuration setting
|
||||
* @v buf Buffer to contain value
|
||||
* @v len Length of buffer
|
||||
* @ret rc Return status code
|
||||
* @ret len Length of formatted value, or negative error
|
||||
*/
|
||||
int ( * show ) ( struct config_context *context,
|
||||
struct config_setting *setting,
|
||||
@@ -108,7 +108,7 @@ struct config_setting {
|
||||
* @v setting Configuration setting
|
||||
* @v buf Buffer to contain value
|
||||
* @v len Length of buffer
|
||||
* @ret rc Return status code
|
||||
* @ret len Length of formatted value, or negative error
|
||||
*/
|
||||
static inline int show_setting ( struct config_context *context,
|
||||
struct config_setting *setting,
|
||||
|
||||
Reference in New Issue
Block a user