committed by
Yu Watanabe
parent
54f3008a1e
commit
5cf0b3b5bc
@@ -1,5 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "memory-util.h"
|
||||
#include "sysupdate-cache.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "hashmap.h"
|
||||
#include "sysupdate-forward.h"
|
||||
|
||||
typedef struct WebCacheItem {
|
||||
char *url;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "conf-parser.h"
|
||||
#include "hash-funcs.h"
|
||||
#include "path-util.h"
|
||||
#include "string-util.h"
|
||||
#include "sysupdate.h"
|
||||
#include "sysupdate-feature.h"
|
||||
#include "web-util.h"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "hash-funcs.h"
|
||||
#include "memory-util.h"
|
||||
#include "sysupdate-forward.h"
|
||||
|
||||
typedef struct Feature {
|
||||
unsigned n_ref;
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h" /* IWYU pragma: export */
|
||||
|
||||
typedef struct Context Context;
|
||||
typedef struct PartitionInfo PartitionInfo;
|
||||
typedef struct Resource Resource;
|
||||
typedef struct Instance Instance;
|
||||
typedef struct InstanceMetadata InstanceMetadata;
|
||||
@@ -1,8 +1,5 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "log.h"
|
||||
#include "sysupdate-instance.h"
|
||||
|
||||
@@ -1,18 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
|
||||
#include "fs-util.h"
|
||||
#include "sysupdate-forward.h"
|
||||
#include "sysupdate-partition.h"
|
||||
#include "time-util.h"
|
||||
|
||||
typedef struct Resource Resource;
|
||||
typedef struct Instance Instance;
|
||||
|
||||
typedef struct InstanceMetadata {
|
||||
/* Various bits of metadata for each instance, that is either derived from the filename/GPT label or
|
||||
|
||||
@@ -3,12 +3,9 @@
|
||||
#include <sys/file.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fdisk-util.h"
|
||||
#include "gpt.h"
|
||||
#include "id128-util.h"
|
||||
#include "log.h"
|
||||
#include "parse-util.h"
|
||||
#include "stdio-util.h"
|
||||
#include "string-util.h"
|
||||
#include "sysupdate-partition.h"
|
||||
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
|
||||
#include "fdisk-util.h"
|
||||
#include "macro.h"
|
||||
|
||||
typedef struct PartitionInfo PartitionInfo;
|
||||
#include "sysupdate-forward.h"
|
||||
|
||||
typedef enum PartitionChange {
|
||||
PARTITION_FLAGS = 1 << 0,
|
||||
@@ -23,7 +16,7 @@ typedef enum PartitionChange {
|
||||
_PARTITION_CHANGE_INVALID = -EINVAL,
|
||||
} PartitionChange;
|
||||
|
||||
struct PartitionInfo {
|
||||
typedef struct PartitionInfo {
|
||||
size_t partno;
|
||||
uint64_t start, size;
|
||||
uint64_t flags;
|
||||
@@ -33,7 +26,7 @@ struct PartitionInfo {
|
||||
bool no_auto;
|
||||
bool read_only;
|
||||
bool growfs;
|
||||
};
|
||||
} PartitionInfo;
|
||||
|
||||
#define PARTITION_INFO_NULL \
|
||||
{ \
|
||||
|
||||
@@ -5,12 +5,11 @@
|
||||
#include "list.h"
|
||||
#include "log.h"
|
||||
#include "parse-util.h"
|
||||
#include "path-util.h"
|
||||
#include "stdio-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "sysupdate-instance.h"
|
||||
#include "sysupdate-pattern.h"
|
||||
#include "time-util.h"
|
||||
|
||||
typedef enum PatternElementType {
|
||||
PATTERN_LITERAL,
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "time-util.h"
|
||||
|
||||
typedef struct InstanceMetadata InstanceMetadata;
|
||||
#include "sysupdate-forward.h"
|
||||
|
||||
enum {
|
||||
PATTERN_MATCH_NO,
|
||||
|
||||
@@ -11,25 +11,26 @@
|
||||
#include "device-util.h"
|
||||
#include "devnum-util.h"
|
||||
#include "dirent-util.h"
|
||||
#include "env-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fdisk-util.h"
|
||||
#include "fileio.h"
|
||||
#include "find-esp.h"
|
||||
#include "glyph-util.h"
|
||||
#include "gpt.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "import-util.h"
|
||||
#include "macro.h"
|
||||
#include "missing_magic.h"
|
||||
#include "process-util.h"
|
||||
#include "sort-util.h"
|
||||
#include "stat-util.h"
|
||||
#include "string-table.h"
|
||||
#include "strv.h"
|
||||
#include "sysupdate.h"
|
||||
#include "sysupdate-cache.h"
|
||||
#include "sysupdate-instance.h"
|
||||
#include "sysupdate-pattern.h"
|
||||
#include "sysupdate-resource.h"
|
||||
#include "time-util.h"
|
||||
#include "utf8.h"
|
||||
|
||||
void resource_destroy(Resource *rr) {
|
||||
|
||||
@@ -1,16 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "gpt.h"
|
||||
#include "hashmap.h"
|
||||
#include "macro.h"
|
||||
|
||||
typedef struct Resource Resource;
|
||||
typedef struct Instance Instance;
|
||||
#include "sysupdate-forward.h"
|
||||
|
||||
typedef enum ResourceType {
|
||||
RESOURCE_URL_FILE,
|
||||
@@ -76,7 +68,7 @@ typedef enum PathRelativeTo {
|
||||
_PATH_RELATIVE_TO_INVALID = -EINVAL,
|
||||
} PathRelativeTo;
|
||||
|
||||
struct Resource {
|
||||
typedef struct Resource {
|
||||
ResourceType type;
|
||||
|
||||
/* Where to look for instances, and what to match precisely */
|
||||
@@ -93,7 +85,7 @@ struct Resource {
|
||||
|
||||
/* If this is a partition resource (RESOURCE_PARTITION), then how many partition slots are currently unassigned, that we can use */
|
||||
size_t n_empty;
|
||||
};
|
||||
} Resource;
|
||||
|
||||
void resource_destroy(Resource *rr);
|
||||
|
||||
|
||||
@@ -1,18 +1,23 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "blockdev-util.h"
|
||||
#include "build-path.h"
|
||||
#include "chase.h"
|
||||
#include "conf-parser.h"
|
||||
#include "dirent-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "event-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "glyph-util.h"
|
||||
#include "gpt.h"
|
||||
#include "hashmap.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "install-file.h"
|
||||
#include "mkdir.h"
|
||||
@@ -20,13 +25,11 @@
|
||||
#include "parse-helpers.h"
|
||||
#include "parse-util.h"
|
||||
#include "percent-util.h"
|
||||
#include "pidref.h"
|
||||
#include "process-util.h"
|
||||
#include "random-util.h"
|
||||
#include "rm-rf.h"
|
||||
#include "signal-util.h"
|
||||
#include "socket-util.h"
|
||||
#include "specifier.h"
|
||||
#include "stat-util.h"
|
||||
#include "stdio-util.h"
|
||||
#include "strv.h"
|
||||
#include "sync-util.h"
|
||||
@@ -36,6 +39,7 @@
|
||||
#include "sysupdate-pattern.h"
|
||||
#include "sysupdate-resource.h"
|
||||
#include "sysupdate-transfer.h"
|
||||
#include "time-util.h"
|
||||
#include "tmpfile-util.h"
|
||||
#include "web-util.h"
|
||||
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
|
||||
#include "sysupdate-forward.h"
|
||||
#include "sysupdate-partition.h"
|
||||
#include "sysupdate-resource.h"
|
||||
|
||||
typedef struct Context Context;
|
||||
|
||||
typedef struct Transfer {
|
||||
char *id;
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "ansi-color.h"
|
||||
#include "assert-util.h"
|
||||
#include "glyph-util.h"
|
||||
#include "sysupdate-update-set-flags.h"
|
||||
#include "terminal-util.h"
|
||||
|
||||
const char* update_set_flags_to_color(UpdateSetFlags flags) {
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "forward.h"
|
||||
|
||||
typedef enum UpdateSetFlags {
|
||||
UPDATE_NEWEST = 1 << 0,
|
||||
UPDATE_AVAILABLE = 1 << 1,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "ansi-color.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "string-util.h"
|
||||
#include "sysupdate-update-set.h"
|
||||
|
||||
|
||||
@@ -1,21 +1,15 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "sysupdate-forward.h"
|
||||
#include "sysupdate-update-set-flags.h"
|
||||
|
||||
typedef struct Instance Instance;
|
||||
typedef struct UpdateSet UpdateSet;
|
||||
|
||||
struct UpdateSet {
|
||||
typedef struct UpdateSet {
|
||||
UpdateSetFlags flags;
|
||||
char *version;
|
||||
Instance **instances;
|
||||
size_t n_instances;
|
||||
};
|
||||
} UpdateSet;
|
||||
|
||||
UpdateSet* update_set_free(UpdateSet *us);
|
||||
int update_set_cmp(UpdateSet *const*a, UpdateSet *const*b);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "glyph-util.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "image-policy.h"
|
||||
#include "json-util.h"
|
||||
#include "loop-util.h"
|
||||
#include "main-func.h"
|
||||
#include "mount-util.h"
|
||||
#include "os-util.h"
|
||||
@@ -37,7 +37,6 @@
|
||||
#include "sysupdate-transfer.h"
|
||||
#include "sysupdate-update-set.h"
|
||||
#include "sysupdate-util.h"
|
||||
#include "terminal-util.h"
|
||||
#include "utf8.h"
|
||||
#include "verbs.h"
|
||||
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "specifier.h"
|
||||
|
||||
/* Forward declare this type so that Transfers can point at it */
|
||||
typedef struct Context Context;
|
||||
#include "sysupdate-forward.h"
|
||||
|
||||
extern bool arg_sync;
|
||||
extern uint64_t arg_instances_max;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "sd-json.h"
|
||||
|
||||
@@ -9,9 +12,11 @@
|
||||
#include "bus-get-properties.h"
|
||||
#include "bus-label.h"
|
||||
#include "bus-log-control-api.h"
|
||||
#include "bus-object.h"
|
||||
#include "bus-polkit.h"
|
||||
#include "bus-util.h"
|
||||
#include "common-signal.h"
|
||||
#include "constants.h"
|
||||
#include "discover-image.h"
|
||||
#include "dropin.h"
|
||||
#include "env-util.h"
|
||||
@@ -19,19 +24,22 @@
|
||||
#include "event-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "format-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "log.h"
|
||||
#include "main-func.h"
|
||||
#include "memfd-util.h"
|
||||
#include "mkdir-label.h"
|
||||
#include "notify-recv.h"
|
||||
#include "os-util.h"
|
||||
#include "parse-util.h"
|
||||
#include "path-util.h"
|
||||
#include "pidref.h"
|
||||
#include "process-util.h"
|
||||
#include "runtime-scope.h"
|
||||
#include "service-util.h"
|
||||
#include "signal-util.h"
|
||||
#include "socket-util.h"
|
||||
#include "string-table.h"
|
||||
#include "strv.h"
|
||||
#include "sysupdate-util.h"
|
||||
#include "utf8.h"
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <locale.h>
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "sd-event.h"
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
@@ -13,20 +14,16 @@
|
||||
#include "bus-locator.h"
|
||||
#include "bus-map-properties.h"
|
||||
#include "bus-util.h"
|
||||
#include "conf-files.h"
|
||||
#include "conf-parser.h"
|
||||
#include "errno-list.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "errno-util.h"
|
||||
#include "format-table.h"
|
||||
#include "fs-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "json-util.h"
|
||||
#include "main-func.h"
|
||||
#include "os-util.h"
|
||||
#include "pager.h"
|
||||
#include "path-util.h"
|
||||
#include "polkit-agent.h"
|
||||
#include "pretty-print.h"
|
||||
#include "runtime-scope.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "sysupdate-update-set-flags.h"
|
||||
#include "sysupdate-util.h"
|
||||
|
||||
Reference in New Issue
Block a user