filters/log/log.c
/* Called for each key=value passed on the command line. */
Called for each key=value passed on the command line.
Called for each key = value passed on the command line .
static int
log_config (nbdkit_next_config *next, void *nxdata,
            const char *key, const char *value)
{
  if (strcmp (key, "logfile") == 0) {
    free (logfilename);
    logfilename = strdup (value);
    if (!logfilename) {
      nbdkit_error ("strdup: %m");
      return -1;
    }
    return 0;
  }
  if (strcmp (key, "logappend") == 0) {
    append = nbdkit_parse_bool (value);
    if (append < 0)
      return -1;
    return 0;
  }
  return next (nxdata, key, value);
}
static int log_config ( nbdkit_next_config * next , void * nxdata , const char * key , const char * value ) { if ( strcmp ( key , " " ) == 0 ) { free ( logfilename ) ; logfilename = strdup ( value ) ; if ( ! logfilename ) { nbdkit_error ( " " ) ; return -1 ; } return 0 ; } if ( strcmp ( key , " " ) == 0 ) { append = nbdkit_parse_bool ( value ) ; if ( append < 0 ) return -1 ; return 0 ; } return next ( nxdata , key , value ) ; }
Called for each key=value passed on the command line.
Called for each key = value passed on the command line .