Eduardo Aguiar added the comment:
Maybe you could create a file without read permission (000) and try
to read from it.
--
___
Python tracker
<http://bugs.python.org/issue5
Eduardo Aguiar added the comment:
Another try. I have opened a file for writing, and have tried to read
from it:
>>> fp = open ('xxx', 'w')
>>> fp.read ()
Traceback (most recent call last):
File "", li
New submission from Eduardo Aguiar :
At arraymodule.c (line 1258):
nread = fread(item + (Py_SIZE(self) - n) * itemsize,
itemsize, n, fp);
if (nread < (size_t)n) {
Py_SIZE(self) -= (n - nr
New submission from Eduardo Aguiar :
At posixmodule.c (line 6306)
static PyObject *
posix_read(PyObject *self, PyObject *args)
{
int fd, size, n;
PyObject *buffer;
if (!PyArg_ParseTuple(args, "ii:read", &fd, &size))
return NULL;
Eduardo Aguiar added the comment:
Hi,
I think I have a few more issues you can consider:
1) to allocated an aligned buffer it is as simple as allocate 4096 + len
(buffer) and truncate address to 4k boundary.
2) I wrote a floppy imager, and without O_DIRECT, it gives me 8 sectors
(4k = kernel