bhyveload: fix from loading undefined size.

We were setting an incorrect/undefined size and as it came out the st
struct was not really being used at all. This was actually a bug but
by sheer luck it had no visual effect.

CID:		1194320
Reviewed by:	grehan
This commit is contained in:
Pedro F. Giffuni 2016-04-06 00:01:03 +00:00
parent b6348be7b9
commit 8f61276d40
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297599

View File

@ -152,7 +152,6 @@ struct cb_file {
static int
cb_open(void *arg, const char *filename, void **hp)
{
struct stat st;
struct cb_file *cf;
char path[PATH_MAX];
@ -169,7 +168,7 @@ cb_open(void *arg, const char *filename, void **hp)
return (errno);
}
cf->cf_size = st.st_size;
cf->cf_size = cf->cf_stat.st_size;
if (S_ISDIR(cf->cf_stat.st_mode)) {
cf->cf_isdir = 1;
cf->cf_u.dir = opendir(path);