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
b6348be7b9
commit
8f61276d40
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297599
@ -152,7 +152,6 @@ struct cb_file {
|
|||||||
static int
|
static int
|
||||||
cb_open(void *arg, const char *filename, void **hp)
|
cb_open(void *arg, const char *filename, void **hp)
|
||||||
{
|
{
|
||||||
struct stat st;
|
|
||||||
struct cb_file *cf;
|
struct cb_file *cf;
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
|
|
||||||
@ -169,7 +168,7 @@ cb_open(void *arg, const char *filename, void **hp)
|
|||||||
return (errno);
|
return (errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
cf->cf_size = st.st_size;
|
cf->cf_size = cf->cf_stat.st_size;
|
||||||
if (S_ISDIR(cf->cf_stat.st_mode)) {
|
if (S_ISDIR(cf->cf_stat.st_mode)) {
|
||||||
cf->cf_isdir = 1;
|
cf->cf_isdir = 1;
|
||||||
cf->cf_u.dir = opendir(path);
|
cf->cf_u.dir = opendir(path);
|
||||||
|
Loading…
Reference in New Issue
Block a user