It looks like mkfs.ext2 is no longer universally available.
While mkfs.ext4 can still create ext2 filesystems,
mount won't necessarily still support mounting those.
Change-Id: I7a404b9a8feca5a281543f6fad1b50c0566cf574
{
const auto child_pid = OS::throwing_fork();
if (child_pid == 0) {
- const auto mkfs = "/usr/sbin/mkfs.ext2"sv;
+ const auto mkfs = "/usr/sbin/mkfs.ext4"sv;
/* Would ideally be std::format instead of this ugly stack,
* but some important downstream forks use obsolete gcc. */
execl
( mkfs.data(), mkfs.data() /* argv[0] convention */
+ , "-t", "ext4"
, "-E", owner_arg.c_str()
, "-m", "0"
, image_path.c_str()
_exit(1);
} else {
- OS::throw_if_child_failed(child_pid, "mkfs.ext2 failed!");
+ OS::throw_if_child_failed(child_pid, "mkfs.ext4 failed!");
}
}