]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
tools/pygrub: Add `xen' to fsimage python module name
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 9 Oct 2018 16:14:34 +0000 (17:14 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Mon, 15 Oct 2018 13:49:33 +0000 (14:49 +0100)
This module should be called `libxenfsimage' for the same reasons that
the C library should.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/pygrub/setup.py
tools/pygrub/src/fsimage/fsimage.c
tools/pygrub/src/pygrub

index b58cc1c4e6ab3305e2ed5b0005188aab5e62d6e4..b8f1dc4590cf90acd458a02816cfb1267a2f4cc5 100644 (file)
@@ -7,7 +7,7 @@ extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
 
 XEN_ROOT = "../.."
 
-fsimage = Extension("fsimage",
+xenfsimage = Extension("xenfsimage",
     extra_compile_args = extra_compile_args,
     include_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ],
     library_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ],
@@ -25,5 +25,5 @@ setup(name='pygrub',
       package_dir={'grub': 'src', 'fsimage': 'src'},
       scripts = ["src/pygrub"],
       packages=pkgs,
-      ext_modules = [ fsimage ]
+      ext_modules = [ xenfsimage ]
       )
index 47940572a87f511b3170159cebef859db81339c9..743a3fb7b8286be8828d6955dff14569d3d539af 100644 (file)
@@ -132,7 +132,7 @@ static char fsimage_file_type__doc__[] = "Filesystem image file";
 PyTypeObject fsimage_file_type = {
        PyObject_HEAD_INIT(&PyType_Type)
        0,                                      /* ob_size */
-       "fsimage.file",                         /* tp_name */
+       "xenfsimage.file",                      /* tp_name */
        sizeof(fsimage_file_t),                 /* tp_size */
        0,                                      /* tp_itemsize */
        (destructor) fsimage_file_dealloc,      /* tp_dealloc */
@@ -234,7 +234,7 @@ PyDoc_STRVAR(fsimage_fs_type__doc__, "Filesystem image");
 PyTypeObject fsimage_fs_type = {
        PyObject_HEAD_INIT(&PyType_Type)
        0,                                      /* ob_size */
-       "fsimage.fs",                           /* tp_name */
+       "xenfsimage.fs",                        /* tp_name */
        sizeof(fsimage_fs_t),                   /* tp_size */
        0,                                      /* tp_itemsize */
        (destructor) fsimage_fs_dealloc,        /* tp_dealloc */
@@ -317,7 +317,7 @@ static struct PyMethodDef fsimage_module_methods[] = {
 };
 
 PyMODINIT_FUNC
-initfsimage(void)
+initxenfsimage(void)
 {
-       Py_InitModule("fsimage", fsimage_module_methods);
+       Py_InitModule("xenfsimage", fsimage_module_methods);
 }
index dd0c8f77dfb6fd96747626e3e2299040e285c00e..52a8965ad97fac2d5180e83aac8d742a31d0884d 100755 (executable)
@@ -21,7 +21,7 @@ import xen.lowlevel.xc
 import curses, _curses, curses.wrapper, curses.textpad, curses.ascii
 import getopt
 
-import fsimage
+import xenfsimage
 import grub.GrubConf
 import grub.LiloConf
 import grub.ExtLinuxConf
@@ -897,7 +897,7 @@ if __name__ == "__main__":
 
     for offset in part_offs:
         try:
-            fs = fsimage.open(file, offset, bootfsoptions)
+            fs = xenfsimage.open(file, offset, bootfsoptions)
 
             chosencfg = sniff_solaris(fs, incfg)
 
@@ -945,7 +945,7 @@ if __name__ == "__main__":
 
     args = None
     if chosencfg["args"]:
-        zfsinfo = fsimage.getbootstring(fs)
+        zfsinfo = xenfsimage.getbootstring(fs)
         if zfsinfo is not None:
             e = re.compile("zfs-bootfs=[\w\-\.\:@/]+" )
             (chosencfg["args"],count) = e.subn(zfsinfo, chosencfg["args"])