All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix the bad directory path "/var/lib/xen/"
@ 2007-06-20 15:34 Cui, Dexuan
  2007-06-20 15:37 ` Daniel P. Berrange
  0 siblings, 1 reply; 3+ messages in thread
From: Cui, Dexuan @ 2007-06-20 15:34 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 221 bytes --]

The "/var/lib/xen/" in changeset 15241: b0109d3dc3dd should be
"/var/xen/" -- actually "/var/lib/xen/" doesn't exist, and this causes
the save/restore to complain.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>


[-- Attachment #2: fix_bad_file_path.patch --]
[-- Type: application/octet-stream, Size: 2740 bytes --]

diff -r 3187ffc5272c tools/ioemu/target-i386-dm/helper2.c
--- a/tools/ioemu/target-i386-dm/helper2.c	Wed Jun 20 14:57:49 2007 +0100
+++ b/tools/ioemu/target-i386-dm/helper2.c	Wed Jun 20 23:01:05 2007 +0800
@@ -635,7 +635,7 @@ int main_loop(void)
     main_loop_wait(1); /* For the select() on events */
 
     /* Save the device state */
-    snprintf(qemu_file, sizeof(qemu_file), "/var/lib/xen/qemu-save.%d", domid);
+    snprintf(qemu_file, sizeof(qemu_file), "/var/xen/qemu-save.%d", domid);
     do_savevm(qemu_file);
 
     return 0;
diff -r 3187ffc5272c tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py	Wed Jun 20 14:57:49 2007 +0100
+++ b/tools/python/xen/xend/XendCheckpoint.py	Wed Jun 20 23:02:19 2007 +0800
@@ -111,7 +111,7 @@ def save(fd, dominfo, network, live, dst
         # put qemu device model state
         if hvm:
             write_exact(fd, QEMU_SIGNATURE, "could not write qemu signature")
-            qemu_fd = os.open("/var/lib/xen/qemu-save.%d" % dominfo.getDomid(),
+            qemu_fd = os.open("/var/xen/qemu-save.%d" % dominfo.getDomid(),
                               os.O_RDONLY)
             while True:
                 buf = os.read(qemu_fd, dm_batch)
@@ -120,7 +120,7 @@ def save(fd, dominfo, network, live, dst
                 else:
                     break
             os.close(qemu_fd)
-            os.remove("/var/lib/xen/qemu-save.%d" % dominfo.getDomid())
+            os.remove("/var/xen/qemu-save.%d" % dominfo.getDomid())
 
         if checkpoint:
             dominfo.resumeDomain()
@@ -239,7 +239,7 @@ def restore(xd, fd, dominfo = None, paus
             if qemu_signature != QEMU_SIGNATURE:
                 raise XendError("not a valid device model state: found '%s'" %
                                 qemu_signature)
-            qemu_fd = os.open("/var/lib/xen/qemu-save.%d" % dominfo.getDomid(),
+            qemu_fd = os.open("/var/xen/qemu-save.%d" % dominfo.getDomid(),
                               os.O_WRONLY | os.O_CREAT | os.O_TRUNC)
             while True:
                 buf = os.read(fd, dm_batch)
diff -r 3187ffc5272c tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py	Wed Jun 20 14:57:49 2007 +0100
+++ b/tools/python/xen/xend/image.py	Wed Jun 20 23:02:45 2007 +0800
@@ -428,7 +428,7 @@ class HVMImageHandler(ImageHandler):
                              (self.getRequiredInitialReservation() / 1024) ])
         args = args + self.dmargs
         if restore:
-            args = args + ([ "-loadvm", "/var/lib/xen/qemu-save.%d" %
+            args = args + ([ "-loadvm", "/var/xen/qemu-save.%d" %
                              self.vm.getDomid() ])
         env = dict(os.environ)
         if self.display:

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix the bad directory path "/var/lib/xen/"
  2007-06-20 15:34 [PATCH] Fix the bad directory path "/var/lib/xen/" Cui, Dexuan
@ 2007-06-20 15:37 ` Daniel P. Berrange
  2007-06-20 15:58   ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel P. Berrange @ 2007-06-20 15:37 UTC (permalink / raw)
  To: Cui, Dexuan; +Cc: xen-devel

On Wed, Jun 20, 2007 at 11:34:34PM +0800, Cui, Dexuan wrote:
> The "/var/lib/xen/" in changeset 15241: b0109d3dc3dd should be
> "/var/xen/" -- actually "/var/lib/xen/" doesn't exist, and this causes
> the save/restore to complain.

No this is wrong. Nothing should be in /var/xen - this is not FHS compliant
If the /var/lib/xen directory is not present, then the Makefile should be
fixed to create it.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix the bad directory path "/var/lib/xen/"
  2007-06-20 15:37 ` Daniel P. Berrange
@ 2007-06-20 15:58   ` Keir Fraser
  0 siblings, 0 replies; 3+ messages in thread
From: Keir Fraser @ 2007-06-20 15:58 UTC (permalink / raw)
  To: Daniel P. Berrange, Cui, Dexuan; +Cc: xen-devel

On 20/6/07 16:37, "Daniel P. Berrange" <berrange@redhat.com> wrote:

> On Wed, Jun 20, 2007 at 11:34:34PM +0800, Cui, Dexuan wrote:
>> The "/var/lib/xen/" in changeset 15241: b0109d3dc3dd should be
>> "/var/xen/" -- actually "/var/lib/xen/" doesn't exist, and this causes
>> the save/restore to complain.
> 
> No this is wrong. Nothing should be in /var/xen - this is not FHS compliant
> If the /var/lib/xen directory is not present, then the Makefile should be
> fixed to create it.

Done.

 -- Keir

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-20 15:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-20 15:34 [PATCH] Fix the bad directory path "/var/lib/xen/" Cui, Dexuan
2007-06-20 15:37 ` Daniel P. Berrange
2007-06-20 15:58   ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.