diff --git a/lsmod.c b/lsmod.c index fd306bc..cf3e734 100644 --- a/lsmod.c +++ b/lsmod.c @@ -45,6 +45,8 @@ main(int argc, char *argv[]) printf("%-20s%8s%3s %s\n", name, size, refcount, users); } + if (ferror(fp)) + eprintf("%s: read error:", modfile); fclose(fp); return 0; } diff --git a/lsusb.c b/lsusb.c index dfe9863..e41f127 100644 --- a/lsusb.c +++ b/lsusb.c @@ -50,6 +50,8 @@ lsusb(const char *file) break; } } + if (ferror(fp)) + eprintf("%s: read error:", path); fclose(fp); }