Skip to content

Commit

Permalink
lib9: skip buggy S_ISCHR check in disksize on OpenBSD
Browse files Browse the repository at this point in the history
The portable code is already checking S_ISCHR anyway.
  • Loading branch information
rsc committed Jun 16, 2024
1 parent e243a4c commit e9cbe46
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/lib9/_p9dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e9cbe46

Please sign in to comment.