ia64/xen-unstable

changeset 401:5b76fd9dd30c

bitkeeper revision 1.189 (3ead3b1cS7oGt_c65vuKxevku1phmQ)

use long instead of int for disk sizes
change default state file
author ach61@soar.cl.cam.ac.uk
date Mon Apr 28 14:30:52 2003 +0000 (2003-04-28)
parents b42c882f9076
children 43ddfd337a59
files BitKeeper/etc/logging_ok tools/vdmanager/src/uk/ac/cam/cl/xeno/vdmanager/Library.java tools/vdmanager/src/uk/ac/cam/cl/xeno/vdmanager/Main.java tools/vdmanager/src/uk/ac/cam/cl/xeno/vdmanager/VirtualDisk.java tools/vdmanager/src/uk/ac/cam/cl/xeno/vdmanager/VirtualDiskManager.java tools/vdmanager/vdmanager
line diff
     1.1 --- a/BitKeeper/etc/logging_ok	Mon Apr 28 13:06:57 2003 +0000
     1.2 +++ b/BitKeeper/etc/logging_ok	Mon Apr 28 14:30:52 2003 +0000
     1.3 @@ -1,5 +1,6 @@
     1.4  ach61@boulderdash.cl.cam.ac.uk
     1.5  ach61@labyrinth.cl.cam.ac.uk
     1.6 +ach61@soar.cl.cam.ac.uk
     1.7  akw27@boulderdash.cl.cam.ac.uk
     1.8  akw27@labyrinth.cl.cam.ac.uk
     1.9  akw27@plucky.localdomain
     2.1 --- a/tools/vdmanager/src/uk/ac/cam/cl/xeno/vdmanager/Library.java	Mon Apr 28 13:06:57 2003 +0000
     2.2 +++ b/tools/vdmanager/src/uk/ac/cam/cl/xeno/vdmanager/Library.java	Mon Apr 28 14:30:52 2003 +0000
     2.3 @@ -59,7 +59,7 @@ Library
     2.4     * convert a number (string format) into 
     2.5     * the corresponding integer value.
     2.6     */
     2.7 -  static int
     2.8 +  static long
     2.9    parse_size(String size)
    2.10    {
    2.11      String substring = size;
    2.12 @@ -94,7 +94,7 @@ Library
    2.13        substring = size;
    2.14      }
    2.15  
    2.16 -    return Integer.decode(substring).intValue() * suffix;
    2.17 +    return Long.decode(substring).longValue() * suffix;
    2.18    }
    2.19  
    2.20    static String
     3.1 --- a/tools/vdmanager/src/uk/ac/cam/cl/xeno/vdmanager/Main.java	Mon Apr 28 13:06:57 2003 +0000
     3.2 +++ b/tools/vdmanager/src/uk/ac/cam/cl/xeno/vdmanager/Main.java	Mon Apr 28 14:30:52 2003 +0000
     3.3 @@ -10,8 +10,8 @@ import java.util.Date;
     3.4  public class
     3.5  Main
     3.6  {
     3.7 -  static String state_filename_in  = "/var/run/vdmanager.xml";
     3.8 -  static String state_filename_out = "/var/run/vdmanager.xml";
     3.9 +  static String state_filename_in  = "/var/lib/xen/vdstate.xml";
    3.10 +  static String state_filename_out = "/var/lib/xen/vdstate.xml";
    3.11    static String partition_filename = "/proc/partitions";
    3.12  
    3.13    void
     4.1 --- a/tools/vdmanager/src/uk/ac/cam/cl/xeno/vdmanager/VirtualDisk.java	Mon Apr 28 13:06:57 2003 +0000
     4.2 +++ b/tools/vdmanager/src/uk/ac/cam/cl/xeno/vdmanager/VirtualDisk.java	Mon Apr 28 14:30:52 2003 +0000
     4.3 @@ -189,7 +189,7 @@ VirtualDisk
     4.4     */
     4.5  
     4.6    void
     4.7 -  add_new_partition (Partition partition, int size)
     4.8 +  add_new_partition (Partition partition, long size)
     4.9    {
    4.10      int loop;
    4.11  
     5.1 --- a/tools/vdmanager/src/uk/ac/cam/cl/xeno/vdmanager/VirtualDiskManager.java	Mon Apr 28 13:06:57 2003 +0000
     5.2 +++ b/tools/vdmanager/src/uk/ac/cam/cl/xeno/vdmanager/VirtualDiskManager.java	Mon Apr 28 14:30:52 2003 +0000
     5.3 @@ -35,7 +35,7 @@ VirtualDiskManager
     5.4    }
     5.5  
     5.6    public void
     5.7 -  add_xeno_partition (Partition partition, int size)
     5.8 +  add_xeno_partition (Partition partition, long size)
     5.9    {
    5.10      free.add_new_partition (partition, size);
    5.11      return;
    5.12 @@ -46,7 +46,7 @@ VirtualDiskManager
    5.13     */
    5.14  
    5.15    public VirtualDisk
    5.16 -  create_virtual_disk(String name, int size, Date expiry)
    5.17 +  create_virtual_disk(String name, long size, Date expiry)
    5.18    {
    5.19      VirtualDisk vd = new VirtualDisk (name, expiry);
    5.20  
     6.1 --- a/tools/vdmanager/vdmanager	Mon Apr 28 13:06:57 2003 +0000
     6.2 +++ b/tools/vdmanager/vdmanager	Mon Apr 28 14:30:52 2003 +0000
     6.3 @@ -8,9 +8,9 @@ export PATH=${ANT_HOME}/bin:${JAVA_HOME}
     6.4  # runtime
     6.5  export JAVA_HOME=../jre-1.4.1
     6.6  export PATH=${JAVA_HOME}/bin:${PATH}
     6.7 -if [ -f /var/run/vdmanager.xml ]
     6.8 +if [ -f /var/lib/xen/vdstate.xml ]
     6.9  then
    6.10 -  cp /var/run/vdmanager.xml /var/run/vdmanager.old.xml
    6.11 +  cp /var/lib/xen/vdstate.xml /var/lib/xen/vdstate.old.xml
    6.12  fi
    6.13  
    6.14  java -jar vdmanager.jar $*