plugins/streaming/streaming.c
/* Check the user did pass a pipe=<FILENAME> parameter. */
Check the user did pass a pipe= parameter.
Check the user did pass a pipe = parameter .
static int
streaming_config_complete (void)
{
  if (filename == NULL) {
    nbdkit_error ("you must supply the pipe=<FILENAME> parameter "
                  "after the plugin name on the command line");
    return -1;
  }
 again:
  fd = open (filename, O_RDWR|O_CLOEXEC|O_NOCTTY);
  if (fd == -1) {
    if (errno != ENOENT) {
      nbdkit_error ("open: %s: %m", filename);
      return -1;
    }
    if (mknod (filename, S_IFIFO | 0666, 0) == -1) {
      nbdkit_error ("mknod: %s: %m", filename);
      return -1;
    }
    goto again;
  }
  return 0;
}
static int streaming_config_complete ( void ) { if ( filename == NULL ) { nbdkit_error ( " " " " ) ; return -1 ; } again : fd = open ( filename , O_RDWR | O_CLOEXEC | O_NOCTTY ) ; if ( fd == -1 ) { if ( errno != ENOENT ) { nbdkit_error ( " " , filename ) ; return -1 ; } if ( mknod ( filename , S_IFIFO | 0666 , 0 ) == -1 ) { nbdkit_error ( " " , filename ) ; return -1 ; } goto again ; } return 0 ; }
Check the user did pass a pipe=<FILENAME> parameter.
Check the user did pass a pipe = <FILENAME > parameter .
/* Open the file blindly.  If this fails with ENOENT then we create a
   * FIFO and try again.
   */