}
(void) r_readdir(name); /* Skip ".." too. */
- while ((ino= r_readdir(name)) != 0) printf("%s/%s\n", dir, name);
+ while (r_readdir(name) != 0) printf("%s/%s\n", dir, name);
}
static u32_t milli_time(void)
#include "options.h"
#include "output.h"
#include "error.h"
-#include "nodes.h" /* show.h needs nodes.h */
-#include "show.h"
#include "trap.h"
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
-#include <errno.h>
#include <sys/types.h>
default: return EINVAL;
}
- samp_ct = pci_inw(reg(samp_ct_reg));
+ /* TODO: is this inw useful? */
+ (void) pci_inw(reg(samp_ct_reg));
curr_samp_ct = pci_inw(reg(curr_samp_ct_reg));
*samples_in_buf = (u32_t) (sub_dev[chan].BufLength * 8192) +
default: return EINVAL;
}
- samp_ct = pci_inw(reg(samp_ct_reg));
+ /* TODO: is this statement useful? */
+ (void) pci_inw(reg(samp_ct_reg));
curr_samp_ct = pci_inw(reg(curr_samp_ct_reg));
*samples_in_buf = (u32_t) (sub_dev[chan].BufLength * 8192) +
PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *UNUSED(info))
{
/* Initialize the DEC 21140A driver. */
- int r;
int fkeys, sfkeys;
(progname=strrchr(env_argv[0],'/')) ? progname++ : (progname=env_argv[0]);
PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *UNUSED(info))
{
/* Initialize the dp8390 driver. */
- int i, r;
+ int i;
dpeth_t *dep;
long v;
/*===========================================================================*
* do_getstat *
*===========================================================================*/
-static void do_getstat(mp)
-message *mp;
+static void do_getstat(message *mp)
{
int port, r;
dpeth_t *dep;
*/
static void mem_nic2user(dpeth_t * dep, int pageno, int pktsize)
{
+ panic("mem_nic2user: not converted to safecopies");
+#if 0
phys_bytes offset;
iovec_dat_s_t *iovp = &dep->de_read_iovec;
int bytes, ix = 0;
- panic("mem_nic2user: not converted to safecopies");
-#if 0
/* Computes shared memory address (skipping receive header) */
offset = pageno * DP_PAGESIZE + sizeof(dp_rcvhdr_t);
dpeth_t *dep;
dp_conf_t *dcp;
message reply_mess;
- const char *portname;
port = mp->DL_PORT;
if (port >= 0 && port < DE_PORT_NR) {
dcp = &dp_conf[port];
strcpy(dep->de_name, DevName);
dep->de_name[4] = '0' + port;
- portname = dep->de_name;
if (dep->de_mode == DEM_DISABLED) {
} else { /* Port number is out of range */
port = ENXIO;
- portname = "(illegal dpeth port)";
}
reply_mess.m_type = DL_CONF_REPLY;
PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *UNUSED(info))
{
/* Initialize the dpeth driver. */
- int r, rc, fkeys, sfkeys;
+ int fkeys, sfkeys;
(progname=strrchr(env_argv[0],'/')) ? progname++ : (progname=env_argv[0]);
#endif
#define lock() (++dep->de_int_pending,sys_irqdisable(&dep->de_hook))
-#define unlock() do{int i=(--dep->de_int_pending)?0:sys_irqenable(&dep->de_hook);}while(0)
+#define unlock() do{int i=(--dep->de_int_pending)?0:sys_irqenable(&dep->de_hook);(void) i;}while(0)
#define milli_delay(t) tickdelay(1)
/** dp.h **/
int i, r, devind;
u16_t vid, did;
u32_t status[2];
- u32_t gfpreg, sector_base_addr, sector_end_addr;
+ u32_t gfpreg, sector_base_addr;
char *dname;
E1000_DEBUG(3, ("%s: probe()\n", e->name));
gfpreg = E1000_READ_FLASH_REG(e, ICH_FLASH_GFPREG);
/*
- * sector_X_addr is a "sector"-aligned address (4096 bytes)
- * Add 1 to sector_end_addr since this sector is included in
- * the overall size.
+ * sector_base_addr is a "sector"-aligned address (4096 bytes)
*/
sector_base_addr = gfpreg & FLASH_GFPREG_BASE_MASK;
- sector_end_addr = ((gfpreg >> 16) & FLASH_GFPREG_BASE_MASK) + 1;
/* flash_base_addr is byte-aligned */
e->flash_base_addr = sector_base_addr << FLASH_SECTOR_ADDR_SHIFT;
*/
message msg;
int ipc_status;
- endpoint_t endpt;
- int r, w = 0;
+ int r;
if (tell_rs) {
/* Tell RS to refresh or restart the driver */
/*===========================================================================*
* fxp_conf_hw *
*===========================================================================*/
-static void fxp_conf_hw(fp)
-fxp_t *fp;
+static void fxp_conf_hw(fxp_t *fp)
{
int i;
int mwi, ext_stat1, ext_stat2, lim_fifo, i82503, fc;
int devind, just_one, i, r;
u16_t vid, did;
- char *dname;
if ((ec->ec_pcibus | ec->ec_pcidev | ec->ec_pcifunc) != 0)
{
return 0;
}
- dname= pci_dev_name(vid, did);
- if (!dname)
- dname= "unknown device";
-
pci_reserve(devind);
getAddressing(devind, ec);
/* Read or write one the driver's minor devices. */
unsigned count;
vir_bytes user_vir;
- struct device *dv;
int accumulated_read = 0;
struct logdevice *log;
size_t vir_offset = 0;
return EIO;
/* Get minor device number and check for /dev/null. */
- dv = &log_geom[log_device];
log = &logdevices[log_device];
while (nr_req > 0) {
* Write data which is denoted by the message to the card and send it. *
*****************************************************************************/
static void or_writev_s (message * mp, int from_int) {
- int port, or_client, count, size, err, data_len, data_off, tx_head;
+ int port, or_client, count, size, err, data_len, data_off;
int o, j, n, i, s, p, cps ;
struct ethhdr *eh;
t_or *orp;
- clock_t timebefore, t0;
- phys_bytes phys_user;
hermes_t *hw;
struct hermes_tx_descriptor desc;
int iov_offset = 0;
struct header_struct hdr;
iovec_s_t *iovp;
- phys_bytes phys_databuf;
u16_t txfid;
/* We need space for the max packet size itself, plus an ethernet
}
}
-PRIVATE void do_next_dev(mp)
-message *mp;
+PRIVATE void do_next_dev(message *mp)
{
int r, devind;
u16_t vid, did;
u16_t *didp
)
{
- int i, devind;
+ int devind;
for (devind= 0; devind < nr_pcidev; devind++)
{
/*===========================================================================*
* pcibr_via_rsts *
*===========================================================================*/
-PRIVATE u16_t pcibr_via_rsts(busind)
-int busind;
+PRIVATE u16_t pcibr_via_rsts(int busind)
{
- int devind;
- devind= pcibus[busind].pb_devind;
-
return 0;
}
/*===========================================================================*
* rl_handler *
*===========================================================================*/
-static int rl_handler(rep)
-re_t *rep;
+static int rl_handler(re_t *rep)
{
int i, port, tx_head, tx_tail, link_up;
u16_t isr, tsad;
PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *UNUSED(info))
{
/* Initialize the rtl8169 driver. */
- int r;
re_t *rep;
long v;
/* Get the BIOS parameters that describe the VDU. */
if (! vdu_initialized++) {
- /* How about error checking? What to do on failure??? */
+ /* FIXME: How about error checking? What to do on failure??? */
s=sys_readbios(VDU_SCREEN_COLS_ADDR, &bios_columns,
VDU_SCREEN_COLS_SIZE);
s=sys_readbios(VDU_CRT_BASE_ADDR, &bios_crtbase,
static cp_grant_t g;
static int proc_nr;
static const struct proc *granter_proc;
- int r, depth = 0;
+ int depth = 0;
do {
/* Get granter process slot (if valid), and check range of
* (presumably) set an invalid grant table entry by returning
* EPERM, just like with an invalid grant id.
*/
- if((r=data_copy(granter,
+ if(data_copy(granter,
priv(granter_proc)->s_grant_table + sizeof(g)*grant,
- KERNEL, (vir_bytes) &g, sizeof(g))) != OK) {
+ KERNEL, (vir_bytes) &g, sizeof(g)) != OK) {
printf(
"verify_grant: grant verify: data_copy failed\n");
return EPERM;