## ostree-bootconfig-parser

ostree-bootconfig-parser

## Functions

OstreeBootconfigParser * | ostree_bootconfig_parser_new ()
OstreeBootconfigParser * | ostree_bootconfig_parser_clone ()
gboolean | ostree_bootconfig_parser_parse ()
gboolean | ostree_bootconfig_parser_parse_at ()
gboolean | ostree_bootconfig_parser_write ()
gboolean | ostree_bootconfig_parser_write_at ()
void | ostree_bootconfig_parser_set ()
const char * | ostree_bootconfig_parser_get ()
void | ostree_bootconfig_parser_set_overlay_initrds ()
char ** | ostree_bootconfig_parser_get_overlay_initrds ()
guint64 | ostree_bootconfig_parser_get_tries_left ()
guint64 | ostree_bootconfig_parser_get_tries_done ()

## Types and Values

| OstreeBootconfigParser

## Description

## Functions

### ostree_bootconfig_parser_new ()

    OstreeBootconfigParser *
    ostree_bootconfig_parser_new (void);

### ostree_bootconfig_parser_clone ()

    OstreeBootconfigParser *
    ostree_bootconfig_parser_clone (OstreeBootconfigParser *self);

#### Parameters

self | Bootconfig to clone |

#### Returns

Copy of `self` .

[transfer full]

### ostree_bootconfig_parser_parse ()

    gboolean
    ostree_bootconfig_parser_parse (OstreeBootconfigParser *self,
                                    GFile *path,
                                    GCancellable *cancellable,
                                    GError **error);

### ostree_bootconfig_parser_parse_at ()

    gboolean
    ostree_bootconfig_parser_parse_at (OstreeBootconfigParser *self,
                                       int dfd,
                                       const char *path,
                                       GCancellable *cancellable,
                                       GError **error);

Initialize a bootconfig from the given file.

#### Parameters

self | Parser |
dfd | Directory fd |
path | File path |
cancellable | Cancellable |
error | Error |

### ostree_bootconfig_parser_write ()

    gboolean
    ostree_bootconfig_parser_write (OstreeBootconfigParser *self,
                                    GFile *output,
                                    GCancellable *cancellable,
                                    GError **error);

### ostree_bootconfig_parser_write_at ()

    gboolean
    ostree_bootconfig_parser_write_at (OstreeBootconfigParser *self,
                                       int dfd,
                                       const char *path,
                                       GCancellable *cancellable,
                                       GError **error);

### ostree_bootconfig_parser_set ()

    void
    ostree_bootconfig_parser_set (OstreeBootconfigParser *self,
                                  const char *key,
                                  const char *value);

Set the `key` /`value` pair to the boot configuration dictionary.

#### Parameters

self | Parser |
key | the key |
value | the key |

### ostree_bootconfig_parser_get ()

    const char *
    ostree_bootconfig_parser_get (OstreeBootconfigParser *self,
                                  const char *key);

Get the value corresponding to `key` from the boot configuration dictionary.

#### Parameters

self | Parser |
key | the key name to retrieve |

#### Returns

The corresponding value, or `NULL` if the key hasn't been found.

[nullable]

### ostree_bootconfig_parser_set_overlay_initrds ()

    void
    ostree_bootconfig_parser_set_overlay_initrds
                                   (OstreeBootconfigParser *self,
                                    char **initrds);

These are rendered as additional `initrd` keys in the final bootloader configs. The base initrd is part of the primary keys.

#### Parameters

self | Parser |
initrds | Array of overlay initrds or `NULL` to unset. | [array zero-terminated=1][transfer none][allow-none]

Since: 2020.7

### ostree_bootconfig_parser_get_overlay_initrds ()

    char **
    ostree_bootconfig_parser_get_overlay_initrds
                                   (OstreeBootconfigParser *self);

#### Parameters

self | Parser |

#### Returns

Array of initrds or `NULL` if none are set.

[array zero-terminated=1][transfer none][nullable]

Since: 2020.7

### ostree_bootconfig_parser_get_tries_left ()

    guint64
    ostree_bootconfig_parser_get_tries_left
                                   (OstreeBootconfigParser *self);

#### Parameters

self | Parser |

#### Returns

Amount of boot tries left

Since: 2025.2

### ostree_bootconfig_parser_get_tries_done ()

    guint64
    ostree_bootconfig_parser_get_tries_done
                                   (OstreeBootconfigParser *self);

#### Parameters

self | Parser |

#### Returns

Amount of boot tries

## Types and Values

### OstreeBootconfigParser

    typedef struct _OstreeBootconfigParser OstreeBootconfigParser;