now returns 1k block count rather than 512byte block count
authorMarc Fiuczynski <mef@cs.princeton.edu>
Tue, 21 Jun 2005 21:52:18 +0000 (21:52 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Tue, 21 Jun 2005 21:52:18 +0000 (21:52 +0000)
python/vduimpl.c

index 00ff5db..01fc63c 100644 (file)
@@ -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;
 }