From: Jens Axboe Date: Mon, 19 Mar 2007 10:36:36 +0000 (+0100) Subject: Helpful indication to run as root X-Git-Tag: fio-1.15~74 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=6b56baf5c8c544194e82a45999391de155cd94a3 Helpful indication to run as root Signed-off-by: Jens Axboe --- diff --git a/memory.c b/memory.c index 384b8061..be664c9c 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; }