u32_t dev;
u8_t pages;
u8_t flags;
-} mess_vmmcp __packed;
+} mess_vmmcp;
typedef struct {
endpoint_t who;
u32_t len;
u16_t fd;
u16_t clearend_and_flags; /* low 12 bits are clearend, rest flags */
-} mess_vm_vfs_mmap __packed;
+} mess_vm_vfs_mmap;
-typedef struct { u8_t flags; void *addr; } mess_vmmcp_reply __packed;
+typedef struct { u8_t flags; void *addr; } mess_vmmcp_reply;
typedef struct {
endpoint_t m_source; /* who sent the message */
#include <namespace.h>
#include <lib.h>
#include <machine/stackframe.h>
+#include <sys/cdefs.h>
#include <ucontext.h>
#include <signal.h>
#include <stdarg.h>
/*===========================================================================*
* resumecontext *
*===========================================================================*/
+__dead
void resumecontext(ucontext_t *ucp)
{
if (ucp->uc_link == NULL) exit(0);
static int ifdefault= -1; /* Default network interface. */
-static void fatal(char *label)
+__dead
+static void fatal(const char *label)
{
printf("init: %s: %s\n", label, strerror(errno));
exit(1);
}
-static void check_mknod(char *device, mode_t mode, int minor)
+static void check_mknod(const char *device, mode_t mode, int minor)
/* Check if a device exists with the proper device number. */
{
dev_t dev;
extern struct sock_ops sock_tcp_ops;
extern struct sock_ops sock_raw_ip_ops;
-void sys_init(void)
+static void sys_init(void)
{
}
set_timer(&tcp_stmr, tcp_sticks, tcp_swatchdog, 0);
netif_init();
- netif_lo = netif_find("lo0");
+ netif_lo = netif_find((char *) "lo0");
/* Read configuration. */
#if 0
static void ds_event(void)
{
char key[DS_MAX_KEYLEN];
- char *driver_prefix = "drv.net.";
+ const char *driver_prefix = "drv.net.";
char *label;
u32_t value;
int type;
endpoint_t owner_endpoint;
int r;
+ int prefix_len;
+
+ prefix_len = strlen(driver_prefix);
/* We may get one notification for multiple updates from DS. Get events
* and owners from DS, until DS tells us that there are no more.
}
/* Only check for network driver up events. */
- if(strncmp(key, driver_prefix, sizeof(driver_prefix))
- || value != DS_DRIVER_UP)
+ if(strncmp(key, driver_prefix, prefix_len)
+ || value != DS_DRIVER_UP) {
return;
+ }
/* The driver label comes after the prefix. */
label = key + strlen(driver_prefix);