From mboxrd@z Thu Jan 1 00:00:00 1970 From: "W. Michael Petullo" Subject: Re: Using "xl create" without domain config file Date: Sat, 2 Jun 2012 09:19:03 -0500 Message-ID: <20120602141903.GA2903@imp.flyn.org> References: <20120531045040.GA16124@imp.flyn.org> <20425.863.785362.721748@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20425.863.785362.721748@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >> I found it useful to use xm without a domain configuration file: >> >> xm create /dev/null kernel=... >> >> The xl command does not support this. See a previous thread I started: >> >> http://lists.xen.org/archives/html/xen-devel/2011-08/msg00330.html > I would be happy to support the /dev/null form. This patch supports the /dev/null form. # HG changeset patch # Parent 435493696053a079ec17d6e1a63e5f2be3a2c9d0 xl: Allow use of /dev/null with xl create to enable command-line definition xm allows specifying /dev/null as the domain configuration argument to its create option; add same functionality to xl. Whereas xl used to check to ensure the domain configuration argument was a regular file, it now checks to ensure it is not a directory. This allows specifying an entire domain configuration on the command line. Signed-off-by: W. Michael Petullo diff -r 435493696053 tools/libxl/libxl_utils.c --- a/tools/libxl/libxl_utils.c Fri May 25 08:18:47 2012 +0100 +++ b/tools/libxl/libxl_utils.c Sat Jun 02 09:11:27 2012 -0500 @@ -324,8 +324,8 @@ int libxl_read_file_contents(libxl_ctx * goto xe; } - if (!S_ISREG(stab.st_mode)) { - LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "%s is not a plain file", filename); + if (S_ISDIR(stab.st_mode)) { + LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "%s is a directory", filename); errno = ENOTTY; goto xe; }