Date: Thu, 16 Apr 2015 20:11:50 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281611 - head/usr.sbin/bhyve Message-ID: <201504162011.t3GKBoRX057233@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: neel Date: Thu Apr 16 20:11:49 2015 New Revision: 281611 URL: https://svnweb.freebsd.org/changeset/base/281611 Log: If the number of guest vcpus is less than '1' then flag it as an error. MFC after: 1 week Modified: head/usr.sbin/bhyve/bhyverun.c Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Thu Apr 16 19:23:08 2015 (r281610) +++ head/usr.sbin/bhyve/bhyverun.c Thu Apr 16 20:11:49 2015 (r281611) @@ -805,6 +805,11 @@ main(int argc, char *argv[]) exit(1); } + if (guest_ncpus < 1) { + fprintf(stderr, "Invalid guest vCPUs (%d)\n", guest_ncpus); + exit(1); + } + max_vcpus = num_vcpus_allowed(ctx); if (guest_ncpus > max_vcpus) { fprintf(stderr, "%d vCPUs requested but only %d available\n",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504162011.t3GKBoRX057233>