Prevent savecore from reading bounds from the current directory.

Rev 244218 removed the requirement that you provide a dump
directory when checking if there is a coredump ready to be written.
That had the side-effect of causing the bounds file to be read
from the current working directory instead of the dump directory.
As the bounds file is irrelevant when just checking, the simplest
fix is to not read the bounds file when checking.

Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D14383
This commit is contained in:
Mike Silbersack 2018-02-16 06:51:39 +00:00
parent a4d179eeb6
commit b761400b51
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329362

View File

@ -172,6 +172,13 @@ getbounds(void)
char buf[6];
int ret;
/*
* If we are just checking, then we haven't done a chdir to the dump
* directory and we should not try to read a bounds file.
*/
if (checkfor)
return (0);
ret = 0;
if ((fp = fopen("bounds", "r")) == NULL) {