Print this page
12399 kobj printf functions should be checked

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/kobj_impl.h
          +++ new/usr/src/uts/common/sys/kobj_impl.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + *
       25 + * Copyright 2020 Joyent, Inc.
  24   26   */
  25   27  
  26   28  /*
  27   29   * Kernel Run-Time Linker/Loader private interfaces.
  28   30   */
  29   31  
  30   32  #ifndef _SYS_KOBJ_IMPL_H
  31   33  #define _SYS_KOBJ_IMPL_H
  32   34  
  33   35  #include <sys/kdi.h>
↓ open down ↓ 143 lines elided ↑ open up ↑
 177  179          struct proginfo *, struct proginfo *);
 178  180  extern Sym *kobj_lookup_kernel(const char *);
 179  181  extern struct modctl *kobj_boot_mod_lookup(const char *);
 180  182  extern void kobj_export_module(struct module *);
 181  183  extern int kobj_load_primary_module(struct modctl *);
 182  184  extern int boot_compinfo(int, struct compinfo *);
 183  185  extern void mach_modpath(char *, const char *);
 184  186  
 185  187  extern void kobj_setup_standalone_vectors(void);
 186  188  extern void kobj_restore_vectors(void);
 187      -extern void (*_kobj_printf)(void *, const char *fmt, ...);
 188      -extern void (*_vkobj_printf)(void *, const char *fmt, va_list);
      189 +extern void (*_kobj_printf)(void *, const char *fmt, ...) __KPRINTFLIKE(2);
      190 +extern void (*_vkobj_printf)(void *, const char *fmt, va_list)
      191 +    __KVPRINTFLIKE(2);
 189  192  extern void (*kobj_bcopy)(const void *, void *, size_t);
 190  193  extern void (*kobj_bzero)(void *, size_t);
 191  194  extern size_t (*kobj_strlcat)(char *, const char *, size_t);
 192  195  
 193  196  #define KOBJ_LM_PRIMARY         0x0
 194  197  #define KOBJ_LM_DEBUGGER        0x1
 195  198  
 196  199  extern void kobj_lm_append(int, struct modctl *modp);
 197  200  extern struct modctl_list *kobj_lm_lookup(int);
 198  201  extern void kobj_lm_dump(int);
 199  202  
 200  203  #ifdef  __cplusplus
 201  204  }
 202  205  #endif
 203  206  
 204  207  #endif  /* _SYS_KOBJ_IMPL_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX