ashley
unread,Jun 15, 2024, 9:47:18 PM (4 days ago) Jun 15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to plan9p...@googlegroups.com
(forgot to cc the list, my bad)
hi russ,
I believe the problem is in the S_ISCHR check, which is presumably intended to
weed out character devices, but actually does the opposite. erasing the negation
seems to fix the issue.
ashley
@@ -51,7 +51,7 @@ disksize(int fd, struct stat *st)
struct disklabel lab;
int n;
- if(!S_ISCHR(st->st_mode))
+ if(S_ISCHR(st->st_mode))
return 0;
if(ioctl(fd, DIOCGDINFO, &lab) < 0)
return 0;