summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyveload
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2016-04-06 01:44:21 +0000
committergjb <gjb@FreeBSD.org>2016-04-06 01:44:21 +0000
commit5fec2ae02d4c395fbaf2b7fc2c1886261de6fffa (patch)
tree4e392cf9bc6cfa93ebca841a52b3b1a40702f7ee /usr.sbin/bhyveload
parent0fbf2c0dab5e5c8490a06e915b67e939b0dce0b6 (diff)
downloadFreeBSD-src-5fec2ae02d4c395fbaf2b7fc2c1886261de6fffa.zip
FreeBSD-src-5fec2ae02d4c395fbaf2b7fc2c1886261de6fffa.tar.gz
MFH
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'usr.sbin/bhyveload')
-rw-r--r--usr.sbin/bhyveload/bhyveload.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c
index 8417f2a..9df680f 100644
--- a/usr.sbin/bhyveload/bhyveload.c
+++ b/usr.sbin/bhyveload/bhyveload.c
@@ -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);
OpenPOWER on IntegriCloud