nbos

nbos

https://git.tonybtw.com/nbos.git git://git.tonybtw.com/nbos.git
1,066 bytes raw
1
#define _GNU_SOURCE
2
#include "activate.h"
3
4
#include <errno.h>
5
#include <stdio.h>
6
7
/**
8
 * activate() - Build and activate a generation.
9
 * @a: Arena for transient allocations.
10
 * @cfg: System configuration to activate.
11
 * @resolved: Topologically-sorted resolved package list.
12
 * @generation: Generation number to assign.
13
 *
14
 * Symlinks resolved store paths into /nb/system/<gen>/, updates the
15
 * bootloader, atomically swaps /nb/system/current, and runs service
16
 * activations. On failure at any step, the previous generation
17
 * remains active.
18
 *
19
 * Return: 0 on success, errno value on failure.
20
 */
21
int activate(
22
    arena               *a,
23
    const system_cfg    *cfg,
24
    const resolved_list *resolved,
25
    uint32_t             generation)
26
{
27
    (void)a;
28
    (void)cfg;
29
    (void)resolved;
30
    (void)generation;
31
    return ENOSYS;
32
}
33
34
/**
35
 * activate_rollback() - Activate the previous generation.
36
 * @a: Arena for transient allocations.
37
 *
38
 * Return: 0 on success, errno value on failure.
39
 */
40
int activate_rollback(arena *a) {
41
    (void)a;
42
    return ENOSYS;
43
}