From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH v2 1/3] Revert "wic: Warn if an ext filesystem affected by the Y2038 problem is used"
Date: Tue, 29 Jun 2021 11:22:23 +0200 [thread overview]
Message-ID: <20210629092225.18415-2-ubely@ilbers.de> (raw)
In-Reply-To: <20210629092225.18415-1-ubely@ilbers.de>
From: Florian Bezdeka <florian.bezdeka@siemens.com>
This reverts commit aa5dd75a7314798bba5b413eea2886983449bd28.
Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
scripts/lib/wic/partition.py | 38 ------------------------------------
1 file changed, 38 deletions(-)
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 4a5a31e..85eb15c 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -270,8 +270,6 @@ class Partition():
mkfs_cmd = "fsck.%s -pvfD %s" % (self.fstype, rootfs)
exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
- self.check_for_Y2038_problem(rootfs, native_sysroot)
-
def prepare_rootfs_btrfs(self, rootfs, oe_builddir, rootfs_dir,
native_sysroot, pseudo):
"""
@@ -358,8 +356,6 @@ class Partition():
(self.fstype, extraopts, label_str, self.fsuuid, rootfs)
exec_native_cmd(mkfs_cmd, native_sysroot)
- self.check_for_Y2038_problem(rootfs, native_sysroot)
-
def prepare_empty_partition_btrfs(self, rootfs, oe_builddir,
native_sysroot):
"""
@@ -421,37 +417,3 @@ class Partition():
mkswap_cmd = "mkswap %s -U %s %s" % (label_str, self.fsuuid, path)
exec_native_cmd(mkswap_cmd, native_sysroot)
-
- def check_for_Y2038_problem(self, rootfs, native_sysroot):
- """
- Check if the filesystem is affected by the Y2038 problem
- (Y2038 problem = 32 bit time_t overflow in January 2038)
- """
- def get_err_str(part):
- err = "The {} filesystem {} has no Y2038 support."
- if part.mountpoint:
- args = [part.fstype, "mounted at %s" % part.mountpoint]
- elif part.label:
- args = [part.fstype, "labeled %s" % part.label]
- elif part.part_name:
- args = [part.fstype, "in partition %s" % part.part_name]
- else:
- args = [part.fstype, ""]
- return err.format(*args)
-
- ret, out = exec_native_cmd("dumpe2fs %s" % rootfs, native_sysroot)
-
- # ext2 and ext3 are always affected by the Y2038 problem
- if self.fstype in ["ext2", "ext3"]:
- logger.warn(get_err_str(self))
- return
-
- # if ext4 is affected by the Y2038 problem depends on the inode size
- # Remember: inode size depends on the file system size
- for line in out.splitlines():
- if line.startswith("Inode size:"):
- size = int(line.split(":")[1].strip())
- if size < 256:
- logger.warn("%s Inodes (of size %d) are too small." % \
- (get_err_str(self), size))
- break
\ No newline at end of file
--
2.20.1
next prev parent reply other threads:[~2021-06-29 9:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 9:22 [PATCH v2 0/3] wic: Update to the latest revision Uladzimir Bely
2021-06-29 9:22 ` Uladzimir Bely [this message]
2021-06-29 9:22 ` [PATCH v2 2/3] " Uladzimir Bely
2021-08-09 13:53 ` Henning Schild
2021-08-13 9:35 ` Uladzimir Bely
2021-08-13 14:19 ` Henning Schild
2021-06-29 9:22 ` [PATCH v2 3/3] wic: Force mke2fs to use Y2038-compatible inode size Uladzimir Bely
2021-08-04 12:03 ` [PATCH v2 0/3] wic: Update to the latest revision Anton Mikanovich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210629092225.18415-2-ubely@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox