svn commit: r297599 - head/usr.sbin/bhyveload
Pedro F. Giffuni
pfg at FreeBSD.org
Wed Apr 6 00:01:05 UTC 2016
Author: pfg
Date: Wed Apr 6 00:01:03 2016
New Revision: 297599
URL: https://svnweb.freebsd.org/changeset/base/297599
Log:
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
Modified:
head/usr.sbin/bhyveload/bhyveload.c
Modified: head/usr.sbin/bhyveload/bhyveload.c
==============================================================================
--- head/usr.sbin/bhyveload/bhyveload.c Tue Apr 5 23:24:17 2016 (r297598)
+++ head/usr.sbin/bhyveload/bhyveload.c Wed Apr 6 00:01:03 2016 (r297599)
@@ -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,
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);
More information about the svn-src-head
mailing list