Edit

IABSD.fr/ports/sysutils/dmidecode/patches

Branch :

  • Show log

    Commit

  • Author : sthen
    Date : 2020-11-09 14:05:47
    Hash : 2ce1c565
    Message : update to dmidecode-3.3

  • patch-util_c
  • $OpenBSD: patch-util_c,v 1.2 2020/11/09 14:05:48 sthen Exp $
    
    Index: util.c
    --- util.c.orig
    +++ util.c
    @@ -184,6 +184,10 @@ void *mem_chunk(off_t base, size_t len, const char *de
     	if ((fd = open(devmem, O_RDONLY)) == -1)
     	{
     		perror(devmem);
    +		if (errno == EPERM) {
    +			fprintf(stderr, "Note: requires running as root with "
    +			    "access to kernel memory (kern.allowkmem=1).\n");
    +		}
     		return NULL;
     	}