Skip to content

Commit

Permalink
Always display sudo error message
Browse files Browse the repository at this point in the history
  • Loading branch information
F5OEO committed Jan 7, 2019
1 parent 774ee36 commit 288ff22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/stat.h>

#include <sys/sysmacros.h>
#include "mailbox.h"
#include "util.h"

Expand All @@ -49,7 +49,7 @@ void *mapmem(unsigned base, unsigned size)
base = base - offset;
/* open /dev/mem */
if ((mem_fd = open("/dev/mem", O_RDWR|O_SYNC) ) < 0) {
dbg_printf(1,"can't open /dev/mem\nThis program should be run as root. Try prefixing command with: sudo\n");
dbg_printf(0,"can't open /dev/mem\nThis program should be run as root. Try prefixing command with: sudo\n");
exit (-1);
}
void *mem = mmap(
Expand Down

0 comments on commit 288ff22

Please sign in to comment.