mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 16:37:19 +09:00
shared: Remove circular dependency between image-policy.h and dissect-image.h
ImagePolicy can just be a forward declaration in dissect-image.h.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "analyze-image-policy.h"
|
||||
#include "analyze.h"
|
||||
#include "format-table.h"
|
||||
#include "image-policy.h"
|
||||
#include "terminal-util.h"
|
||||
|
||||
static int table_add_designator_line(Table *table, PartitionDesignator d, PartitionPolicyFlags f) {
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#include "format-table.h"
|
||||
#include "glob-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "image-policy.h"
|
||||
#include "locale-util.h"
|
||||
#include "log.h"
|
||||
#include "main-func.h"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "fileio.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "hostname-util.h"
|
||||
#include "image-policy.h"
|
||||
#include "ioprio-util.h"
|
||||
#include "iovec-util.h"
|
||||
#include "journal-file.h"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "io-util.h"
|
||||
#include "iovec-util.h"
|
||||
#include "label-util.h"
|
||||
#include "log.h"
|
||||
#include "mkdir-label.h"
|
||||
#include "mount-util.h"
|
||||
#include "mountpoint-util.h"
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "fd-util.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "hostname-setup.h"
|
||||
#include "image-policy.h"
|
||||
#include "io-util.h"
|
||||
#include "ioprio-util.h"
|
||||
#include "iovec-util.h"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "label-util.h"
|
||||
#include "list.h"
|
||||
#include "lock-util.h"
|
||||
#include "log.h"
|
||||
#include "loop-util.h"
|
||||
#include "loopback-setup.h"
|
||||
#include "missing_syscall.h"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "format-table.h"
|
||||
#include "fs-util.h"
|
||||
#include "glob-util.h"
|
||||
#include "image-policy.h"
|
||||
#include "journal-internal.h"
|
||||
#include "journal-util.h"
|
||||
#include "json-util.h"
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "fs-util.h"
|
||||
#include "glyph-util.h"
|
||||
#include "hostname-util.h"
|
||||
#include "image-policy.h"
|
||||
#include "kbd-util.h"
|
||||
#include "libcrypt-util.h"
|
||||
#include "locale-util.h"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "fs-util.h"
|
||||
#include "homework-cifs.h"
|
||||
#include "homework-mount.h"
|
||||
#include "log.h"
|
||||
#include "memfd-util.h"
|
||||
#include "mkdir.h"
|
||||
#include "mount-util.h"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "homework-directory.h"
|
||||
#include "homework-mount.h"
|
||||
#include "homework-quota.h"
|
||||
#include "log.h"
|
||||
#include "mkdir.h"
|
||||
#include "mount-util.h"
|
||||
#include "path-util.h"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "homework-mount.h"
|
||||
#include "homework-quota.h"
|
||||
#include "keyring-util.h"
|
||||
#include "log.h"
|
||||
#include "memory-util.h"
|
||||
#include "missing_fs.h"
|
||||
#include "missing_keyctl.h"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "home-util.h"
|
||||
#include "homework-mount.h"
|
||||
#include "homework.h"
|
||||
#include "log.h"
|
||||
#include "missing_syscall.h"
|
||||
#include "mkdir.h"
|
||||
#include "mount-util.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "build.h"
|
||||
#include "glob-util.h"
|
||||
#include "id128-print.h"
|
||||
#include "image-policy.h"
|
||||
#include "journalctl.h"
|
||||
#include "journalctl-authenticate.h"
|
||||
#include "journalctl-catalog.h"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "build.h"
|
||||
#include "dissect-image.h"
|
||||
#include "id128-util.h"
|
||||
#include "image-policy.h"
|
||||
#include "log.h"
|
||||
#include "machine-id-setup.h"
|
||||
#include "main-func.h"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "label-util.h"
|
||||
#include "log.h"
|
||||
#include "mkdir-label.h"
|
||||
#include "mount-util.h"
|
||||
#include "mountpoint-util.h"
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "hexdecoct.h"
|
||||
#include "hmac.h"
|
||||
#include "id128-util.h"
|
||||
#include "image-policy.h"
|
||||
#include "initrd-util.h"
|
||||
#include "io-util.h"
|
||||
#include "json-util.h"
|
||||
|
||||
@@ -20,6 +20,7 @@ typedef struct DecryptedImage DecryptedImage;
|
||||
typedef struct MountOptions MountOptions;
|
||||
typedef struct VeritySettings VeritySettings;
|
||||
typedef struct ImageFilter ImageFilter;
|
||||
typedef struct ImagePolicy ImagePolicy;
|
||||
typedef struct ExtensionReleaseData ExtensionReleaseData;
|
||||
|
||||
struct DissectedPartition {
|
||||
@@ -163,9 +164,6 @@ struct ExtensionReleaseData {
|
||||
char *os_release_extension_scope;
|
||||
};
|
||||
|
||||
/* We include image-policy.h down here, since ImagePolicy wants a complete definition of PartitionDesignator first. */
|
||||
#include "image-policy.h"
|
||||
|
||||
MountOptions* mount_options_free_all(MountOptions *options);
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(MountOptions*, mount_options_free_all);
|
||||
const char* mount_options_from_designator(const MountOptions *options, PartitionDesignator designator);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fdisk-util.h"
|
||||
#include "log.h"
|
||||
#include "parse-util.h"
|
||||
|
||||
#if HAVE_LIBFDISK
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
typedef struct ImagePolicy ImagePolicy;
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "dissect-image.h"
|
||||
#include "errno-list.h"
|
||||
@@ -48,11 +46,11 @@ typedef struct PartitionPolicy {
|
||||
PartitionPolicyFlags flags;
|
||||
} PartitionPolicy;
|
||||
|
||||
struct ImagePolicy {
|
||||
typedef struct ImagePolicy {
|
||||
PartitionPolicyFlags default_flags; /* for any designator not listed in the list below */
|
||||
size_t n_policies;
|
||||
PartitionPolicy policies[]; /* sorted by designator, hence suitable for binary search */
|
||||
};
|
||||
} ImagePolicy;
|
||||
|
||||
/* Default policies for various use cases */
|
||||
extern const ImagePolicy image_policy_allow;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
#include "id128-util.h"
|
||||
#include "log.h"
|
||||
#include "mkfs-util.h"
|
||||
#include "mount-util.h"
|
||||
#include "mountpoint-util.h"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "initrd-util.h"
|
||||
#include "label-util.h"
|
||||
#include "libmount-util.h"
|
||||
#include "log.h"
|
||||
#include "missing_syscall.h"
|
||||
#include "mkdir-label.h"
|
||||
#include "mount-util.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "fs-util.h"
|
||||
#include "fstab-util.h"
|
||||
#include "libmount-util.h"
|
||||
#include "log.h"
|
||||
#include "mkdir.h"
|
||||
#include "mount-setup.h"
|
||||
#include "mount-util.h"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "format-table.h"
|
||||
#include "glyph-util.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "image-policy.h"
|
||||
#include "json-util.h"
|
||||
#include "main-func.h"
|
||||
#include "mount-util.h"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "image-policy.h"
|
||||
#include "libcrypt-util.h"
|
||||
#include "main-func.h"
|
||||
#include "memory-util.h"
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "fs-util.h"
|
||||
#include "glob-util.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "image-policy.h"
|
||||
#include "io-util.h"
|
||||
#include "label-util.h"
|
||||
#include "log.h"
|
||||
|
||||
Reference in New Issue
Block a user