Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 661372 Details for
Bug 886033
[pyparted] installation on EDEV device fails
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
pyparted-3.8-add-ped-disk-new.patch
pyparted-3.8-add-ped-disk-new.patch (text/plain), 4.07 KB, created by
IBM Bug Proxy
on 2012-12-11 11:11:14 UTC
(
hide
)
Description:
pyparted-3.8-add-ped-disk-new.patch
Filename:
MIME Type:
Creator:
IBM Bug Proxy
Created:
2012-12-11 11:11:14 UTC
Size:
4.07 KB
patch
obsolete
>Subject: [PATCH] pyparted: export ped_disk_new functionality > >From: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> > >Fixed Block Access (FBA) DASDs are mainframe-specific disk devices >which are layed out as a sequence of 512-byte sectors. In contrast >to ECKD DASDs, these disks do not require formatting and resemble >the LBA layout of non-mainframe disks. Despite this resemblance, >the Linux kernel applies special handling during partition detection >for FBA DASDs, resulting in a single, immutable partition being >reported. > >While actual FBA DASD hardware is no longer available, the z/VM >hypervisor can simulate FBA DASD disks, backed by either ECKD or >SCSI devices. > >This patch adds support for FBA DASD partitions and successful >installation by Anaconda. > >Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> >--- > include/pydisk.h | 1 + > src/_pedmodule.c | 7 +++++++ > src/parted/__init__.py | 9 +++++++++ > src/pydisk.c | 32 ++++++++++++++++++++++++++++++++ > 4 files changed, 49 insertions(+) > >--- a/include/pydisk.h >+++ b/include/pydisk.h >@@ -151,6 +151,7 @@ PyObject *py_ped_disk_get_partition(PyOb > PyObject *py_ped_disk_get_partition_by_sector(PyObject *, PyObject *); > PyObject *py_ped_disk_extended_partition(PyObject *, PyObject *); > PyObject *py_ped_disk_new_fresh(PyObject *, PyObject *); >+PyObject *py_ped_disk_new(PyObject *, PyObject *); > > #endif /* PYDISK_H_INCLUDED */ > >--- a/src/_pedmodule.c >+++ b/src/_pedmodule.c >@@ -153,6 +153,11 @@ PyDoc_STRVAR(disk_new_fresh_doc, > "will have to use the commit_to_dev() method to write the new label to\n" > "the disk."); > >+PyDoc_STRVAR(disk_new_doc, >+"disk_new(Device) -> Disk\n\n" >+"Given the Device, create a new Disk object. And probe, read the details of\n" >+"the disk."); >+ > PyDoc_STRVAR(disk_flag_get_name_doc, > "disk_flag_get_name(integer) -> string\n\n" > "Return a name for a disk flag constant. If an invalid flag is provided,\n" >@@ -243,6 +248,8 @@ static struct PyMethodDef PyPedModuleMet > METH_VARARGS, partition_flag_next_doc}, > {"disk_new_fresh", (PyCFunction) py_ped_disk_new_fresh, > METH_VARARGS, disk_new_fresh_doc}, >+ {"disk_new", (PyCFunction) py_ped_disk_new, >+ METH_VARARGS, disk_new_doc}, > {"disk_flag_get_name", (PyCFunction) py_ped_disk_flag_get_name, > METH_VARARGS, disk_flag_get_name_doc}, > {"disk_flag_get_by_name", (PyCFunction) py_ped_disk_flag_get_by_name, >--- a/src/parted/__init__.py >+++ b/src/parted/__init__.py >@@ -412,6 +412,15 @@ def freshDisk(device, ty): > return Disk(PedDisk=peddisk) > > @localeC >+def newDisk(device): >+ """Return a Disk object for this Device. Read the partition table off >+ a device (if one is found).""" >+ from _ped import disk_new >+ >+ peddisk = disk_new(device.getPedDevice()) >+ return Disk(PedDisk=peddisk) >+ >+@localeC > def version(): > """Return a dict containing the pyparted and libparted versions.""" > from _ped import libparted_version >--- a/src/pydisk.c >+++ b/src/pydisk.c >@@ -2017,5 +2017,37 @@ PyObject *py_ped_disk_new_fresh(PyObject > return (PyObject *) ret; > } > >+PyObject *py_ped_disk_new(PyObject *s, PyObject *args) { >+ _ped_Device *in_device = NULL; >+ PedDevice *device = NULL; >+ PedDisk *disk = NULL; >+ _ped_Disk *ret = NULL; >+ >+ if (!PyArg_ParseTuple(args, "O!", &_ped_Device_Type_obj, &in_device)) { >+ return NULL; >+ } >+ >+ if ((device = _ped_Device2PedDevice((PyObject *) in_device)) == NULL) { >+ return NULL; >+ } >+ >+ if ((disk = ped_disk_new(device)) == NULL) { >+ if (partedExnRaised) { >+ partedExnRaised = 0; >+ >+ if (!PyErr_ExceptionMatches(PartedException) && >+ !PyErr_ExceptionMatches(PyExc_NotImplementedError)) >+ PyErr_SetString(DiskException, partedExnMessage); >+ } else { >+ PyErr_Format(DiskException, "Could not create new disk label on %s", disk->dev->path); >+ } >+ >+ return NULL; >+ } >+ >+ ret = PedDisk2_ped_Disk(disk); >+ return (PyObject *) ret; >+} >+ > /* vim:tw=78:ts=4:et:sw=4 > */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 886033
: 661372