Date: Wed, 6 Apr 2016 00:01:04 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297599 - head/usr.sbin/bhyveload Message-ID: <201604060001.u36014jC001665@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604060001.u36014jC001665>