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:
parent
577607dffc
commit
16ce739aba
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user