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

[Xen-devel] [PATCH 11/12] tools/pygrub: Add `xen' to fsimage python module name



This module should be called `libxenfsimage' for the same reasons that
the C library should.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
v2: New in this version of the series
---
 tools/pygrub/setup.py              | 4 ++--
 tools/pygrub/src/fsimage/fsimage.c | 8 ++++----
 tools/pygrub/src/pygrub            | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/tools/pygrub/setup.py b/tools/pygrub/setup.py
index b58cc1c4e6..b8f1dc4590 100644
--- a/tools/pygrub/setup.py
+++ b/tools/pygrub/setup.py
@@ -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 ]
       )
diff --git a/tools/pygrub/src/fsimage/fsimage.c 
b/tools/pygrub/src/fsimage/fsimage.c
index 47940572a8..743a3fb7b8 100644
--- a/tools/pygrub/src/fsimage/fsimage.c
+++ b/tools/pygrub/src/fsimage/fsimage.c
@@ -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);
 }
diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
index dd0c8f77df..52a8965ad9 100755
--- a/tools/pygrub/src/pygrub
+++ b/tools/pygrub/src/pygrub
@@ -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"])
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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