diff options
Diffstat (limited to 'sys/dev/vinum')
-rw-r--r-- | sys/dev/vinum/vinum.c | 8 | ||||
-rw-r--r-- | sys/dev/vinum/vinumext.h | 6 | ||||
-rw-r--r-- | sys/dev/vinum/vinumio.c | 10 | ||||
-rw-r--r-- | sys/dev/vinum/vinumioctl.c | 6 | ||||
-rw-r--r-- | sys/dev/vinum/vinummemory.c | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c index 5824d84..8ac6afa 100644 --- a/sys/dev/vinum/vinum.c +++ b/sys/dev/vinum/vinum.c @@ -238,7 +238,7 @@ vinum_modevent(module_t mod, modeventtype_t type, void *unused) if (!vinum_inactive(1)) /* is anything open? */ return EBUSY; /* yes, we can't do it */ vinum_conf.flags |= VF_STOPPING; /* note that we want to stop */ - sync(curproc, &dummyarg); /* write out buffers */ + sync(curthread, &dummyarg); /* write out buffers */ free_vinum(0); /* clean up */ #ifdef VINUMDEBUG if (total_malloced) { @@ -293,7 +293,7 @@ int vinumopen(dev_t dev, int flags, int fmt, - struct proc *p) + struct thread *td) { int error; unsigned int index; @@ -378,7 +378,7 @@ vinumopen(dev_t dev, } case VINUM_SUPERDEV_TYPE: - error = suser(p); /* are we root? */ + error = suser_td(td); /* are we root? */ if (error == 0) { /* yes, can do */ if (devminor == VINUM_DAEMON_DEV) /* daemon device */ vinum_conf.flags |= VF_DAEMONOPEN; /* we're open */ @@ -402,7 +402,7 @@ int vinumclose(dev_t dev, int flags, int fmt, - struct proc *p) + struct thread *td) { unsigned int index; struct volume *vol; diff --git a/sys/dev/vinum/vinumext.h b/sys/dev/vinum/vinumext.h index 9b96df8..9d98ee8 100644 --- a/sys/dev/vinum/vinumext.h +++ b/sys/dev/vinum/vinumext.h @@ -62,7 +62,7 @@ extern int debug; /* debug flags */ } #ifndef _KERNEL struct vnode; -struct proc; +struct thread; #endif #ifdef _KERNEL @@ -117,7 +117,7 @@ void remove_plex_entry(int plexno, int force, int recurse); void remove_volume_entry(int volno, int force, int recurse); void checkdiskconfig(char *); -int open_drive(struct drive *, struct proc *, int); +int open_drive(struct drive *, struct thread *, int); void close_drive(struct drive *drive); void close_locked_drive(struct drive *drive); int driveio(struct drive *, char *, size_t, off_t, int); @@ -245,7 +245,7 @@ void FFree(void *mem, char *, int); #define LOCKDRIVE(d) lockdrive (d, __FILE__, __LINE__) #else #define Malloc(x) malloc((x), M_DEVBUF, \ - curproc->p_intr_nesting_level == 0? M_WAITOK: M_NOWAIT) + curthread->td_proc->p_intr_nesting_level == 0? M_WAITOK: M_NOWAIT) #define Free(x) free((x), M_DEVBUF) #define LOCKDRIVE(d) lockdrive (d) #endif diff --git a/sys/dev/vinum/vinumio.c b/sys/dev/vinum/vinumio.c index 564d21c..f329137 100644 --- a/sys/dev/vinum/vinumio.c +++ b/sys/dev/vinum/vinumio.c @@ -49,7 +49,7 @@ static int drivecmp(const void *va, const void *vb); * Return an error number */ int -open_drive(struct drive *drive, struct proc *p, int verbose) +open_drive(struct drive *drive, struct thread *td, int verbose) { int devmajor; /* major devs for disk device */ int devminor; /* minor devs for disk device */ @@ -216,7 +216,7 @@ init_drive(struct drive *drive, int verbose) log(LOG_ERR, "vinum: Can't open drive without drive name\n"); return EINVAL; } - drive->lasterror = open_drive(drive, curproc, verbose); /* open the drive */ + drive->lasterror = open_drive(drive, curthread, verbose); /* open the drive */ if (drive->lasterror) return drive->lasterror; @@ -224,7 +224,7 @@ init_drive(struct drive *drive, int verbose) DIOCGPART, (caddr_t) & drive->partinfo, FREAD, - curproc); + curthread); if (drive->lasterror) { if (verbose) log(LOG_WARNING, @@ -669,7 +669,7 @@ daemon_save_config(void) DIOCWLABEL, (caddr_t) & wlabel_on, FWRITE, - curproc); + curthread); if (error == 0) error = write_drive(drive, (char *) vhdr, VINUMHEADERLEN, VINUM_LABEL_OFFSET); if (error == 0) @@ -682,7 +682,7 @@ daemon_save_config(void) DIOCWLABEL, (caddr_t) & wlabel_on, FWRITE, - curproc); + curthread); unlockdrive(drive); if (error) { log(LOG_ERR, diff --git a/sys/dev/vinum/vinumioctl.c b/sys/dev/vinum/vinumioctl.c index bef310b..aeafdd2 100644 --- a/sys/dev/vinum/vinumioctl.c +++ b/sys/dev/vinum/vinumioctl.c @@ -66,7 +66,7 @@ vinumioctl(dev_t dev, u_long cmd, caddr_t data, int flag, - struct proc *p) + struct thread *td) { unsigned int objno; int error = 0; @@ -319,8 +319,8 @@ vinumioctl(dev_t dev, default: log(LOG_WARNING, "vinumioctl: invalid ioctl from process %d (%s): %lx\n", - curproc->p_pid, - curproc->p_comm, + curthread->td_proc->p_pid, + curthread->td_proc->p_comm, cmd); return EINVAL; diff --git a/sys/dev/vinum/vinummemory.c b/sys/dev/vinum/vinummemory.c index 5a2093b..6936e48 100644 --- a/sys/dev/vinum/vinummemory.c +++ b/sys/dev/vinum/vinummemory.c @@ -152,7 +152,7 @@ MMalloc(int size, char *file, int line) /* Wait for malloc if we can */ result = malloc(size, M_DEVBUF, - curproc->p_intr_nesting_level == 0 ? M_WAITOK : M_NOWAIT); + curthread->td_intr_nesting_level == 0 ? M_WAITOK : M_NOWAIT); if (result == NULL) log(LOG_ERR, "vinum: can't allocate %d bytes from %s:%d\n", size, file, line); else { |