From 1ec9027cd4b641e7e82b5491d3ae0aaa17abbae6 Mon Sep 17 00:00:00 2001 From: Betacentauri Date: Mon, 22 Jul 2024 16:41:30 +0200 Subject: [PATCH] Remove check that the rootfs is on the same device as current used rootfs. This would prevent using other devices until it is specified explicitly via command line. Thanks luisteraar! --- cmdline_parser.c | 2 +- ofgwrite.c | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/cmdline_parser.c b/cmdline_parser.c index 0560368..11d9da0 100644 --- a/cmdline_parser.c +++ b/cmdline_parser.c @@ -103,7 +103,7 @@ int search_via_part_names(char* device_table) return 1; else { - my_printf("Error: Wrong formatted blkdevparts in /proc/cmdline\n"); + my_printf("No partitions found in /proc/cmdline\n"); return -1; } } diff --git a/ofgwrite.c b/ofgwrite.c index 9d4d672..d621d05 100644 --- a/ofgwrite.c +++ b/ofgwrite.c @@ -100,7 +100,7 @@ char *boxname = NULL; enum RootfsTypeEnum rootfs_type; int stop_e2_needed = 1; -const char ofgwrite_version[] = "4.6.8"; +const char ofgwrite_version[] = "4.6.9"; struct struct_mountlist { @@ -1394,14 +1394,6 @@ void ext4_kernel_dev_found(const char* dev, int partition_number) void ext4_rootfs_dev_found(const char* dev, int partition_number) { - // Check whether rootfs is on the same device as current used rootfs - sprintf(rootfs_device, "%sp", dev); - if (strncmp(rootfs_device, current_rootfs_device, strlen(rootfs_device)) != 0) - { - my_printf("Rootfs(%s) is on different device than current rootfs(%s). Maybe wrong device selected. -> Aborting\n", dev, current_rootfs_device); - return; - } - found_rootfs_device = 1; rootfs_flash_mode = TARBZ2; sprintf(rootfs_device, "%sp%d", dev, partition_number);