diff options
author | john.levon@sun.com <john.levon@sun.com> | 2007-02-19 20:44:42 -0800 |
---|---|---|
committer | john.levon@sun.com <john.levon@sun.com> | 2007-02-19 20:44:42 -0800 |
commit | ec08a094b2b6437406adab0f19cb89bf26c4f3ad (patch) | |
tree | 3a0a944eb764d758615842526e1b5c28bf29b56a /tools/pygrub | |
parent | 5f855af62745d6def7f9a47a75fe3b83bf1aa2cb (diff) | |
download | xen-ec08a094b2b6437406adab0f19cb89bf26c4f3ad.tar.gz xen-ec08a094b2b6437406adab0f19cb89bf26c4f3ad.tar.bz2 xen-ec08a094b2b6437406adab0f19cb89bf26c4f3ad.zip |
Filesystem implementations may need optional arguments in terms of
what to mount. Add an options string to the libfsimage API.
Signed-off-by: John Levon <john.levon@sun.com>
Diffstat (limited to 'tools/pygrub')
-rw-r--r-- | tools/pygrub/src/fsimage/fsimage.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/pygrub/src/fsimage/fsimage.c b/tools/pygrub/src/fsimage/fsimage.c index 52a8a4b1ac..21f9411c25 100644 --- a/tools/pygrub/src/fsimage/fsimage.c +++ b/tools/pygrub/src/fsimage/fsimage.c @@ -260,19 +260,20 @@ PyTypeObject fsimage_fs_type = { static PyObject * fsimage_open(PyObject *o, PyObject *args, PyObject *kwargs) { - static char *kwlist[] = { "name", "offset", NULL }; - char * name; + static char *kwlist[] = { "name", "offset", "options", NULL }; + char *name; + char *options = NULL; uint64_t offset = 0; fsimage_fs_t *fs; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|L", kwlist, - &name, &offset)) + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|Ls", kwlist, + &name, &offset, &options)) return (NULL); if ((fs = PyObject_NEW(fsimage_fs_t, &fsimage_fs_type)) == NULL) return (NULL); - if ((fs->fs = fsi_open_fsimage(name, offset)) == NULL) { + if ((fs->fs = fsi_open_fsimage(name, offset, options)) == NULL) { PyErr_SetFromErrno(PyExc_IOError); return (NULL); } @@ -284,7 +285,8 @@ PyDoc_STRVAR(fsimage_open__doc__, "open(name, [offset=off]) - Open the given file as a filesystem image.\n" "\n" "name - name of file to open.\n" - "offset - offset of file system within file image.\n"); + "offset - offset of file system within file image.\n" + "options - mount options string.\n"); static struct PyMethodDef fsimage_module_methods[] = { { "open", (PyCFunction)fsimage_open, |