File: mark.h

package info (click to toggle)
rauc 1.15-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,336 kB
  • sloc: ansic: 36,989; python: 3,354; sh: 1,391; xml: 53; makefile: 41
file content (63 lines) | stat: -rw-r--r-- 1,685 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#pragma once

#include <glib.h>

#include "slot.h"

/**
 * Mark a bootname slot as active.
 *
 * This means it is expected to be the next being booted.
 *
 * @param slot Slot to mark as active
 * @param error Return location for a GError
 *
 * @return Return TRUE on success and FALSE on error
 */
gboolean r_mark_active(RaucSlot *slot, GError **error)
G_GNUC_WARN_UNUSED_RESULT;

/**
 * Mark a bootname slot as good.
 *
 * This means it is considered working after an update.
 *
 * @param slot Slot to mark as good
 * @param error Return location for a GError
 *
 * @return Return TRUE on success and FALSE on error
 */
gboolean r_mark_good(RaucSlot *slot, GError **error)
G_GNUC_WARN_UNUSED_RESULT;

/**
 * Mark a bootname slot as bad.
 *
 * This means it is considered broken after an update.
 *
 * @param slot Slot to mark as bad
 * @param error Return location for a GError
 *
 * @return Return TRUE on success and FALSE on error
 */
gboolean r_mark_bad(RaucSlot *slot, GError **error)
G_GNUC_WARN_UNUSED_RESULT;

/**
 * Mark a bootname slot.
 *
 * @param state String representation of slot state
 *              (e.g. "good", "bad", or "active")
 * @param slot_identifier String representation of slot identifier
 *                        (e.g. "booted", "other", or the slot name)
 * @param slot_name Return location for the resulting slot name
 * @param message Return location for message describing what has been done
 *                (e.g. "marked slot(s) rootfs.0 as good")
 *
 * @return Return TRUE on success and FALSE on error
 */
gboolean mark_run(const gchar *state,
		const gchar *slot_identifier,
		gchar **slot_name,
		gchar **message)
G_GNUC_WARN_UNUSED_RESULT;