[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Using "xl create" without domain config file



>> 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 <mike@xxxxxxxx>

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;
     }

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.