From: Marc Fiuczynski Date: Tue, 21 Jun 2005 21:52:18 +0000 (+0000) Subject: now returns 1k block count rather than 512byte block count X-Git-Tag: after-util-vserver-0_30_208-revert~167 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=5042d11bf25cac8a08cfffe760ff0f9fbb2cabd7;hp=4fcf6f41a9e748a046fee6b6d7d97d7f96c7cb1b;p=util-vserver.git now returns 1k block count rather than 512byte block count --- diff --git a/python/vduimpl.c b/python/vduimpl.c index 00ff5db..01fc63c 100644 --- a/python/vduimpl.c +++ b/python/vduimpl.c @@ -551,7 +551,13 @@ do_vdu(PyObject *self, PyObject *args) Dispose(&tbl); /* create a python (inode, block, size) tuple */ - tuple = Py_BuildValue("(L,L,L)",s.inodes,s.blocks,s.size); + tuple = Py_BuildValue("(L,L,L)", + s.inodes, + s.blocks>>1, /* NOTE: div by 2 to adjust + * 512b block count to 1K + * block count + */ + s.size); return (res == -1) ? PyErr_SetFromErrno(PyExc_OSError) : tuple; }