MCPcopy Index your code
hub / github.com/RsyncProject/rsync / OpenConfFile

Function OpenConfFile

params.c:562–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560 } /* Parse */
561
562static FILE *OpenConfFile( char *FileName )
563 /* ------------------------------------------------------------------------ **
564 * Open a config file.
565 *
566 * Input: FileName - The pathname of the config file to be opened.
567 *
568 * Output: A pointer of type (FILE *) to the opened file, or NULL if the
569 * file could not be opened.
570 *
571 * ------------------------------------------------------------------------ **
572 */
573 {
574 FILE *OpenedFile;
575 char *func = "params.c:OpenConfFile() -";
576
577 if( NULL == FileName || 0 == *FileName )
578 {
579 rprintf(FLOG, "%s No config filename specified.\n", func);
580 return( NULL );
581 }
582
583 OpenedFile = fopen( FileName, "r" );
584 if( NULL == OpenedFile )
585 {
586 rsyserr(FLOG, errno, "unable to open config file \"%s\"",
587 FileName);
588 }
589
590 return( OpenedFile );
591 } /* OpenConfFile */
592
593int pm_process( char *FileName,
594 BOOL (*sfunc)(char *),

Callers 1

pm_processFunction · 0.85

Calls 2

rprintfFunction · 0.70
rsyserrFunction · 0.70

Tested by

no test coverage detected