git: <sys/dmsg.h>: Reduce userland namespace pollution.

Rimvydas Jasinskas zrj at crater.dragonflybsd.org
Mon Sep 9 21:05:48 PDT 2019


commit 57aa0496eafe8b8fbb878d2ed450f88ad40e66d5
Author: zrj <rimvydas.jasinskas at gmail.com>
Date:   Sat Aug 31 12:54:15 2019 +0300

    <sys/dmsg.h>: Reduce userland namespace pollution.
    
     Do not include <sys/malloc.h> and <sys/thread.h> for userland here.
     This removes dependencies on these headers for all dmsg consumers like:
      fstyp(8), hammer2(8), mount_hammer2(8), newfs_hammer2(8) and libstand
     which is desired in standalone boot environment.
     Add missing <machine/param.h> for libstand/hammer2.c that needs the
     DEV_BSHIFT definition, previously it was visible through <sys/malloc.h>
     namespace pollution.
    
     While there, mark some guards for clarity too.
    
     Noticed while investigating .depend ​violations.

Summary of changes:
 lib/libstand/hammer2.c | 1 +
 sys/sys/dmsg.h         | 9 +++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/57aa0496eafe8b8fbb878d2ed450f88ad40e66d5


-- 
DragonFly BSD source repository



More information about the Commits mailing list