We'd like to specify a way to only boot from a specific block device;
this adds a field to the configuration to hold the value.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
dest->boot_priorities[i].type = src->boot_priorities[i].type;
}
dest->boot_priorities[i].type = src->boot_priorities[i].type;
}
+ if (src->boot_device && strlen(src->boot_device))
+ dest->boot_device = talloc_strdup(dest, src->boot_device);
+ else
+ dest->boot_device = NULL;
+
+ pos += pb_protocol_serialise_string(pos, config->boot_device);
+
assert(pos <= buf + buf_len);
(void)buf_len;
assert(pos <= buf + buf_len);
(void)buf_len;
unsigned int len, i, tmp;
const char *pos;
int rc = -1;
unsigned int len, i, tmp;
const char *pos;
int rc = -1;
len = message->payload_len;
pos = message->payload;
len = message->payload_len;
pos = message->payload;
config->network.n_dns_servers);
for (i = 0; i < config->network.n_dns_servers; i++) {
config->network.n_dns_servers);
for (i = 0; i < config->network.n_dns_servers; i++) {
- char *tmp;
- if (read_string(config->network.dns_servers, &pos, &len, &tmp))
+ if (read_string(config->network.dns_servers, &pos, &len, &str))
- config->network.dns_servers[i] = tmp;
+ config->network.dns_servers[i] = str;
}
if (read_u32(&pos, &len, &config->n_boot_priorities))
}
if (read_u32(&pos, &len, &config->n_boot_priorities))
config->boot_priorities[i].type = tmp;
}
config->boot_priorities[i].type = tmp;
}
+ if (read_string(config, &pos, &len, &str))
+ goto out;
+
+ config->boot_device = str;
+
struct network_config network;
struct boot_priority *boot_priorities;
unsigned int n_boot_priorities;
struct network_config network;
struct boot_priority *boot_priorities;
unsigned int n_boot_priorities;