blkpack: Remove usage of nonstandard d_type

The man page says it's not always available and it caused problems
under some FSes. The condition is not needed in the context of
blk/, let's scrap it.
This commit is contained in:
Virgil Dupras 2020-06-08 06:38:33 -04:00
parent a36db99651
commit bcddfd461d

View File

@ -29,9 +29,6 @@ int main(int argc, char *argv[])
if ((strcmp(ep->d_name, ".") == 0) || strcmp(ep->d_name, "..") == 0) { if ((strcmp(ep->d_name, ".") == 0) || strcmp(ep->d_name, "..") == 0) {
continue; continue;
} }
if (ep->d_type != DT_REG) {
continue;
}
int blkid = atoi(ep->d_name); int blkid = atoi(ep->d_name);
if (blkid >= blkcnt) { if (blkid >= blkcnt) {
int newcnt = blkid+1; int newcnt = blkid+1;