diff options
author | Matt Wilson <msw@redhat.com> | 2000-12-05 05:10:22 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-12-05 05:10:22 +0000 |
commit | 265e97939a298b322011fc6bd0b3624583bea43b (patch) | |
tree | 4f07c847055e4325dfcbbf984bf443d4ebeb9f6e /isys/isys.c | |
parent | f8ea2eb11c04a8d0d9e4b787f8b082e949af6bcc (diff) | |
download | anaconda-265e97939a298b322011fc6bd0b3624583bea43b.tar.gz anaconda-265e97939a298b322011fc6bd0b3624583bea43b.tar.xz anaconda-265e97939a298b322011fc6bd0b3624583bea43b.zip |
merge from anaconda-7-0-alpha-branch
Diffstat (limited to 'isys/isys.c')
-rw-r--r-- | isys/isys.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/isys/isys.c b/isys/isys.c index dc2491834..92cc538df 100644 --- a/isys/isys.c +++ b/isys/isys.c @@ -27,6 +27,7 @@ #include <scsi/scsi.h> #include <scsi/scsi_ioctl.h> #include <sys/vt.h> +#include <sys/types.h> #include "Python.h" @@ -42,8 +43,6 @@ #define CDROMEJECT 0x5309 #endif -long long llseek(int fd, long long offset, int whence); - /* FIXME: this is such a hack -- moduleInfoList ought to be a proper object */ moduleInfoSet modInfoList = NULL; @@ -690,7 +689,8 @@ static PyObject * doCheckUFS (PyObject * s, PyObject * args) { return NULL; } - return Py_BuildValue("i", (llseek(fd, (8192 + 0x55c), SEEK_SET) >= 0 && + return Py_BuildValue("i", (lseek64(fd, (off64_t) (8192 + 0x55c), + SEEK_SET) >= 0 && read(fd, &magic, 4) == 4 && (magic == UFS_SUPER_MAGIC || swab32(magic) == UFS_SUPER_MAGIC))); @@ -1053,7 +1053,7 @@ static PyObject * doGetRaidSuperblock(PyObject * s, PyObject * args) { /* put the size in 1k blocks */ size >>= 1; - if (llseek(fd, ((long long) 1024) * MD_NEW_SIZE_BLOCKS(size), SEEK_SET) < 0) { + if (lseek64(fd, ((off64_t) 1024) * (off64_t) MD_NEW_SIZE_BLOCKS(size), SEEK_SET) < 0) { PyErr_SetFromErrno(PyExc_SystemError); return NULL; } |