summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--eio.c6
-rw-r--r--eio.h6
3 files changed, 7 insertions, 6 deletions
diff --git a/Changes b/Changes
index 5216ffc..0c76d18 100644
--- a/Changes
+++ b/Changes
@@ -33,4 +33,5 @@ TODO: mutex init in child after fork?
utimes but not futimes.
- use _POSIX_MEMLOCK_RANGE for mlock.
- do not (errornously) overwrite CFLAGS in configure.ac.
+ - mknod used int3 for dev_t (ยง2 bit), not offs (64 bit).
diff --git a/eio.c b/eio.c
index 862b5ad..2958f69 100644
--- a/eio.c
+++ b/eio.c
@@ -1,7 +1,7 @@
/*
* libeio implementation
*
- * Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libeio@schmorp.de>
+ * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libeio@schmorp.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
@@ -1683,7 +1683,7 @@ static void eio_execute (etp_worker *self, eio_req *req)
case EIO_RENAME: req->result = rename (req->ptr1, req->ptr2); break;
case EIO_LINK: req->result = link (req->ptr1, req->ptr2); break;
case EIO_SYMLINK: req->result = symlink (req->ptr1, req->ptr2); break;
- case EIO_MKNOD: req->result = mknod (req->ptr1, (mode_t)req->int2, (dev_t)req->int3); break;
+ case EIO_MKNOD: req->result = mknod (req->ptr1, (mode_t)req->int2, (dev_t)req->offs); break;
case EIO_READLINK: ALLOC (PATH_MAX);
req->result = readlink (req->ptr1, req->ptr2, PATH_MAX); break;
@@ -1943,7 +1943,7 @@ eio_req *eio_readdir (const char *path, int flags, int pri, eio_cb cb, void *dat
eio_req *eio_mknod (const char *path, mode_t mode, dev_t dev, int pri, eio_cb cb, void *data)
{
- REQ (EIO_MKNOD); PATH; req->int2 = (long)mode; req->int3 = (long)dev; SEND;
+ REQ (EIO_MKNOD); PATH; req->int2 = (long)mode; req->offs = (off_t)dev; SEND;
}
static eio_req *
diff --git a/eio.h b/eio.h
index bcbb579..9c621f9 100644
--- a/eio.h
+++ b/eio.h
@@ -1,7 +1,7 @@
/*
* libeio API header
*
- * Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libeio@schmorp.de>
+ * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libeio@schmorp.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
@@ -182,7 +182,7 @@ struct eio_req
eio_req volatile *next; /* private ETP */
ssize_t result; /* result of syscall, e.g. result = read (... */
- off_t offs; /* read, write, truncate, readahead, sync_file_range: file offset */
+ off_t offs; /* read, write, truncate, readahead, sync_file_range: file offset, mknod: dev_t */
size_t size; /* read, write, readahead, sendfile, msync, mlock, sync_file_range: length */
void *ptr1; /* all applicable requests: pathname, old name; readdir: optional eio_dirents */
void *ptr2; /* all applicable requests: new name or memory buffer; readdir: name strings */
@@ -192,7 +192,7 @@ struct eio_req
int type; /* EIO_xxx constant ETP */
int int1; /* all applicable requests: file descriptor; sendfile: output fd; open, msync, mlockall, readdir: flags */
long int2; /* chown, fchown: uid; sendfile: input fd; open, chmod, mkdir, mknod: file mode, sync_file_range: flags */
- long int3; /* chown, fchown: gid; mknod: dev_t */
+ long int3; /* chown, fchown: gid */
int errorno; /* errno value on syscall return */
unsigned char flags; /* private */