create_appliance (char **inputs, int nr_inputs,
const char *whitelist,
const char *modpath,
- const char *initrd)
+ const char *appliance)
{
- out_fd = open (initrd, O_WRONLY | O_CREAT | O_TRUNC | O_NOCTTY, 0644);
+ out_fd = open (appliance, O_WRONLY | O_CREAT | O_TRUNC | O_NOCTTY, 0644);
if (out_fd == -1)
- error (EXIT_FAILURE, errno, "open: %s", initrd);
+ error (EXIT_FAILURE, errno, "open: %s", appliance);
out_offset = 0;
iterate_inputs (inputs, nr_inputs);
/* Finish off and close output file. */
if (close (out_fd) == -1)
- error (EXIT_FAILURE, errno, "close: %s", initrd);
+ error (EXIT_FAILURE, errno, "close: %s", appliance);
}
/* Iterate over the inputs to find out what they are, visiting
extern int verbose;
/* appliance.c */
-extern void create_appliance (char **inputs, int nr_inputs, const char *whitelist, const char *modpath, const char *initrd);
+extern void create_appliance (char **inputs, int nr_inputs, const char *whitelist, const char *modpath, const char *appliance);
/* kernel.c */
extern const char *create_kernel (const char *hostcpu, const char *kernel);
/* Output files. */
const char *kernel = argv[argc-2];
- const char *initrd = argv[argc-1];
+ const char *appliance = argv[argc-1];
if (verbose) {
print_timestamped_message ("whitelist = %s, "
"host_cpu = %s, "
"kernel = %s, "
- "initrd = %s",
+ "appliance = %s",
whitelist ? : "(not specified)",
- hostcpu, kernel, initrd);
+ hostcpu, kernel, appliance);
int i;
for (i = 0; i < nr_inputs; ++i)
print_timestamped_message ("inputs[%d] = %s", i, inputs[i]);
/* Remove the output files if they exist. */
unlink (kernel);
- unlink (initrd);
+ unlink (appliance);
/* Create kernel output file. */
const char *modpath;
print_timestamped_message ("finished creating kernel");
/* Create the appliance. */
- create_appliance (inputs, nr_inputs, whitelist, modpath, initrd);
+ create_appliance (inputs, nr_inputs, whitelist, modpath, appliance);
if (verbose)
print_timestamped_message ("finished creating appliance");