summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-10-18 19:15:01 +0200
committerGitHub <noreply@github.com>2024-10-18 19:15:01 +0200
commit12e58ab18df31e8009e3cc5e55a3d4b738f9bef0 (patch)
treef12841f131c4ffe41789f46980dc0aaf99fac9d1
parentMerge pull request #34783 from keszybz/man-nspawn-private-users (diff)
parentdissect-image: generate better log message for EUCLEAN dissect error (diff)
downloadsystemd-12e58ab18df31e8009e3cc5e55a3d4b738f9bef0.tar.xz
systemd-12e58ab18df31e8009e3cc5e55a3d4b738f9bef0.zip
Merge pull request #34820 from poettering/dissect-image-uclean
dissect-image: generate better log message for EUCLEAN dissect error
-rw-r--r--src/shared/dissect-image.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c
index 4585582523..86fd1ef865 100644
--- a/src/shared/dissect-image.c
+++ b/src/shared/dissect-image.c
@@ -708,7 +708,9 @@ static int dissect_image(
* Returns -ERFKILL if image doesn't match image policy
* Returns -EBADR if verity data was provided externally for an image that has a GPT partition table (i.e. is not just a naked fs)
* Returns -EPROTONOSUPPORT if DISSECT_IMAGE_ADD_PARTITION_DEVICES is set but the block device does not have partition logic enabled
- * Returns -ENOMSG if we didn't find a single usable partition (and DISSECT_IMAGE_REFUSE_EMPTY is set) */
+ * Returns -ENOMSG if we didn't find a single usable partition (and DISSECT_IMAGE_REFUSE_EMPTY is set)
+ * Returns -EUCLEAN if some file system had an ambiguous file system superblock signature
+ */
uint64_t diskseq = m->loop ? m->loop->diskseq : 0;
@@ -1659,13 +1661,16 @@ int dissect_log_error(int log_level, int r, const char *name, const VeritySettin
name, strna(verity ? verity->data_path : NULL));
case -ERFKILL:
- return log_full_errno(log_level, r, "%s: image does not match image policy.", name);
+ return log_full_errno(log_level, r, "%s: Image does not match image policy.", name);
case -ENOMSG:
- return log_full_errno(log_level, r, "%s: no suitable partitions found.", name);
+ return log_full_errno(log_level, r, "%s: No suitable partitions found.", name);
+
+ case -EUCLEAN:
+ return log_full_errno(log_level, r, "%s: Partition with ambiguous file system superblock signature found.", name);
default:
- return log_full_errno(log_level, r, "%s: cannot dissect image: %m", name);
+ return log_full_errno(log_level, r, "%s: Cannot dissect image: %m", name);
}
}