Check if VNIOCGET failed to retrieve the path of the regular
file, that is associated with the respective vn device. If so,
treat this kind of error as non-fatal (with respect to the rest
of the vn devices).
else {
if (ioctl(vd, VNIOCGET, &vnu) == -1) {
if (errno != ENXIO) {
- err(1, "ioctl: %s", vname);
- close(vd);
- return 1;
+ if (*vnu.vnu_file == '\0') {
+ fprintf(stdout,
+ "vn%d: ioctl: can't access regular file\n",
+ vnu.vnu_unit);
+ continue;
+ }
+ else {
+ err(1, "ioctl: %s", vname);
+ close(vd);
+ return 1;
+ }
}
}