diff options
author | raj <raj@FreeBSD.org> | 2008-10-04 13:19:15 +0000 |
---|---|---|
committer | raj <raj@FreeBSD.org> | 2008-10-04 13:19:15 +0000 |
commit | 766a91b7a6d62bed578f909e51629de4176bc87f (patch) | |
tree | db8b0349779b7454307a5fa81d69c52e0e6689ec /sys/boot | |
parent | 2a77c29adae965cd014d2d82376d68280e2846a4 (diff) | |
download | FreeBSD-src-766a91b7a6d62bed578f909e51629de4176bc87f.zip FreeBSD-src-766a91b7a6d62bed578f909e51629de4176bc87f.tar.gz |
Minor style(9) fixes for U-Boot API glue.
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/uboot/lib/api_public.h | 2 | ||||
-rw-r--r-- | sys/boot/uboot/lib/glue.c | 2 | ||||
-rw-r--r-- | sys/boot/uboot/lib/glue.h | 23 | ||||
-rw-r--r-- | sys/boot/uboot/lib/net.c | 21 |
4 files changed, 23 insertions, 25 deletions
diff --git a/sys/boot/uboot/lib/api_public.h b/sys/boot/uboot/lib/api_public.h index 9edf3af..b0140c5 100644 --- a/sys/boot/uboot/lib/api_public.h +++ b/sys/boot/uboot/lib/api_public.h @@ -118,7 +118,7 @@ struct sys_info { #undef CFG_64BIT_LBA #ifdef CFG_64BIT_LBA -typedef u_int64_t lbasize_t; +typedef uint64_t lbasize_t; #else typedef unsigned long lbasize_t; #endif diff --git a/sys/boot/uboot/lib/glue.c b/sys/boot/uboot/lib/glue.c index ae5d1c0..39b72ef 100644 --- a/sys/boot/uboot/lib/glue.c +++ b/sys/boot/uboot/lib/glue.c @@ -477,7 +477,7 @@ char * ub_mem_type(int flags) { - switch(flags & 0x000F) { + switch (flags & 0x000F) { case MR_ATTR_FLASH: return ("FLASH"); case MR_ATTR_DRAM: diff --git a/sys/boot/uboot/lib/glue.h b/sys/boot/uboot/lib/glue.h index 674c960..3e922d9 100644 --- a/sys/boot/uboot/lib/glue.h +++ b/sys/boot/uboot/lib/glue.h @@ -53,8 +53,8 @@ int api_search_sig(struct api_signature **sig); /* console */ int ub_getc(void); int ub_tstc(void); -void ub_putc(char c); -void ub_puts(const char *s); +void ub_putc(char); +void ub_puts(const char *); /* system */ void ub_reset(void); @@ -65,19 +65,18 @@ void ub_udelay(unsigned long); unsigned long ub_get_timer(unsigned long); /* env vars */ -char *ub_env_get(const char *name); -void ub_env_set(const char *name, char *value); -const char *ub_env_enum(const char *last); +char *ub_env_get(const char *); +void ub_env_set(const char *, char *); +const char *ub_env_enum(const char *); /* devices */ int ub_dev_enum(void); -int ub_dev_open(int handle); -int ub_dev_close(int handle); -int ub_dev_read(int handle, void *buf, lbasize_t len, lbastart_t start, - lbasize_t *rlen); -int ub_dev_send(int handle, void *buf, int len); -int ub_dev_recv(int handle, void *buf, int len, int *rlen); -struct device_info * ub_dev_get(int); +int ub_dev_open(int); +int ub_dev_close(int); +int ub_dev_read(int, void *, lbasize_t, lbastart_t, lbasize_t *); +int ub_dev_send(int, void *, int); +int ub_dev_recv(int, void *, int, int *); +struct device_info *ub_dev_get(int); void ub_dump_di(int); void ub_dump_si(struct sys_info *); diff --git a/sys/boot/uboot/lib/net.c b/sys/boot/uboot/lib/net.c index bef6898..dce794b 100644 --- a/sys/boot/uboot/lib/net.c +++ b/sys/boot/uboot/lib/net.c @@ -59,8 +59,8 @@ static int net_get(struct iodesc *, void *, size_t, time_t); static int net_put(struct iodesc *, void *, size_t); static void net_end(struct netif *); -extern int devs_no; -extern struct netif_stats net_stats[]; +extern int devs_no; +extern struct netif_stats net_stats[]; struct netif_dif net_ifs[] = { /* dif_unit dif_nsel dif_stats dif_private */ @@ -82,10 +82,10 @@ struct netif_driver uboot_net = { }; struct uboot_softc { - u_int32_t sc_pad; - u_int8_t sc_rxbuf[ETHER_MAX_LEN]; - u_int8_t sc_txbuf[ETHER_MAX_LEN + PKTALIGN]; - u_int8_t *sc_txbufp; + uint32_t sc_pad; + uint8_t sc_rxbuf[ETHER_MAX_LEN]; + uint8_t sc_txbuf[ETHER_MAX_LEN + PKTALIGN]; + uint8_t *sc_txbufp; int sc_handle; /* device handle for ub_dev_xxx */ }; @@ -170,10 +170,10 @@ net_put(struct iodesc *desc, void *pkt, size_t len) static int net_get(struct iodesc *desc, void *pkt, size_t len, time_t timeout) { - struct netif *nif = desc->io_netif; - struct uboot_softc *sc = nif->nif_devdata; - time_t t; - int err, rlen; + struct netif *nif = desc->io_netif; + struct uboot_softc *sc = nif->nif_devdata; + time_t t; + int err, rlen; #if defined(NETIF_DEBUG) printf("net_get: pkt %x, len %d, timeout %d\n", pkt, len, timeout); @@ -241,7 +241,6 @@ net_init(struct iodesc *desc, void *machdep_hint) (unsigned long)sc->sc_txbufp % PKTALIGN; } - static void net_end(struct netif *nif) { |