randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -163,7 +163,9 @@ int nbdclient_main(int argc, char **argv)
|
||||
int sock, nbd;
|
||||
int ro;
|
||||
int proto_new; // 0 for old, 1 for new
|
||||
#if BB_MMU
|
||||
char *data;
|
||||
#endif
|
||||
|
||||
// Make sure BLOCKDEV exists
|
||||
nbd = xopen(device, O_RDWR);
|
||||
@ -200,7 +202,9 @@ int nbdclient_main(int argc, char **argv)
|
||||
ioctl(nbd, NBD_SET_SIZE_BLOCKS, size_blocks);
|
||||
ioctl(nbd, NBD_CLEAR_SOCK);
|
||||
ro = !!(old_nbd_header.flags & htons(2));
|
||||
#if BB_MMU
|
||||
data = old_nbd_header.data;
|
||||
#endif
|
||||
} else {
|
||||
unsigned namelen;
|
||||
uint16_t handshake_flags;
|
||||
@ -230,7 +234,9 @@ int nbdclient_main(int argc, char **argv)
|
||||
ioctl(nbd, NBD_SET_FLAGS,
|
||||
ntohs(new_nbd_header.transmission_flags));
|
||||
ro = !!(new_nbd_header.transmission_flags & htons(2));
|
||||
#if BB_MMU
|
||||
data = new_nbd_header.data;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (ioctl(nbd, BLKROSET, &ro) < 0) {
|
||||
|
@ -378,7 +378,7 @@ struct config_keyword {
|
||||
#define OFS(field) offsetof(struct server_config_t, field)
|
||||
|
||||
static const struct config_keyword keywords[] = {
|
||||
/* keyword handler variable address default */
|
||||
/* keyword handler variable address default */
|
||||
{"start" , udhcp_str2nip , OFS(start_ip ), "192.168.0.20"},
|
||||
{"end" , udhcp_str2nip , OFS(end_ip ), "192.168.0.254"},
|
||||
{"interface" , read_str , OFS(interface ), "eth0"},
|
||||
|
Reference in New Issue
Block a user