From 415d12888ffec1d4f8e0a89944e5423f978250bc Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Wed, 4 Nov 2026 09:59:31 +0100 Subject: [PATCH] fs: Tell resize.f2fs to stop asking questions --- src/plugins/fs/f2fs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/fs/f2fs.c b/src/plugins/fs/f2fs.c index f538f723..638ff101 100644 --- a/src/plugins/fs/f2fs.c +++ b/src/plugins/fs/f2fs.c @@ -376,7 +376,8 @@ BDFSF2FSInfo* bd_fs_f2fs_get_info (const gchar *device, GError **error) { * Tech category: %BD_FS_TECH_F2FS-%BD_FS_TECH_MODE_RESIZE */ gboolean bd_fs_f2fs_resize (const gchar *device, guint64 new_size, gboolean safe, const BDExtraArg **extra, GError **error) { - const gchar *args[6] = {"resize.f2fs", NULL, NULL, NULL, NULL, NULL}; + const gchar *args[7] = {"resize.f2fs", NULL, NULL, NULL, NULL, NULL, NULL}; + UtilDep dep = {"resize.f2fs", "1.17.0", "-V", "resize.f2fs\\s+([\\d\\.]+).+"}; gchar *size_str = NULL; gboolean ret = FALSE; guint next_arg = 1; @@ -410,6 +411,10 @@ gboolean bd_fs_f2fs_resize (const gchar *device, guint64 new_size, gboolean safe } bd_fs_f2fs_info_free (info); + /* f2fs-tools >= 1.17.0 requires -F to avoid an interactive prompt. */ + if (bd_utils_check_util_version (dep.name, dep.version, dep.ver_arg, dep.ver_regexp, NULL)) + args[next_arg++] = "-F"; + if (safe) { args[next_arg++] = "-s"; }