Diff

Differences From Artifact [d452ee8ca8]:

To Artifact [423ee145a2]:


   141    141   			*error_string = strdup(Tcl_GetStringResult(interp));
   142    142   		}
   143    143   
   144    144   		Tcl_DeleteInterp(interp);
   145    145   
   146    146   		return(NULL);
   147    147   	}
          148  +
          149  +	/*
          150  +	 * Load "pki.tcl" in the same way as appfsd.tcl (see below)
          151  +	 */
          152  +	tcl_ret = Tcl_Eval(interp, ""
          153  +#include "pki.tcl.h"
          154  +	"");
          155  +	if (tcl_ret != TCL_OK) {
          156  +		fprintf(stderr, "Unable to initialize Tcl PKI.  Aborting.\n");
          157  +		fprintf(stderr, "Tcl Error is: %s\n", Tcl_GetStringResult(interp));
          158  +
          159  +		if (error_string) {
          160  +			*error_string = strdup(Tcl_GetStringResult(interp));
          161  +		}
          162  +
          163  +		Tcl_DeleteInterp(interp);
          164  +
          165  +		return(NULL);
          166  +	}
   148    167   
   149    168   	/*
   150    169   	 * Load the "appfsd.tcl" script, which is "compiled" into a C header
   151    170   	 * so that it does not need to exist on the filesystem and can be
   152    171   	 * directly evaluated.
   153    172   	 */
   154    173   	tcl_ret = Tcl_Eval(interp, ""
................................................................................
  1322   1341   	test_interp = appfs_create_TclInterp(&test_interp_error);
  1323   1342   	if (test_interp == NULL) {
  1324   1343   		if (test_interp_error == NULL) {
  1325   1344   			test_interp_error = "Unknown error";
  1326   1345   		}
  1327   1346   
  1328   1347   		fprintf(stderr, "Unable to initialize Tcl interpreter for AppFSd:\n");
  1329         -		fprintf(stderr, "%s", test_interp_error);
         1348  +		fprintf(stderr, "%s\n", test_interp_error);
  1330   1349   
  1331   1350   		return(1);
  1332   1351   	}
  1333   1352   	Tcl_DeleteInterp(test_interp);
  1334   1353   
  1335   1354   	/*
  1336   1355   	 * Enter the FUSE main loop -- this will process any arguments
  1337   1356   	 * and start servicing requests.
  1338   1357   	 */
  1339   1358   	appfs_fuse_started = 1;
  1340   1359   	return(fuse_main(args.argc, args.argv, &appfs_operations, NULL));
  1341   1360   }
  1342   1361