lib9: skip buggy S_ISCHR check in disksize on OpenBSD

The portable code is already checking S_ISCHR anyway.
This commit is contained in:
Russ Cox 2024-06-15 22:15:04 -04:00
parent e243a4c391
commit e9cbe46fe6

View file

@ -51,8 +51,6 @@ disksize(int fd, struct stat *st)
struct disklabel lab; struct disklabel lab;
int n; int n;
if(!S_ISCHR(st->st_mode))
return 0;
if(ioctl(fd, DIOCGDINFO, &lab) < 0) if(ioctl(fd, DIOCGDINFO, &lab) < 0)
return 0; return 0;
n = minor(st->st_rdev)&7; n = minor(st->st_rdev)&7;