projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9b33b47
)
Helpful indication to run as root
author
Jens Axboe
<jens.axboe@oracle.com>
Mon, 19 Mar 2007 10:36:36 +0000
(11:36 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Mon, 19 Mar 2007 10:36:36 +0000
(11:36 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
memory.c
patch
|
blob
|
blame
|
history
diff --git
a/memory.c
b/memory.c
index 384b80617f609ca65c6f099b1c073de4c78cc20c..be664c9c22a40285cd07c6f7f69da120408618d7 100644
(file)
--- a/
memory.c
+++ b/
memory.c
@@
-70,6
+70,9
@@
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");
td->shm_id = shmget(IPC_PRIVATE, td->orig_buffer_size, flags);
if (td->shm_id < 0) {
td_verror(td, errno, "shmget");
+ if (geteuid() != 0 && errno == ENOMEM)
+ log_err("fio: you may need to run this job as root\n");
+
return 1;
}
return 1;
}