patch-2.1.17 linux/scripts/mkdep.c
Next file: linux/CREDITS
Previous file: linux/net/unix/af_unix.c
Back to the patch index
Back to the overall index
- Lines: 12
- Date:
Thu Dec 19 11:03:37 1996
- Orig file:
v2.1.16/linux/scripts/mkdep.c
- Orig date:
Thu Dec 12 19:37:32 1996
diff -u --recursive --new-file v2.1.16/linux/scripts/mkdep.c linux/scripts/mkdep.c
@@ -235,6 +235,10 @@
return;
}
fstat(fd, &st);
+ if (st.st_size == 0) {
+ fprintf(stderr,"%s is empty\n",filename);
+ return;
+ }
mapsize = st.st_size + 2*sizeof(unsigned long);
mapsize = (mapsize+pagesizem1) & ~pagesizem1;
map = mmap(NULL, mapsize, PROT_READ, MAP_PRIVATE, fd, 0);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov