[iotop/el5/master] add missing patch
Michal Hlavinka
mhlavink at fedoraproject.org
Mon Oct 4 09:50:47 UTC 2010
commit a8af9f2ff9648c345300bce6f0592fcc79c0dc77
Author: Michal Hlavinka <mhlavink at redhat.com>
Date: Mon Oct 4 11:50:30 2010 +0200
add missing patch
iotop-0.4-v4-cmd.patch | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/iotop-0.4-v4-cmd.patch b/iotop-0.4-v4-cmd.patch
new file mode 100644
index 0000000..f72eb3f
--- /dev/null
+++ b/iotop-0.4-v4-cmd.patch
@@ -0,0 +1,32 @@
+diff --git a/iotop/data.py b/iotop/data.py
+index bbe3e27..e7e8b4a 100644
+--- a/iotop/data.py
++++ b/iotop/data.py
+@@ -103,7 +103,8 @@ class Stats(DumpableObject):
+ #
+
+ TASKSTATS_CMD_GET = 1
+-TASKSTATS_CMD_ATTR_PID = 1
++TASKSTATS_CMD_ATTR_PID_V4 = 5
++TASKSTATS_TYPE_AGGR_PID = 4
+
+ class TaskStatsNetlink(object):
+ # Keep in sync with format_stats() and pinfo.did_some_io()
+@@ -116,7 +117,7 @@ class TaskStatsNetlink(object):
+
+ def build_request(self, tid):
+ return GeNlMessage(self.family_id, cmd=TASKSTATS_CMD_GET,
+- attrs=[U32Attr(TASKSTATS_CMD_ATTR_PID, tid)],
++ attrs=[U32Attr(TASKSTATS_CMD_ATTR_PID_V4, tid)],
+ flags=NLM_F_REQUEST)
+
+ def get_single_task_stats(self, thread):
+@@ -136,7 +137,7 @@ class TaskStatsNetlink(object):
+ reply_length, reply_type = struct.unpack('HH', reply.payload[4:8])
+ reply_version = struct.unpack('H', reply.payload[20:22])[0]
+ assert reply_length >= 288
+- assert reply_type == TASKSTATS_CMD_ATTR_PID + 3
++ assert reply_type == TASKSTATS_TYPE_AGGR_PID
+ assert reply_version >= 4
+ return Stats(reply_data)
+
More information about the scm-commits
mailing list