/*===========================================================================*
* do_ioctl *
*===========================================================================*/
-int do_ioctl()
+int do_ioctl(message *UNUSED(m_out))
{
/* Perform the ioctl(ls_fd, request, argx) system call */
struct vnode *vp;
struct filp *rfilp;
struct fproc *rfp;
+ message m_out;
+ memset(&m_out, 0, sizeof(m_out));
if (maj < 0 || maj >= NR_DEVICES) panic("VFS: out-of-bound major");
rfp->fp_task == driver_e && (rfp->fp_flags & FP_SUSP_REOPEN)) {
rfp->fp_flags &= ~FP_SUSP_REOPEN;
rfp->fp_blocked_on = FP_BLOCKED_ON_NONE;
- reply(rfp->fp_endpoint, ERESTART);
+ reply(&m_out, rfp->fp_endpoint, ERESTART);
}
}
/* Open failed, and automatic reopen was not requested */
rfp->fp_blocked_on = FP_BLOCKED_ON_NONE;
FD_CLR(fd_nr, &rfp->fp_filp_inuse);
- reply(rfp->fp_endpoint, EIO);
+ reply(&m_out, rfp->fp_endpoint, EIO);
continue;
}
if (major(vp->v_sdev) != maj) continue;
rfp->fp_blocked_on = FP_BLOCKED_ON_NONE;
- reply(rfp->fp_endpoint, fd_nr);
+ reply(&m_out, rfp->fp_endpoint, fd_nr);
}
}
/*===========================================================================*
* do_verify_fd *
*===========================================================================*/
-int do_verify_fd(void)
+int do_verify_fd(message *m_out)
{
struct filp *rfilp;
endpoint_t proc_e;
fd = job_m_in.COUNT;
rfilp = (struct filp *) verify_fd(proc_e, fd);
- m_out.ADDRESS = (void *) rfilp;
+ m_out->ADDRESS = (void *) rfilp;
if (rfilp != NULL) unlock_filp(rfilp);
return (rfilp != NULL) ? OK : EINVAL;
}
/*===========================================================================*
* do_set_filp *
*===========================================================================*/
-int do_set_filp(void)
+int do_set_filp(message *UNUSED(m_out))
{
filp_id_t f;
f = (filp_id_t) job_m_in.ADDRESS;
/*===========================================================================*
* do_copy_filp *
*===========================================================================*/
-int do_copy_filp(void)
+int do_copy_filp(message *UNUSED(m_out))
{
endpoint_t proc_e;
filp_id_t f;
/*===========================================================================*
* do_put_filp *
*===========================================================================*/
-int do_put_filp(void)
+int do_put_filp(message *UNUSED(m_out))
{
filp_id_t f;
f = (filp_id_t) job_m_in.ADDRESS;
/*===========================================================================*
* do_cancel_fd *
*===========================================================================*/
-int do_cancel_fd(void)
+int do_cancel_fd(message *UNUSED(m_out))
{
endpoint_t proc_e;
int fd;
/* The parameters of the call are kept here. */
EXTERN message m_in; /* the input message itself */
-EXTERN message m_out; /* the output message used for reply */
# define who_p ((int) (fp - fproc))
# define isokslot(p) (p >= 0 && \
p < (int)(sizeof(fproc) / sizeof(struct fproc)))
EXTERN int err_code; /* temporary storage for error number */
/* Data initialized elsewhere. */
-extern int(*call_vec[]) (void);
-extern int(*pfs_call_vec[]) (void);
+extern int(*call_vec[]) (message *);
+extern int(*pfs_call_vec[]) (message *m_out);
extern char mode_map[]; /* mapping from O_ACCMODE mask to R_BIT/W_BIT flags */
EXTERN struct kinfo kinfo; /* kernel information */
/*===========================================================================*
* do_link *
*===========================================================================*/
-int do_link()
+int do_link(message *UNUSED(m_out))
{
/* Perform the link(name1, name2) system call. */
int r = OK;
/*===========================================================================*
* do_unlink *
*===========================================================================*/
-int do_unlink()
+int do_unlink(message *UNUSED(m_out))
{
/* Perform the unlink(name) or rmdir(name) system call. The code for these two
* is almost the same. They differ only in some condition testing. Unlink()
/*===========================================================================*
* do_rename *
*===========================================================================*/
-int do_rename()
+int do_rename(message *UNUSED(m_out))
{
/* Perform the rename(name1, name2) system call. */
int r = OK, r1;
/*===========================================================================*
* do_truncate *
*===========================================================================*/
-int do_truncate()
+int do_truncate(message *UNUSED(m_out))
{
/* truncate_vnode() does the actual work of do_truncate() and do_ftruncate().
* do_truncate() and do_ftruncate() have to get hold of the inode, either
/*===========================================================================*
* do_ftruncate *
*===========================================================================*/
-int do_ftruncate()
+int do_ftruncate(message *UNUSED(m_out))
{
/* As with do_truncate(), truncate_vnode() does the actual work. */
struct filp *rfilp;
/*===========================================================================*
* do_slink *
*===========================================================================*/
-int do_slink()
+int do_slink(message *UNUSED(m_out))
{
/* Perform the symlink(name1, name2) system call. */
int r;
/*===========================================================================*
* do_rdlink *
*===========================================================================*/
-int do_rdlink()
+int do_rdlink(message *UNUSED(m_out))
{
/* Perform the readlink(name, buf, bufsize) system call. */
int r;
* one call back at a time.
*/
if (vmp->m_flags & VMNT_CALLBACK) {
- reply(proc_e, EAGAIN);
+ replycode(proc_e, EAGAIN);
return;
}
vmp->m_flags |= VMNT_CALLBACK;
/* Already trying to resolve a deadlock, can't
* handle more, sorry */
- reply(proc_e, EAGAIN);
+ replycode(proc_e, EAGAIN);
return;
}
}
r = rw_pipe(op, who_e, f, scratch(fp).io.io_buffer, scratch(fp).io.io_nbytes);
if (r != SUSPEND) /* Do we have results to report? */
- reply(fp->fp_endpoint, r);
+ replycode(fp->fp_endpoint, r);
unlock_filp(f);
thread_cleanup(fp);
{
int error;
struct job my_job;
+ message m_out;
+
+ memset(&m_out, 0, sizeof(m_out));
my_job = *((struct job *) arg);
fp = my_job.j_fp;
error = ENOSYS;
} else {
job_call_nr -= PFS_BASE;
- error = (*pfs_call_vec[job_call_nr])();
+ error = (*pfs_call_vec[job_call_nr])(&m_out);
}
} else {
/* We're dealing with a POSIX system call from a normal
#if ENABLE_SYSCALL_STATS
calls_stats[job_call_nr]++;
#endif
- error = (*call_vec[job_call_nr])();
+ error = (*call_vec[job_call_nr])(&m_out);
}
}
/* Copy the results back to the user and send reply. */
- if (error != SUSPEND) reply(fp->fp_endpoint, error);
+ if (error != SUSPEND) reply(&m_out, fp->fp_endpoint, error);
thread_cleanup(fp);
unlock_proc(fp);
/*===========================================================================*
* reply *
*===========================================================================*/
-void reply(endpoint_t whom, int result)
+void reply(message *m_out, endpoint_t whom, int result)
{
/* Send a reply to a user process. If the send fails, just ignore it. */
int r;
+ m_out->reply_type = result;
+ r = sendnb(whom, m_out);
+ if (r != OK) {
+ printf("VFS: %d couldn't send reply %d to %d: %d\n", mthread_self(),
+ result, whom, r);
+ util_stacktrace();
+ }
+}
+
+/*===========================================================================*
+ * replycode *
+ *===========================================================================*/
+void replycode(endpoint_t whom, int result)
+{
+/* Send a reply to a user process. If the send fails, just ignore it. */
+ int r;
+ message m_out;
+
+ memset(&m_out, 0, sizeof(m_out));
+
m_out.reply_type = result;
r = sendnb(whom, &m_out);
if (r != OK) {
{
int r;
vir_bytes pc, newsp;
+ message m_out;
+
+ memset(&m_out, 0, sizeof(m_out));
switch(job_call_nr) {
case PM_EXEC:
static void service_pm()
{
int r, slot;
+ message m_out;
+
+ memset(&m_out, 0, sizeof(m_out));
switch (job_call_nr) {
case PM_SETUID:
/*===========================================================================*
* do_fcntl *
*===========================================================================*/
-int do_fcntl()
+int do_fcntl(message *UNUSED(m_out))
{
/* Perform the fcntl(fd, request, ...) system call. */
return(r);
}
-/*===========================================================================*
- * do_sync *
- *===========================================================================*/
-int do_sync()
+static int
+sync_fses(void)
{
struct vmnt *vmp;
int r = OK;
return(r);
}
+/*===========================================================================*
+ * do_sync *
+ *===========================================================================*/
+int do_sync(message *UNUSED(m_out))
+{
+ return sync_fses();
+}
+
/*===========================================================================*
* do_fsync *
*===========================================================================*/
-int do_fsync()
+int do_fsync(message *UNUSED(m_out))
{
/* Perform the fsync() system call. */
struct filp *rfilp;
int i;
struct fproc *rfp;
- do_sync();
+ sync_fses();
/* Do exit processing for all leftover processes and servers, but don't
* actually exit them (if they were really gone, PM will tell us about it).
unlock_proc(rfp);
}
- do_sync();
+ sync_fses();
unmount_all(0 /* Don't force */);
/* Try to exit all processes again including File Servers */
unlock_proc(rfp);
}
- do_sync();
+ sync_fses();
unmount_all(1 /* Force */);
}
/*===========================================================================*
* do_svrctl *
*===========================================================================*/
-int do_svrctl()
+int do_svrctl(message *UNUSED(m_out))
{
unsigned int svrctl;
vir_bytes ptr;
/*===========================================================================*
* do_fsready *
*===========================================================================*/
-int do_fsready()
+int do_fsready(message *UNUSED(m_out))
{
/* deprecated */
return(SUSPEND);
/*===========================================================================*
* do_mount *
*===========================================================================*/
-int do_mount()
+int do_mount(message *UNUSED(m_out))
{
/* Perform the mount(name, mfile, mount_flags) system call. */
endpoint_t fs_e;
/*===========================================================================*
* do_umount *
*===========================================================================*/
-int do_umount(void)
+int do_umount(message *m_out)
{
/* Perform the umount(name) system call.
* syscall might provide 'name' embedded in the message.
*/
if (strlen(label) >= M3_LONG_STRING) /* should never evaluate to true */
label[M3_LONG_STRING-1] = 0;
- strlcpy(m_out.umount_label, label, M3_LONG_STRING);
+ strlcpy(m_out->umount_label, label, M3_LONG_STRING);
return(OK);
}
/*===========================================================================*
* do_open *
*===========================================================================*/
-int do_open()
+int do_open(message *UNUSED(m_out))
{
/* Perform the open(name, flags,...) system call.
* syscall might provide 'name' embedded in message when not creating file */
/*===========================================================================*
* do_mknod *
*===========================================================================*/
-int do_mknod()
+int do_mknod(message *UNUSED(m_out))
{
/* Perform the mknod(name, mode, addr) system call. */
register mode_t bits, mode_bits;
/*===========================================================================*
* do_mkdir *
*===========================================================================*/
-int do_mkdir()
+int do_mkdir(message *UNUSED(m_out))
{
/* Perform the mkdir(name, mode) system call. */
mode_t bits; /* mode bits for the new inode */
/*===========================================================================*
* do_lseek *
*===========================================================================*/
-int do_lseek()
+int do_lseek(message *m_out)
{
/* Perform the lseek(ls_fd, offset, whence) system call. */
register struct filp *rfilp;
r = EOVERFLOW;
} else {
/* insert the new position into the output message */
- m_out.reply_l1 = ex64lo(newpos);
+ m_out->reply_l1 = ex64lo(newpos);
if (cmp64(newpos, rfilp->filp_pos) != 0) {
rfilp->filp_pos = newpos;
/*===========================================================================*
* do_llseek *
*===========================================================================*/
-int do_llseek()
+int do_llseek(message *m_out)
{
/* Perform the llseek(ls_fd, offset, whence) system call. */
register struct filp *rfilp;
r = EINVAL;
else {
/* insert the new position into the output message */
- m_out.reply_l1 = ex64lo(newpos);
- m_out.reply_l2 = ex64hi(newpos);
+ m_out->reply_l1 = ex64lo(newpos);
+ m_out->reply_l2 = ex64hi(newpos);
if (cmp64(newpos, rfilp->filp_pos) != 0) {
rfilp->filp_pos = newpos;
/*===========================================================================*
* do_close *
*===========================================================================*/
-int do_close()
+int do_close(message *UNUSED(m_out))
{
/* Perform the close(fd) system call. */
/*===========================================================================*
* do_check_perms *
*===========================================================================*/
-int do_check_perms(void)
+int do_check_perms(message *UNUSED(m_out))
{
return check_perms(job_m_in.USER_ENDPT, (cp_grant_id_t) job_m_in.IO_GRANT,
(size_t) job_m_in.COUNT);
#include "fs.h"
#include <fcntl.h>
#include <signal.h>
+#include <string.h>
#include <assert.h>
#include <minix/callnr.h>
#include <minix/endpoint.h>
/*===========================================================================*
* do_pipe *
*===========================================================================*/
-int do_pipe()
+int do_pipe(message *m_out)
{
/* Perform the pipe(fil_des[2]) system call. */
r = create_pipe(fil_des, 0 /* no flags */);
if (r == OK) {
- m_out.reply_i1 = fil_des[0];
- m_out.reply_i2 = fil_des[1];
+ m_out->reply_i1 = fil_des[0];
+ m_out->reply_i2 = fil_des[1];
}
return r;
/*===========================================================================*
* do_pipe2 *
*===========================================================================*/
-int do_pipe2()
+int do_pipe2(message *m_out)
{
/* Perform the pipe2(fil_des[2], flags) system call. */
int r, flags;
r = create_pipe(fil_des, flags);
if (r == OK) {
- m_out.reply_i1 = fil_des[0];
- m_out.reply_i2 = fil_des[1];
+ m_out->reply_i1 = fil_des[0];
+ m_out->reply_i2 = fil_des[1];
}
return r;
unlock_filp(fil_ptr);
put_vnode(fil_ptr->filp_vno);
fil_ptr->filp_vno = NULL;
- reply(proc_e, returned);
+ replycode(proc_e, returned);
} else {
- reply(proc_e, fd_nr);
+ replycode(proc_e, fd_nr);
}
} else {
rfp->fp_blocked_on = FP_BLOCKED_ON_NONE;
scratch(rfp).file.fd_nr = 0;
if (blocked_on == FP_BLOCKED_ON_POPEN) {
/* process blocked in open or create */
- reply(proc_e, fd_nr);
+ replycode(proc_e, fd_nr);
} else if (blocked_on == FP_BLOCKED_ON_SELECT) {
- reply(proc_e, returned);
+ replycode(proc_e, returned);
} else {
/* Revive a process suspended on TTY or other device.
* Pretend it wants only what there is.
}
rfp->fp_grant = GRANT_INVALID;
}
- reply(proc_e, returned);/* unblock the process */
+ replycode(proc_e, returned);/* unblock the process */
}
}
}
susp_count--;
}
- reply(proc_e, status); /* signal interrupted call */
+ replycode(proc_e, status); /* signal interrupted call */
}
/*===========================================================================*
* do_chmod *
*===========================================================================*/
-int do_chmod()
+int do_chmod(message *UNUSED(m_out))
{
/* Perform the chmod(name, mode) and fchmod(fd, mode) system calls.
* syscall might provide 'name' embedded in the message.
/*===========================================================================*
* do_chown *
*===========================================================================*/
-int do_chown()
+int do_chown(message *UNUSED(m_out))
{
/* Perform the chown(path, owner, group) and fchmod(fd, owner, group) system
* calls. */
/*===========================================================================*
* do_umask *
*===========================================================================*/
-int do_umask()
+int do_umask(message *UNUSED(m_out))
{
/* Perform the umask(co_mode) system call. */
mode_t complement, new_umask;
/*===========================================================================*
* do_access *
*===========================================================================*/
-int do_access()
+int do_access(message *UNUSED(m_out))
{
/* Perform the access(name, mode) system call.
* syscall might provide 'name' embedded in the message.
int ctty_opcl(int op, dev_t dev, endpoint_t proc, int flags);
int clone_opcl(int op, dev_t dev, int proc, int flags);
int ctty_io(int task_nr, message *mess_ptr);
-int do_ioctl(void);
+int do_ioctl(message *m_out);
void pm_setsid(endpoint_t proc_e);
void dev_status(endpoint_t drv_e);
void bdev_up(int major);
int invalidate_filp(struct filp *);
void invalidate_filp_by_endpt(endpoint_t proc_e);
void invalidate_filp_by_char_major(int major);
-int do_verify_fd(void);
+int do_verify_fd(message *m_out);
int set_filp(filp_id_t sfilp);
-int do_set_filp(void);
+int do_set_filp(message *m_out);
int copy_filp(endpoint_t to_ep, filp_id_t cfilp);
-int do_copy_filp(void);
+int do_copy_filp(message *m_out);
int put_filp(filp_id_t pfilp);
-int do_put_filp(void);
+int do_put_filp(message *m_out);
int cancel_fd(endpoint_t ep, int fd);
-int do_cancel_fd(void);
+int do_cancel_fd(message *m_out);
void close_filp(struct filp *fp);
/* fscall.c */
void nested_fs_call(message *m);
/* link.c */
-int do_link(void);
-int do_unlink(void);
-int do_rename(void);
-int do_truncate(void);
-int do_ftruncate(void);
+int do_link(message *m_out);
+int do_unlink(message *m_out);
+int do_rename(message *m_out);
+int do_truncate(message *m_out);
+int do_ftruncate(message *m_out);
int truncate_vnode(struct vnode *vp, off_t newsize);
int rdlink_direct(char *orig_path, char *link_path, struct fproc *rfp);
/* main.c */
int main(void);
void lock_proc(struct fproc *rfp, int force_lock);
-void reply(endpoint_t whom, int result);
+void reply(message *m_out, endpoint_t whom, int result);
+void replycode(endpoint_t whom, int result);
void thread_cleanup(struct fproc *rfp);
void unlock_proc(struct fproc *rfp);
/* misc.c */
void pm_exit(int proc);
-int do_fcntl(void);
+int do_fcntl(message *m_out);
void pm_fork(int pproc, int cproc, int cpid);
void pm_setgid(int proc_e, int egid, int rgid);
void pm_setuid(int proc_e, int euid, int ruid);
void pm_setgroups(int proc_e, int ngroups, gid_t *addr);
-int do_sync(void);
-int do_fsync(void);
+int do_sync(message *m_out);
+int do_fsync(message *m_out);
void pm_reboot(void);
-int do_svrctl(void);
+int do_svrctl(message *m_out);
int do_getsysinfo(void);
int pm_dumpcore(endpoint_t proc_e, int sig, vir_bytes exe_name);
void * ds_event(void *arg);
/* mount.c */
-int do_fsready(void);
-int do_mount(void);
-int do_umount(void);
+int do_fsready(message *m_out);
+int do_mount(message *m_out);
+int do_umount(message *m_out);
int is_nonedev(dev_t dev);
void mount_pfs(void);
int mount_fs(dev_t dev, char mount_dev[PATH_MAX], char mount_path[PATH_MAX],
void unmount_all(int force);
/* open.c */
-int do_close(void);
+int do_close(message *m_out);
int close_fd(struct fproc *rfp, int fd_nr);
void close_reply(void);
int common_open(char path[PATH_MAX], int oflags, mode_t omode);
int do_creat(void);
-int do_lseek(void);
-int do_llseek(void);
-int do_mknod(void);
-int do_mkdir(void);
-int do_open(void);
-int do_slink(void);
+int do_lseek(message *m_out);
+int do_llseek(message *m_out);
+int do_mknod(message *m_out);
+int do_mkdir(message *m_out);
+int do_open(message *m_out);
+int do_slink(message *m_out);
int do_vm_open(void);
int do_vm_close(void);
vmnt **vmp, struct vnode **vp);
int get_name(struct vnode *dirp, struct vnode *entry, char *_name);
int canonical_path(char *orig_path, struct fproc *rfp);
-int do_check_perms(void);
+int do_check_perms(message *m_out);
/* pipe.c */
-int do_pipe(void);
-int do_pipe2(void);
+int do_pipe(message *m_out);
+int do_pipe2(message *m_out);
int map_vnode(struct vnode *vp, endpoint_t fs_e);
void unpause(endpoint_t proc_e);
int pipe_check(struct filp *filp, int rw_flag, int oflags, int bytes,
void wait_for(endpoint_t proc_e);
/* protect.c */
-int do_access(void);
-int do_chmod(void);
-int do_chown(void);
-int do_umask(void);
+int do_access(message *m_out);
+int do_chmod(message *m_out);
+int do_chown(message *m_out);
+int do_umask(message *m_out);
int forbidden(struct fproc *rfp, struct vnode *vp, mode_t
access_desired);
int read_only(struct vnode *vp);
/* read.c */
-int do_read(void);
-int do_getdents(void);
+int do_read(message *m_out);
+int do_getdents(message *m_out);
void lock_bsf(void);
void unlock_bsf(void);
void check_bsf_lock(void);
int req_newdriver(endpoint_t fs_e, dev_t dev, char *label);
/* stadir.c */
-int do_chdir(void);
-int do_fchdir(void);
-int do_chroot(void);
-int do_fstat(void);
-int do_stat(void);
-int do_fstatfs(void);
-int do_statvfs(void);
-int do_fstatvfs(void);
-int do_rdlink(void);
-int do_lstat(void);
+int do_chdir(message *m_out);
+int do_fchdir(message *m_out);
+int do_chroot(message *m_out);
+int do_fstat(message *m_out);
+int do_stat(message *m_out);
+int do_fstatfs(message *m_out);
+int do_statvfs(message *m_out);
+int do_fstatvfs(message *m_out);
+int do_rdlink(message *m_out);
+int do_lstat(message *m_out);
/* time.c */
-int do_utime(void);
-int do_utimens(void);
+int do_utime(message *);
+int do_utimens(message *);
/* tll.c */
void tll_downgrade(tll_t *tllp);
long conv4(int norm, long x);
int copy_name(size_t len, char *dest);
int fetch_name(vir_bytes path, size_t len, char *dest);
-int no_sys(void);
+int no_sys(message *);
int isokendpt_f(char *f, int l, endpoint_t e, int *p, int ft);
int in_group(struct fproc *rfp, gid_t grp);
void upgrade_vnode_lock(struct vnode *vp);
/* write.c */
-int do_write(void);
+int do_write(message *m_out);
/* gcov.c */
int do_gcov_flush(void);
#endif
/* select.c */
-int do_select(void);
+int do_select(message *m_out);
void init_select(void);
void select_callback(struct filp *, int ops);
void select_forget(endpoint_t proc_e);
/*===========================================================================*
* do_read *
*===========================================================================*/
-int do_read()
+int do_read(message *UNUSED(m_out))
{
return(do_read_write_peek(READING, job_m_in.fd,
job_m_in.buffer, (size_t) job_m_in.nbytes));
/*===========================================================================*
* do_getdents *
*===========================================================================*/
-int do_getdents()
+int do_getdents(message *UNUSED(m_out))
{
/* Perform the getdents(fd, buf, size) system call. */
int r = OK;
/*===========================================================================*
* do_select *
*===========================================================================*/
-int do_select(void)
+int do_select(message *UNUSED(m_out))
{
/* Implement the select(nfds, readfds, writefds, errorfds, timeout) system
* call. First we copy the arguments and verify their sanity. Then we check
/*===========================================================================*
* do_fchdir *
*===========================================================================*/
-int do_fchdir()
+int do_fchdir(message *UNUSED(m_out))
{
/* Change directory on already-opened fd. */
struct filp *rfilp;
/*===========================================================================*
* do_chdir *
*===========================================================================*/
-int do_chdir()
+int do_chdir(message *UNUSED(m_out))
{
/* Perform the chdir(name) system call.
* syscall might provide 'name' embedded in the message.
/*===========================================================================*
* do_chroot *
*===========================================================================*/
-int do_chroot()
+int do_chroot(message *UNUSED(m_out))
{
/* Perform the chroot(name) system call.
* syscall might provide 'name' embedded in the message.
/*===========================================================================*
* do_stat *
*===========================================================================*/
-int do_stat()
+int do_stat(message *UNUSED(m_out))
{
/* Perform the stat(name, buf) system call. */
int r;
/*===========================================================================*
* do_fstat *
*===========================================================================*/
-int do_fstat()
+int do_fstat(message *UNUSED(m_out))
{
/* Perform the fstat(fd, buf) system call. */
register struct filp *rfilp;
/*===========================================================================*
* do_fstatfs *
*===========================================================================*/
-int do_fstatfs()
+int do_fstatfs(message *UNUSED(m_out))
{
/* Perform the fstatfs(fd, buf) system call. */
struct filp *rfilp;
/*===========================================================================*
* do_statvfs *
*===========================================================================*/
-int do_statvfs()
+int do_statvfs(message *UNUSED(m_out))
{
/* Perform the stat(name, buf) system call. */
int r;
/*===========================================================================*
* do_fstatvfs *
*===========================================================================*/
-int do_fstatvfs()
+int do_fstatvfs(message *UNUSED(m_out))
{
/* Perform the fstat(fd, buf) system call. */
register struct filp *rfilp;
/*===========================================================================*
* do_lstat *
*===========================================================================*/
-int do_lstat()
+int do_lstat(message *UNUSED(m_out))
{
/* Perform the lstat(name, buf) system call. */
struct vnode *vp;
#include "vnode.h"
#include "vmnt.h"
-int (*call_vec[])(void) = {
+int (*call_vec[])(message *m_out) = {
no_sys, /* 0 = unused */
no_sys, /* 1 = (exit) */
no_sys, /* 2 = (fork) */
/* This should not fail with "array size is negative": */
extern int dummy[sizeof(call_vec) == NCALLS * sizeof(call_vec[0]) ? 1 : -1];
-int (*pfs_call_vec[])(void) = {
+int (*pfs_call_vec[])(message *m_out) = {
no_sys, /* 0 */
do_check_perms, /* 1 */
#include <minix/callnr.h>
#include <minix/com.h>
#include <time.h>
+#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "file.h"
/*===========================================================================*
* do_utime *
*===========================================================================*/
-int do_utime(void)
+int do_utime(message *UNUSED(m_out))
{
/* Perform the utime(name, timep) system call. */
int r;
/*===========================================================================*
* do_utimens *
*===========================================================================*/
-int do_utimens(void)
+int do_utimens(message *UNUSED(m_out))
{
/* Perform the utimens(name, times, flag) system call, and its friends.
* Implement a very large but not complete subset of the utimensat()
vir_bytes vname;
size_t vname_length;
+ memset(&now, 0, sizeof(now));
+
/* The case times==NULL is handled by the caller, replaced with UTIME_NOW */
actim.tv_sec = job_m_in.utime_actime;
actim.tv_nsec = job_m_in.utimens_ansec;
/*===========================================================================*
* no_sys *
*===========================================================================*/
-int no_sys()
+int no_sys(message *UNUSED(m_out))
{
/* Somebody has used an illegal system call number */
return(ENOSYS);
/*===========================================================================*
* do_write *
*===========================================================================*/
-int do_write()
+int do_write(message *UNUSED(m_out))
{
/* Perform the write(fd, buffer, nbytes) system call. */
return(do_read_write_peek(WRITING, job_m_in.fd,