MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                           strlog(9F)



NAME
     strlog - submit messages to the log driver

SYNOPSIS
     #include 
     #include 
     #include 



     int strlog(short mid, short sid, char level,
          unsigned short flags, char *fmt, ...);


INTERFACE LEVEL
     Architecture independent level 1 (DI/DKI).

PARAMETERS
     mid      Identification number of the module or driver  sub-
              mitting  the  message (in the case of a module, its
              miidnum value from moduleinfo(9S)).


     sid      Identification number for a particular  minor  dev-
              ice.


     level    Tracing level for selective screening of low prior-
              ity  messages.  Larger  values imply less important
              information.


     flags    Valid flag values are:

              SLEROR      Message is for error logger.


              SLTRACE      Message is for trace.


              SLNOTIFY     Mail  copy  of  message   to   system
                            administrator.


              SLCONSOLE    Log message to console.


              SLFATAL      Error is fatal.


              SLWARN       Error is a warning.




SunOS 5.11          Last change: 16 Jan 2006                    1






Kernel Functions for Drivers                           strlog(9F)



              SLNOTE       Error is a notice.



     fmt      printf(3C) style format string. %e, %g, and %G for-
              mats are not allowed but %s is supported.


DESCRIPTION
     The strlog() function expands the  printf(3C)  style  format
     string  passed to it, that is, the conversion specifiers are
     replaced by the actual argument values in the format string.
     The  32-bit  representations  of  the arguments (up to NLOR-
     GARGS) follow the string starting at the next  32-bit  boun-
     dary  following  the  string.  Note that the 64-bit argument
     will  be  truncated  to  32-bits  here  but  will  be  fully
     represented in the string.


     The messages can be  retrieved  with  the  getmsg(2)  system
     call.  The  flags argument specifies the type of the message
     and where it is to be  sent.  strace(1M)  receives  messages
     from  the  log driver and sends them to the standard output.
     strerr(1M) receives error messages from the log  driver  and
     appends  them to a file called /var/adm/streams/error.mm-dd,
     where mm-dd identifies the date of the error message.

RETURN VALUES
     The strlog() function returns 0 if it fails  to  submit  the
     message to the log(7D) driver and 1 otherwise.

CONTEXT
     The strlog() function can be called from user, interrupt, or
     kernel context.

FILES
     /var/adm/streams/error.mm-dd

         Error messages dated mm-dd appended by  strerr(1M)  from
         the log driver


SEE ALSO
     strace(1M), strerr(1M), getmsg(2), log(7D), moduleinfo(9S)


     Writing Device Drivers


     STREAMS Programming Guide





SunOS 5.11          Last change: 16 Jan 2006                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™