/* Using this for all null strings saves a lot of memory. */
#define null (resnames[0])
-int reserved(char *s)
+enum resnames reserved(char *s)
/* Recognize reserved strings. */
{
- int r;
+ enum resnames r;
for (r= R_BOOT; r <= R_UNSET; r++) {
if (strcmp(s, resnames[r]) == 0) return r;
return r;
bootstrap(device, active);
+ return 0;
}
void boot_device(char *devname)
{
token *second, *third, *fourth, *sep;
char *name;
- int res;
+ enum resnames res;
size_t n= 0;
if (err) {
#define SEEK_END 2
/* Kernel printf requires a putk() function. */
-int putk(int c)
+void putk(int c)
{
char ch = c;
notify(tasknr);
else if(r != ESRCH)
printf("%s unable to notify inet: %d\n", str_DevName, r);
+ return r;
}
/*===========================================================================*
/*===========================================================================*
* vm_suspend *
*===========================================================================*/
-PRIVATE int vm_suspend(struct proc *caller, struct proc *target,
+PRIVATE void vm_suspend(struct proc *caller, struct proc *target,
vir_bytes linaddr, vir_bytes len, int wrflag, int type)
{
/* This range is not OK for this process. Set parameters
/*===========================================================================*
* arch_pre_exec *
*===========================================================================*/
-PUBLIC int arch_pre_exec(struct proc *pr, u32_t ip, u32_t sp)
+PUBLIC void arch_pre_exec(struct proc *pr, u32_t ip, u32_t sp)
{
/* wipe extra LDT entries, set program counter, and stack pointer. */
memset(pr->p_seg.p_ldt + EXTRA_LDT_INDEX, 0,
_PROTOTYPE( void do_ser_debug, (void) );
_PROTOTYPE( int arch_get_params, (char *parm, int max));
_PROTOTYPE( int arch_set_params, (char *parm, int max));
-_PROTOTYPE( int arch_pre_exec, (struct proc *pr, u32_t, u32_t));
+_PROTOTYPE( void arch_pre_exec, (struct proc *pr, u32_t, u32_t));
_PROTOTYPE( int arch_umap, (struct proc *pr, vir_bytes, vir_bytes,
int, phys_bytes *));
_PROTOTYPE( int arch_do_vmctl, (message *m_ptr, struct proc *p));
#include <ctype.h>
static int b64_add(struct mantissa *e1, struct mantissa *e2);
-static b64_sft(struct mantissa *e1, int n);
+static void b64_sft(struct mantissa *e1, int n);
-static
+static void
mul_ext(struct EXTEND *e1, struct EXTEND *e2, struct EXTEND *e3)
{
/* Multiply the extended numbers e1 and e2, and put the
}
}
-static
+static void
add_ext(struct EXTEND *e1, struct EXTEND *e2, struct EXTEND *e3)
{
/* Add two extended numbers e1 and e2, and put the result
return 1;
}
-static
+static void
b64_sft(struct mantissa *e1, int n)
{
if (n > 0) {
#define BTP (int)(sizeof(big_ten_powers)/sizeof(big_ten_powers[0]))
#define MAX_EXP (TP * BTP - 1)
-static
+static void
add_exponent(struct EXTEND *e, int exp)
{
int neg = exp < 0;
}
}
-_str_ext_cvt(const char *s, char **ss, struct EXTEND *e)
+void _str_ext_cvt(const char *s, char **ss, struct EXTEND *e)
{
/* Like strtod, but for extended precision */
register int c;
#include <math.h>
-static
+
+static void
ten_mult(struct EXTEND *e)
{
struct EXTEND e1 = *e;
return buf;
}
-_dbl_ext_cvt(double value, struct EXTEND *e)
+void _dbl_ext_cvt(double value, struct EXTEND *e)
{
/* Convert double to extended
*/
struct rss_label *src_label, char *dst_label, size_t dst_len) );
FORWARD _PROTOTYPE( int start_service, (struct rproc *rp, int flags,
endpoint_t *ep) );
-FORWARD _PROTOTYPE( int stop_service, (struct rproc *rp,int how) );
+FORWARD _PROTOTYPE( void stop_service, (struct rproc *rp,int how) );
FORWARD _PROTOTYPE( int fork_nb, (void) );
FORWARD _PROTOTYPE( int read_exec, (struct rproc *rp) );
FORWARD _PROTOTYPE( int share_exec, (struct rproc *rp_src,
/*===========================================================================*
* stop_service *
*===========================================================================*/
-PRIVATE int stop_service(rp,how)
-struct rproc *rp;
-int how;
+PRIVATE void stop_service(struct rproc *rp,int how)
{
/* Try to stop the system service. First send a SIGTERM signal to ask the
* system service to terminate. If the service didn't install a signal
/*===========================================================================*
* do_map_memory *
*===========================================================================*/
-PRIVATE int do_map_memory(struct vmproc *vms, struct vmproc *vmd,
+PRIVATE void do_map_memory(struct vmproc *vms, struct vmproc *vmd,
struct vir_region *vrs, struct vir_region *vrd,
vir_bytes offset_s, vir_bytes offset_d,
vir_bytes length, int flag)