From: tb Date: Thu, 10 Feb 2022 11:14:04 +0000 (+0000) Subject: Only show the 'not enough inodes' warning if the filesystem reports more X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=dadcb260b6da63c3a0ed39b8d8d4fbac721baa95;p=openbsd Only show the 'not enough inodes' warning if the filesystem reports more than zero free inodes. btrfs always reports zero inodes, so on linux distros like fedora, users will always see the not enough space warning, which it is a bit ugly. fine with claudio --- diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index 84bae597ea1..2e8645d673a 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.187 2022/01/28 15:30:23 claudio Exp $ */ +/* $OpenBSD: main.c,v 1.188 2022/02/10 11:14:04 tb Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -695,7 +695,8 @@ check_fs_size(int fd, const char *cachedir) if (fstatvfs(fd, &fs) == -1) err(1, "statfs %s", cachedir); - if (fs.f_bavail < minsize / fs.f_frsize || fs.f_favail < minnode) { + if (fs.f_bavail < minsize / fs.f_frsize || + (fs.f_favail > 0 && fs.f_favail < minnode)) { fprintf(stderr, "WARNING: rpki-client may need more than " "the available disk space\n" "on the file-system holding %s.\n", cachedir);