max_console_lines = MAX_CLI_LINES;
} else if (!strncmp(argv[i], "nomenu", 6)) {
menumode = false;
+ } else if (!strncmp(argv[i], "dump_path=", 10)) {
+ strlcpy(hardware->dump_path, argv[i] + 10,
+ sizeof(hardware->dump_path));
+ } else if (!strncmp(argv[i], "tftp_ip=", 8)) {
+ strlcpy(hardware->tftp_ip, argv[i] + 8,
+ sizeof(hardware->tftp_ip));
} else if (!strncmp(argv[i], "auto=", 5)) {
/* The auto= parameter is separated in several argv[]
* as it can contains spaces.
sizeof hardware->modules_alias_path);
memset(hardware->memtest_label, 0, sizeof hardware->memtest_label);
memset(hardware->auto_label, 0, sizeof hardware->auto_label);
+ memset(hardware->dump_path, 0, sizeof hardware->dump_path);
memset(hardware->vesa_background, 0, sizeof hardware->vesa_background);
+ memset(hardware->tftp_ip, 0, sizeof hardware->tftp_ip);
+ strcat(hardware->dump_path, "hdt");
strcat(hardware->pciids_path, "pci.ids");
strcat(hardware->modules_pcimap_path, "modules.pcimap");
strcat(hardware->modules_alias_path, "modules.alias");
char modules_pcimap_path[255];
char modules_alias_path[255];
char pciids_path[255];
+ char dump_path[255]; /* Dump path on the tftp server */
+ char tftp_ip[255]; /* IP address of tftp server (dump mode) */
char memtest_label[255];
char auto_label[AUTO_COMMAND_SIZE];
char vesa_background[255];
void compute_filename(struct s_hardware *hardware, char *filename, int size) {
- snprintf(filename,size,"%s/","hdt");
+ snprintf(filename,size,"%s/",hardware->dump_path);
if (hardware->is_pxe_valid) {
strncat(filename, hardware->pxe.mac_addr, sizeof(hardware->pxe.mac_addr));
/* The filename */
arg[0] = filename;
- /* More to come */
- arg[1] = NULL;
+ /* The server to upload the file */
+ if (strlen(hardware->tftp_ip) != 0) {
+ arg[1] = hardware->tftp_ip;
+ arg[2] = NULL;
+ } else {
+ arg[1] = NULL;
+ }
/* We initiate the cpio to send */
cpio_init(upload,(const char **)arg);