summaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-03-19 11:32:46 +0100
committerJens Axboe <jens.axboe@oracle.com>2007-03-19 11:32:46 +0100
commit9b33b4794b621b28347e8ca8fb425b918052434c (patch)
tree242b4c0c54602da5a34e6fdb55925fd55c27964a /memory.c
parentb370e46abdd2bfe764e28efb41c4caadc632b937 (diff)
No need to use perror() after td_verror()
That'll just result in the error being displayed twice. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/memory.c b/memory.c
index f108e47..384b806 100644
--- a/memory.c
+++ b/memory.c
@@ -70,14 +70,12 @@ int allocate_io_mem(struct thread_data *td)
td->shm_id = shmget(IPC_PRIVATE, td->orig_buffer_size, flags);
if (td->shm_id < 0) {
td_verror(td, errno, "shmget");
- perror("shmget");
return 1;
}
td->orig_buffer = shmat(td->shm_id, NULL, 0);
if (td->orig_buffer == (void *) -1) {
td_verror(td, errno, "shmat");
- perror("shmat");
td->orig_buffer = NULL;
return 1;
}
@@ -91,8 +89,7 @@ int allocate_io_mem(struct thread_data *td)
td->mmapfd = open(td->mmapfile, O_RDWR|O_CREAT, 0644);
if (td->mmapfd < 0) {
- td_verror(td, errno, "open");
- perror("open mmap file");
+ td_verror(td, errno, "open mmap file");
td->orig_buffer = NULL;
return 1;
}
@@ -102,7 +99,6 @@ int allocate_io_mem(struct thread_data *td)
td->orig_buffer = mmap(NULL, td->orig_buffer_size, PROT_READ | PROT_WRITE, flags, td->mmapfd, 0);
if (td->orig_buffer == MAP_FAILED) {
td_verror(td, errno, "mmap");
- perror("mmap");
td->orig_buffer = NULL;
if (td->mmapfd) {
close(td->mmapfd);