1. 17 Jul, 2012 27 commits
  2. 14 Jul, 2012 10 commits
  3. 13 Jul, 2012 3 commits
    • Erik Hugne's avatar
      tipc: remove print_buf and deprecated log buffer code · 869dd466
      Erik Hugne authored
      The internal log buffer handling functions can now safely be
      removed since there is no code using it anymore.  Requests to
      interact with the internal tipc log buffer over netlink (in
      config.c) will report 'obsolete command'.
      
      This represents the final removal of any references to a
      struct print_buf, and the removal of the struct itself.
      We also get rid of a TIPC specific Kconfig in the process.
      
      Finally, log.h is removed since it is not needed anymore.
      Signed-off-by: default avatarErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      869dd466
    • Erik Hugne's avatar
      tipc: phase out most of the struct print_buf usage · dc1aed37
      Erik Hugne authored
      The tipc_printf is renamed to tipc_snprintf, as the new name
      describes more what the function actually does.  It is also
      changed to take a buffer and length parameter and return
      number of characters written to the buffer.  All callers of
      this function that used to pass a print_buf are updated.
      
      Final removal of the struct print_buf itself will be done
      synchronously with the pending removal of the deprecated
      logging code that also was using it.
      
      Functions that build up a response message with a list of
      ports, nametable contents etc. are changed to return the number
      of characters written to the output buffer. This information
      was previously hidden in a field of the print_buf struct, and
      the number of chars written was fetched with a call to
      tipc_printbuf_validate.  This function is removed since it
      is no longer referenced nor needed.
      
      A generic max size ULTRA_STRING_MAX_LEN is defined, named
      in keeping with the existing TIPC_TLV_ULTRA_STRING, and the
      various definitions in port, link and nametable code that
      largely duplicated this information are removed.  This means
      that amount of link statistics that can be returned is now
      increased from 2k to 32k.
      
      The buffer overflow check is now done just before the reply
      message is passed over netlink or TIPC to a remote node and
      the message indicating a truncated buffer is changed to a less
      dramatic one (less CAPS), placed at the end of the message.
      Signed-off-by: default avatarErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      dc1aed37
    • Erik Hugne's avatar
      tipc: simplify print buffer handling in tipc_printf · e2dbd601
      Erik Hugne authored
      tipc_printf was previously used both to construct debug traces
      and to append data to buffers that should be sent over netlink
      to the tipc-config application.  A global print_buffer was
      used to format the string before it was copied to the actual
      output buffer.  This could lead to concurrent access of the
      global print_buffer, which then had to be lock protected.
      This is simplified by changing tipc_printf to append data
      directly to the output buffer using vscnprintf.
      
      With the new implementation of tipc_printf, there is no longer
      any risk of concurrent access to the internal log buffer, so
      the lock (and the comments describing it) are no longer
      strictly necessary.  However, there are still a few functions
      that do grab this lock before resizing/dumping the log
      buffer.  We leave the lock, and these functions untouched since
      they will be removed with a subsequent commit that drops the
      deprecated log buffer handling code
      Signed-off-by: default avatarErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      e2dbd601