From e9cbe46fe6a262428a52ce7f065c98e43a70d499 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 15 Jun 2024 22:15:04 -0400 Subject: [PATCH] lib9: skip buggy S_ISCHR check in disksize on OpenBSD The portable code is already checking S_ISCHR anyway. --- src/lib9/_p9dir.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib9/_p9dir.c b/src/lib9/_p9dir.c index 58c63573..19de921c 100644 --- a/src/lib9/_p9dir.c +++ b/src/lib9/_p9dir.c @@ -51,8 +51,6 @@ disksize(int fd, struct stat *st) struct disklabel lab; int n; - if(!S_ISCHR(st->st_mode)) - return 0; if(ioctl(fd, DIOCGDINFO, &lab) < 0) return 0; n = minor(st->st_rdev)&7;