]> git.proxmox.com Git - systemd.git/blame - src/core/show-status.h
New upstream version 240
[systemd.git] / src / core / show-status.h
CommitLineData
52ad194e 1/* SPDX-License-Identifier: LGPL-2.1+ */
663996b3
MS
2#pragma once
3
db2df898
MP
4#include <stdbool.h>
5
6#include "macro.h"
7
60f067b4 8/* Manager status */
663996b3 9
60f067b4 10typedef enum ShowStatus {
6e866b33
MB
11 SHOW_STATUS_NO,
12 SHOW_STATUS_AUTO,
13 SHOW_STATUS_TEMPORARY,
14 SHOW_STATUS_YES,
15 _SHOW_STATUS_MAX,
16 _SHOW_STATUS_INVALID = -1,
60f067b4 17} ShowStatus;
663996b3 18
6e866b33
MB
19typedef enum ShowStatusFlags {
20 SHOW_STATUS_ELLIPSIZE = 1 << 0,
21 SHOW_STATUS_EPHEMERAL = 1 << 1,
22} ShowStatusFlags;
23
24ShowStatus show_status_from_string(const char *v) _const_;
25const char* show_status_to_string(ShowStatus s) _pure_;
60f067b4 26int parse_show_status(const char *v, ShowStatus *ret);
db2df898 27
6e866b33
MB
28int status_vprintf(const char *status, ShowStatusFlags flags, const char *format, va_list ap) _printf_(3,0);
29int status_printf(const char *status, ShowStatusFlags flags, const char *format, ...) _printf_(3,4);