summaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-03-19 11:36:36 +0100
committerJens Axboe <jens.axboe@oracle.com>2007-03-19 11:36:36 +0100
commit6b56baf5c8c544194e82a45999391de155cd94a3 (patch)
treeeff90b733ad1f971ede2fdcca9a6e337d30bebae /memory.c
parent9b33b4794b621b28347e8ca8fb425b918052434c (diff)
Helpful indication to run as root
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/memory.c b/memory.c
index 384b806..be664c9 100644
--- 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");
+ if (geteuid() != 0 && errno == ENOMEM)
+ log_err("fio: you may need to run this job as root\n");
+
return 1;
}