Skip to content

Commit

Permalink
Remove check that the rootfs is on the same device
Browse files Browse the repository at this point in the history
as current used rootfs. This would prevent using
other devices until it is specified explicitly via
command line.
Thanks luisteraar!
  • Loading branch information
betacentauri committed Jul 22, 2024
1 parent 558c5b9 commit 1ec9027
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cmdline_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
10 changes: 1 addition & 9 deletions ofgwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1ec9027

Please sign in to comment.