summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--memory.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/memory.c b/memory.c
index f108e470..384b8061 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);