From: Jiang XueQian Date: Sat, 30 Aug 2025 09:02:59 +0000 (+0800) Subject: zramctl: ignore ENOENT when setting max_comp_streams X-Git-Tag: v2.41.2-rc1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3965e4cfa1adf7b988bc80a8e613b9501ccd4fa;p=thirdparty%2Futil-linux.git zramctl: ignore ENOENT when setting max_comp_streams The `max_comp_streams` attribute of zram devices has been deprecated and all writes were silently ignored by the kernel since 2016. It was finally removed in 6.15, causing zramctl to fail on ENOENT, when it should just ignore the error. Signed-off-by: Jiang XueQian (cherry picked from commit e4514111ebb6df5f22a0769a9dfb2338b9c6c81a) --- diff --git a/sys-utils/zramctl.c b/sys-utils/zramctl.c index a8390efe5..1a5b42599 100644 --- a/sys-utils/zramctl.c +++ b/sys-utils/zramctl.c @@ -795,7 +795,8 @@ int main(int argc, char **argv) err(EXIT_FAILURE, _("%s: failed to reset"), zram->devname); if (nstreams && - zram_set_u64parm(zram, "max_comp_streams", nstreams)) + zram_set_u64parm(zram, "max_comp_streams", nstreams) && + errno != ENOENT) err(EXIT_FAILURE, _("%s: failed to set number of streams"), zram->devname); if (algorithm &&