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 654641 Details for
Bug 881989
[PATCH] for uint64 values on i386
[?]
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.
[patch]
patch for using buildvalud("K") instead of buildvalue("l") for lvm sizes
build-value.patch (text/plain), 3.96 KB, created by
James Antill
on 2012-11-29 22:34:43 UTC
(
hide
)
Description:
patch for using buildvalud("K") instead of buildvalue("l") for lvm sizes
Filename:
MIME Type:
Creator:
James Antill
Created:
2012-11-29 22:34:43 UTC
Size:
3.96 KB
patch
obsolete
>commit 2089613375a6516f372c1dea63d70d8a9890620b >Author: James Antill <james@and.org> >Date: Thu Nov 29 17:24:45 2012 -0500 > > Add helper function for building lvm uint64 size values in python, and use. > >diff --git a/liblvm.c b/liblvm.c >index 857b8a6..ac4dac7 100644 >--- a/liblvm.c >+++ b/liblvm.c >@@ -561,12 +561,25 @@ liblvm_lvm_vg_is_partial(vgobject *self) > return rval; > } > >+/* >+ * All size values from lvm2app are in uint64_t values, Eg. >+ * >+ * uint64_t lvm_vg_get_size(const vg_t vg); >+ * >+ * ...so we convert to unsigned long long here, and use this helper. >+ */ >+static PyObject * >+liblvm_lvm_build_uint64(uint64_t num) >+{ >+ return Py_BuildValue("K", (unsigned long long)num); >+} >+ > static PyObject * > liblvm_lvm_vg_get_seqno(vgobject *self) > { > VG_VALID(self); > >- return Py_BuildValue("l", lvm_vg_get_seqno(self->vg)); >+ return liblvm_lvm_build_uint64(lvm_vg_get_seqno(self->vg)); > } > > static PyObject * >@@ -574,7 +587,7 @@ liblvm_lvm_vg_get_size(vgobject *self) > { > VG_VALID(self); > >- return Py_BuildValue("l", lvm_vg_get_size(self->vg)); >+ return liblvm_lvm_build_uint64(lvm_vg_get_size(self->vg)); > } > > static PyObject * >@@ -582,7 +595,7 @@ liblvm_lvm_vg_get_free_size(vgobject *self) > { > VG_VALID(self); > >- return Py_BuildValue("l", lvm_vg_get_free_size(self->vg)); >+ return liblvm_lvm_build_uint64(lvm_vg_get_free_size(self->vg)); > } > > static PyObject * >@@ -590,7 +603,7 @@ liblvm_lvm_vg_get_extent_size(vgobject *self) > { > VG_VALID(self); > >- return Py_BuildValue("l", lvm_vg_get_extent_size(self->vg)); >+ return liblvm_lvm_build_uint64(lvm_vg_get_extent_size(self->vg)); > } > > static PyObject * >@@ -598,7 +611,7 @@ liblvm_lvm_vg_get_extent_count(vgobject *self) > { > VG_VALID(self); > >- return Py_BuildValue("l", lvm_vg_get_extent_count(self->vg)); >+ return liblvm_lvm_build_uint64(lvm_vg_get_extent_count(self->vg)); > } > > static PyObject * >@@ -606,7 +619,7 @@ liblvm_lvm_vg_get_free_extent_count(vgobject *self) > { > VG_VALID(self); > >- return Py_BuildValue("l", lvm_vg_get_free_extent_count(self->vg)); >+ return liblvm_lvm_build_uint64(lvm_vg_get_free_extent_count(self->vg)); > } > > /* Builds a python tuple ([string|number], bool) from a struct lvm_property_value */ >@@ -757,7 +770,7 @@ liblvm_lvm_vg_get_pv_count(vgobject *self) > { > VG_VALID(self); > >- return Py_BuildValue("l", lvm_vg_get_pv_count(self->vg)); >+ return liblvm_lvm_build_uint64(lvm_vg_get_pv_count(self->vg)); > } > > static PyObject * >@@ -765,7 +778,7 @@ liblvm_lvm_vg_get_max_pv(vgobject *self) > { > VG_VALID(self); > >- return Py_BuildValue("l", lvm_vg_get_max_pv(self->vg)); >+ return liblvm_lvm_build_uint64(lvm_vg_get_max_pv(self->vg)); > } > > static PyObject * >@@ -773,7 +786,7 @@ liblvm_lvm_vg_get_max_lv(vgobject *self) > { > VG_VALID(self); > >- return Py_BuildValue("l", lvm_vg_get_max_lv(self->vg)); >+ return liblvm_lvm_build_uint64(lvm_vg_get_max_lv(self->vg)); > } > > static PyObject * >@@ -1135,7 +1148,7 @@ liblvm_lvm_lv_get_size(lvobject *self) > { > LV_VALID(self); > >- return Py_BuildValue("l", lvm_lv_get_size(self->lv)); >+ return liblvm_lvm_build_uint64(lvm_lv_get_size(self->lv)); > } > > static PyObject * >@@ -1348,7 +1361,7 @@ liblvm_lvm_pv_get_mda_count(pvobject *self) > { > PV_VALID(self); > >- return Py_BuildValue("l", lvm_pv_get_mda_count(self->pv)); >+ return liblvm_lvm_build_uint64(lvm_pv_get_mda_count(self->pv)); > } > > static PyObject * >@@ -1371,7 +1384,7 @@ liblvm_lvm_pv_get_dev_size(pvobject *self) > { > PV_VALID(self); > >- return Py_BuildValue("l", lvm_pv_get_dev_size(self->pv)); >+ return liblvm_lvm_build_uint64(lvm_pv_get_dev_size(self->pv)); > } > > static PyObject * >@@ -1379,7 +1392,7 @@ liblvm_lvm_pv_get_size(pvobject *self) > { > PV_VALID(self); > >- return Py_BuildValue("l", lvm_pv_get_size(self->pv)); >+ return liblvm_lvm_build_uint64(lvm_pv_get_size(self->pv)); > } > > static PyObject * >@@ -1387,7 +1400,7 @@ liblvm_lvm_pv_get_free(pvobject *self) > { > PV_VALID(self); > >- return Py_BuildValue("l", lvm_pv_get_free(self->pv)); >+ return liblvm_lvm_build_uint64(lvm_pv_get_free(self->pv)); > } > > static PyObject *
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 881989
:
654641
|
655083