PERFORCE change 150550 for review
Ed Schouten
ed at FreeBSD.org
Sat Sep 27 09:01:00 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=150550
Change 150550 by ed at ed_dull on 2008/09/27 09:00:29
IFC.
Affected files ...
.. //depot/projects/mpsafetty/include/Makefile#4 integrate
.. //depot/projects/mpsafetty/include/unistd.h#3 integrate
.. //depot/projects/mpsafetty/sbin/init/init.c#2 integrate
.. //depot/projects/mpsafetty/sys/amd64/amd64/mem.c#2 integrate
.. //depot/projects/mpsafetty/sys/arm/arm/mem.c#2 integrate
.. //depot/projects/mpsafetty/sys/cam/scsi/scsi_sa.c#2 integrate
.. //depot/projects/mpsafetty/sys/cam/scsi/scsi_ses.c#3 integrate
.. //depot/projects/mpsafetty/sys/cam/scsi/scsi_target.c#3 integrate
.. //depot/projects/mpsafetty/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c#3 integrate
.. //depot/projects/mpsafetty/sys/contrib/ipfilter/netinet/ip_compat.h#3 integrate
.. //depot/projects/mpsafetty/sys/contrib/pf/net/pf_ioctl.c#4 integrate
.. //depot/projects/mpsafetty/sys/dev/agp/agp.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/amr/amr.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/arcmsr/arcmsr.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/asr/asr.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/ata/atapi-tape.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/atkbdc/psm.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/bktr/bktr_os.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/ce/if_ce.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/cp/if_cp.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/cpuctl/cpuctl.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/ctau/if_ct.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/drm/drm_drv.c#4 integrate
.. //depot/projects/mpsafetty/sys/dev/drm/drm_fops.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/fb/fb.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/fb/vgareg.h#2 integrate
.. //depot/projects/mpsafetty/sys/dev/firewire/firewire.h#2 integrate
.. //depot/projects/mpsafetty/sys/dev/firewire/fwdev.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/hptiop/hptiop.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/iir/iir_ctrl.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/iscsi/initiator/isc_cam.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/iscsi/initiator/iscsi.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/isp/isp_freebsd.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/joy/joy.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/kbd/kbd.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/mlx/mlx.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/mly/mly.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/mse/mse.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/pbio/pbio.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/powermac_nvram/powermac_nvram.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/ppbus/lpt.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/ppbus/pcfclock.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/ppbus/ppi.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/rp/rpvar.h#2 integrate
.. //depot/projects/mpsafetty/sys/dev/sound/midi/sequencer.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/speaker/spkr.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/streams/streams.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/tdfx/tdfx_pci.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/twa/tw_osl_freebsd.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/twe/twe_freebsd.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/usb/ucomvar.h#4 integrate
.. //depot/projects/mpsafetty/sys/dev/usb/ufm.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/usb/ugen.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/usb/uhid.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/usb/ulpt.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/usb/ums.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/usb/urio.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/usb/usb.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/usb/uscanner.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/xen/console/console.c#8 integrate
.. //depot/projects/mpsafetty/sys/i386/bios/apm.c#2 integrate
.. //depot/projects/mpsafetty/sys/i386/bios/smapi.c#2 integrate
.. //depot/projects/mpsafetty/sys/i386/i386/mem.c#2 integrate
.. //depot/projects/mpsafetty/sys/ia64/ia64/mem.c#2 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_conf.c#7 integrate
.. //depot/projects/mpsafetty/sys/kern/tty.c#50 integrate
.. //depot/projects/mpsafetty/sys/mips/mips/mem.c#2 integrate
.. //depot/projects/mpsafetty/sys/net/if.c#6 integrate
.. //depot/projects/mpsafetty/sys/net/if_tap.c#4 integrate
.. //depot/projects/mpsafetty/sys/net/if_tun.c#3 integrate
.. //depot/projects/mpsafetty/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#2 integrate
.. //depot/projects/mpsafetty/sys/netinet/ip.h#2 integrate
.. //depot/projects/mpsafetty/sys/netinet/ip_input.c#5 integrate
.. //depot/projects/mpsafetty/sys/netsmb/smb_dev.c#3 integrate
.. //depot/projects/mpsafetty/sys/pc98/cbus/gdc.c#2 integrate
.. //depot/projects/mpsafetty/sys/pc98/cbus/olpt.c#2 integrate
.. //depot/projects/mpsafetty/sys/powerpc/powerpc/mem.c#2 integrate
.. //depot/projects/mpsafetty/sys/sparc64/sparc64/mem.c#3 integrate
.. //depot/projects/mpsafetty/sys/vm/vm_page.c#3 integrate
.. //depot/projects/mpsafetty/sys/vm/vm_page.h#2 integrate
.. //depot/projects/mpsafetty/usr.sbin/Makefile#8 integrate
Differences ...
==== //depot/projects/mpsafetty/include/Makefile#4 (text+ko) ====
@@ -1,5 +1,5 @@
# @(#)Makefile 8.2 (Berkeley) 1/4/94
-# $FreeBSD: src/include/Makefile,v 1.282 2008/09/26 05:50:08 peter Exp $
+# $FreeBSD: src/include/Makefile,v 1.283 2008/09/26 19:23:22 peter Exp $
#
# Doing a "make install" builds /usr/include.
@@ -103,16 +103,7 @@
echo "#else" >> osreldate.h; \
echo "#undef __FreeBSD_version" >> osreldate.h; \
echo "#define __FreeBSD_version $$RELDATE" >> osreldate.h; \
- echo "#ifdef __STDC__" >> osreldate.h; \
- echo "#ifndef _OSRELDATE_H" >> osreldate.h; \
- echo "#define _OSRELDATE_H" >> osreldate.h; \
- echo "#include <sys/cdefs.h>" >> osreldate.h; \
- echo "__BEGIN_DECLS" >> osreldate.h; \
- echo "extern int getosreldate(void);" >> osreldate.h; \
- echo "__END_DECLS" >> osreldate.h; \
- echo "#endif /* _OSRELDATE_H */" >> osreldate.h; \
- echo "#endif /* __STDC__ */" >> osreldate.h; \
- echo "#endif /* _KERNEL */" >> osreldate.h
+ echo "#endif" >> osreldate.h
.for i in ${LHDRS}
INCSLINKS+= sys/$i ${INCLUDEDIR}/$i
==== //depot/projects/mpsafetty/include/unistd.h#3 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)unistd.h 8.12 (Berkeley) 4/27/95
- * $FreeBSD: src/include/unistd.h,v 1.90 2008/07/08 03:08:32 davidxu Exp $
+ * $FreeBSD: src/include/unistd.h,v 1.91 2008/09/26 19:23:22 peter Exp $
*/
#ifndef _UNISTD_H_
@@ -485,6 +485,7 @@
int getdomainname(char *, int);
int getgrouplist(const char *, gid_t, gid_t *, int *);
mode_t getmode(const void *, mode_t);
+int getosreldate(void);
int getpeereid(int, uid_t *, gid_t *);
int getresgid(gid_t *, gid_t *, gid_t *);
int getresuid(uid_t *, uid_t *, uid_t *);
==== //depot/projects/mpsafetty/sbin/init/init.c#2 (text+ko) ====
@@ -41,7 +41,7 @@
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 7/15/93";
#endif
static const char rcsid[] =
- "$FreeBSD: src/sbin/init/init.c,v 1.65 2007/11/20 21:25:58 obrien Exp $";
+ "$FreeBSD: src/sbin/init/init.c,v 1.66 2008/09/27 00:09:10 delphij Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -95,15 +95,15 @@
#define RESOURCE_WINDOW "default"
#define RESOURCE_GETTY "default"
-void handle(sig_t, ...);
-void delset(sigset_t *, ...);
+static void handle(sig_t, ...);
+static void delset(sigset_t *, ...);
-void stall(const char *, ...) __printflike(1, 2);
-void warning(const char *, ...) __printflike(1, 2);
-void emergency(const char *, ...) __printflike(1, 2);
-void disaster(int);
-void badsys(int);
-int runshutdown(void);
+static void stall(const char *, ...) __printflike(1, 2);
+static void warning(const char *, ...) __printflike(1, 2);
+static void emergency(const char *, ...) __printflike(1, 2);
+static void disaster(int);
+static void badsys(int);
+static int runshutdown(void);
static char *strk(char *);
/*
@@ -114,15 +114,15 @@
typedef long (*state_func_t)(void);
typedef state_func_t (*state_t)(void);
-state_func_t single_user(void);
-state_func_t runcom(void);
-state_func_t read_ttys(void);
-state_func_t multi_user(void);
-state_func_t clean_ttys(void);
-state_func_t catatonia(void);
-state_func_t death(void);
+static state_func_t single_user(void);
+static state_func_t runcom(void);
+static state_func_t read_ttys(void);
+static state_func_t multi_user(void);
+static state_func_t clean_ttys(void);
+static state_func_t catatonia(void);
+static state_func_t death(void);
-state_func_t run_script(const char *);
+static state_func_t run_script(const char *);
enum { AUTOBOOT, FASTBOOT } runcom_mode = AUTOBOOT;
#define FALSE 0
@@ -133,12 +133,12 @@
int devfs;
-void transition(state_t);
-state_t requested_transition;
+static void transition(state_t);
+static state_t requested_transition;
-void setctty(const char *);
-const char *get_shell(void);
-void write_stderr(const char *message);
+static void setctty(const char *);
+static const char *get_shell(void);
+static void write_stderr(const char *message);
typedef struct init_session {
int se_index; /* index of entry in ttys file */
@@ -160,31 +160,31 @@
struct init_session *se_next;
} session_t;
-void free_session(session_t *);
-session_t *new_session(session_t *, int, struct ttyent *);
-session_t *sessions;
+static void free_session(session_t *);
+static session_t *new_session(session_t *, int, struct ttyent *);
+static session_t *sessions;
-char **construct_argv(char *);
-void start_window_system(session_t *);
-void collect_child(pid_t);
-pid_t start_getty(session_t *);
-void transition_handler(int);
-void alrm_handler(int);
-void setsecuritylevel(int);
-int getsecuritylevel(void);
-int setupargv(session_t *, struct ttyent *);
+static char **construct_argv(char *);
+static void start_window_system(session_t *);
+static void collect_child(pid_t);
+static pid_t start_getty(session_t *);
+static void transition_handler(int);
+static void alrm_handler(int);
+static void setsecuritylevel(int);
+static int getsecuritylevel(void);
+static int setupargv(session_t *, struct ttyent *);
#ifdef LOGIN_CAP
-void setprocresources(const char *);
+static void setprocresources(const char *);
#endif
-int clang;
+static int clang;
-void clear_session_logs(session_t *);
+static void clear_session_logs(session_t *);
-int start_session_db(void);
-void add_session(session_t *);
-void del_session(session_t *);
-session_t *find_session(pid_t);
-DB *session_db;
+static int start_session_db(void);
+static void add_session(session_t *);
+static void del_session(session_t *);
+static session_t *find_session(pid_t);
+static DB *session_db;
/*
* The mother of all processes.
@@ -388,7 +388,7 @@
/*
* Associate a function with a signal handler.
*/
-void
+static void
handle(sig_t handler, ...)
{
int sig;
@@ -412,7 +412,7 @@
/*
* Delete a set of signals from a mask.
*/
-void
+static void
delset(sigset_t *maskp, ...)
{
int sig;
@@ -429,7 +429,7 @@
* to read it and to save log or hardcopy output if the problem is chronic).
* NB: should send a message to the session logger to avoid blocking.
*/
-void
+static void
stall(const char *message, ...)
{
va_list ap;
@@ -445,7 +445,7 @@
* If cpp had variadic macros, the two functions could be #defines for another.
* NB: should send a message to the session logger to avoid blocking.
*/
-void
+static void
warning(const char *message, ...)
{
va_list ap;
@@ -459,7 +459,7 @@
* Log an emergency message.
* NB: should send a message to the session logger to avoid blocking.
*/
-void
+static void
emergency(const char *message, ...)
{
va_list ap;
@@ -475,7 +475,7 @@
* These may arise if a system does not support sysctl.
* We tolerate up to 25 of these, then throw in the towel.
*/
-void
+static void
badsys(int sig)
{
static int badcount = 0;
@@ -488,7 +488,7 @@
/*
* Catch an unexpected signal.
*/
-void
+static void
disaster(int sig)
{
@@ -502,7 +502,7 @@
/*
* Get the security level of the kernel.
*/
-int
+static int
getsecuritylevel(void)
{
#ifdef KERN_SECURELVL
@@ -526,7 +526,7 @@
/*
* Set the security level of the kernel.
*/
-void
+static void
setsecuritylevel(int newlevel)
{
#ifdef KERN_SECURELVL
@@ -554,7 +554,7 @@
* Change states in the finite state machine.
* The initial state is passed as an argument.
*/
-void
+static void
transition(state_t s)
{
@@ -566,7 +566,7 @@
* Close out the accounting files for a login session.
* NB: should send a message to the session logger to avoid blocking.
*/
-void
+static void
clear_session_logs(session_t *sp)
{
char *line = sp->se_device + sizeof(_PATH_DEV) - 1;
@@ -579,7 +579,7 @@
* Start a session and allocate a controlling terminal.
* Only called by children of init after forking.
*/
-void
+static void
setctty(const char *name)
{
int fd;
@@ -595,7 +595,7 @@
}
}
-const char *
+static const char *
get_shell(void)
{
static char kenv_value[PATH_MAX];
@@ -606,7 +606,7 @@
return _PATH_BSHELL;
}
-void
+static void
write_stderr(const char *message)
{
@@ -616,7 +616,7 @@
/*
* Bring the system up single user.
*/
-state_func_t
+static state_func_t
single_user(void)
{
pid_t pid, wpid;
@@ -772,7 +772,7 @@
/*
* Run the system startup script.
*/
-state_func_t
+static state_func_t
runcom(void)
{
state_func_t next_transition;
@@ -793,7 +793,7 @@
* terminated with a signal or exit code != 0.
* - death if a SIGTERM was delivered to init(8).
*/
-state_func_t
+static state_func_t
run_script(const char *script)
{
pid_t pid, wpid;
@@ -890,7 +890,7 @@
*
* NB: We could pass in the size here; is it necessary?
*/
-int
+static int
start_session_db(void)
{
if (session_db && (*session_db->close)(session_db))
@@ -906,7 +906,7 @@
/*
* Add a new login session.
*/
-void
+static void
add_session(session_t *sp)
{
DBT key;
@@ -924,7 +924,7 @@
/*
* Delete an old login session.
*/
-void
+static void
del_session(session_t *sp)
{
DBT key;
@@ -939,7 +939,7 @@
/*
* Look up a login session by pid.
*/
-session_t *
+static session_t *
find_session(pid_t pid)
{
DBT key;
@@ -957,7 +957,7 @@
/*
* Construct an argument vector from a command line.
*/
-char **
+static char **
construct_argv(char *command)
{
int argc = 0;
@@ -976,7 +976,7 @@
/*
* Deallocate a session descriptor.
*/
-void
+static void
free_session(session_t *sp)
{
free(sp->se_device);
@@ -999,7 +999,7 @@
* Allocate a new session descriptor.
* Mark it SE_PRESENT.
*/
-session_t *
+static session_t *
new_session(session_t *sprev, int session_index, struct ttyent *typ)
{
session_t *sp;
@@ -1050,7 +1050,7 @@
/*
* Calculate getty and if useful window argv vectors.
*/
-int
+static int
setupargv(session_t *sp, struct ttyent *typ)
{
@@ -1099,7 +1099,7 @@
/*
* Walk the list of ttys and create sessions for each active line.
*/
-state_func_t
+static state_func_t
read_ttys(void)
{
int session_index = 0;
@@ -1136,7 +1136,7 @@
/*
* Start a window system running.
*/
-void
+static void
start_window_system(session_t *sp)
{
pid_t pid;
@@ -1191,7 +1191,7 @@
/*
* Start a login session running.
*/
-pid_t
+static pid_t
start_getty(session_t *sp)
{
pid_t pid;
@@ -1255,7 +1255,7 @@
* Collect exit status for a child.
* If an exiting login, start a new login running.
*/
-void
+static void
collect_child(pid_t pid)
{
session_t *sp, *sprev, *snext;
@@ -1295,7 +1295,7 @@
/*
* Catch a signal and request a state transition.
*/
-void
+static void
transition_handler(int sig)
{
@@ -1324,7 +1324,7 @@
/*
* Take the system multiuser.
*/
-state_func_t
+static state_func_t
multi_user(void)
{
pid_t pid;
@@ -1364,7 +1364,7 @@
/*
* This is an (n*2)+(n^2) algorithm. We hope it isn't run often...
*/
-state_func_t
+static state_func_t
clean_ttys(void)
{
session_t *sp, *sprev;
@@ -1459,7 +1459,7 @@
/*
* Block further logins.
*/
-state_func_t
+static state_func_t
catatonia(void)
{
session_t *sp;
@@ -1473,7 +1473,7 @@
/*
* Note SIGALRM.
*/
-void
+static void
alrm_handler(int sig)
{
@@ -1484,7 +1484,7 @@
/*
* Bring the system down to single user.
*/
-state_func_t
+static state_func_t
death(void)
{
session_t *sp;
@@ -1532,7 +1532,7 @@
* 0 good.
* >0 some error (exit code)
*/
-int
+static int
runshutdown(void)
{
pid_t pid, wpid;
@@ -1711,7 +1711,7 @@
}
#ifdef LOGIN_CAP
-void
+static void
setprocresources(const char *cname)
{
login_cap_t *lc;
==== //depot/projects/mpsafetty/sys/amd64/amd64/mem.c#2 (text+ko) ====
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/mem.c,v 1.123 2008/06/20 05:22:09 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/mem.c,v 1.124 2008/09/27 08:51:18 ed Exp $");
/*
* Memory special file
@@ -93,7 +93,7 @@
panic("memrw");
continue;
}
- if (minor(dev) == CDEV_MINOR_MEM) {
+ if (dev2unit(dev) == CDEV_MINOR_MEM) {
v = uio->uio_offset;
kmemphys:
o = v & PAGE_MASK;
@@ -101,7 +101,7 @@
error = uiomove((void *)PHYS_TO_DMAP(v), (int)c, uio);
continue;
}
- else if (minor(dev) == CDEV_MINOR_KMEM) {
+ else if (dev2unit(dev) == CDEV_MINOR_KMEM) {
v = uio->uio_offset;
if (v >= DMAP_MIN_ADDRESS && v < DMAP_MAX_ADDRESS) {
@@ -147,9 +147,9 @@
memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr,
int prot __unused)
{
- if (minor(dev) == CDEV_MINOR_MEM)
+ if (dev2unit(dev) == CDEV_MINOR_MEM)
*paddr = offset;
- else if (minor(dev) == CDEV_MINOR_KMEM)
+ else if (dev2unit(dev) == CDEV_MINOR_KMEM)
*paddr = vtophys(offset);
/* else panic! */
return (0);
==== //depot/projects/mpsafetty/sys/arm/arm/mem.c#2 (text+ko) ====
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/mem.c,v 1.5 2007/02/13 15:35:57 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/mem.c,v 1.6 2008/09/27 08:51:18 ed Exp $");
/*
* Memory special file
@@ -91,7 +91,7 @@
panic("memrw");
continue;
}
- if (minor(dev) == CDEV_MINOR_MEM) {
+ if (dev2unit(dev) == CDEV_MINOR_MEM) {
int i;
int address_valid = 0;
@@ -116,7 +116,7 @@
pmap_qremove((vm_offset_t)_tmppt, 1);
continue;
}
- else if (minor(dev) == CDEV_MINOR_KMEM) {
+ else if (dev2unit(dev) == CDEV_MINOR_KMEM) {
c = iov->iov_len;
/*
@@ -156,9 +156,9 @@
memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr,
int prot __unused)
{
- if (minor(dev) == CDEV_MINOR_MEM)
+ if (dev2unit(dev) == CDEV_MINOR_MEM)
*paddr = offset;
- else if (minor(dev) == CDEV_MINOR_KMEM)
+ else if (dev2unit(dev) == CDEV_MINOR_KMEM)
*paddr = vtophys(offset);
/* else panic! */
return (0);
==== //depot/projects/mpsafetty/sys/cam/scsi/scsi_sa.c#2 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.113 2007/06/16 18:20:29 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.114 2008/09/27 08:51:18 ed Exp $");
#include <sys/param.h>
#include <sys/queue.h>
@@ -175,11 +175,11 @@
/* units are bits 4-7, 16-21 (1024 units) */
#define SAUNIT(DEV) \
- (((minor(DEV) & 0xF0) >> 4) | ((minor(DEV) & 0x3f0000) >> 16))
+ (((dev2unit(DEV) & 0xF0) >> 4) | ((dev2unit(DEV) & 0x3f0000) >> 16))
-#define SAMODE(z) ((minor(z) & 0x3))
-#define SADENSITY(z) (((minor(z) >> 2) & 0x3))
-#define SA_IS_CTRL(z) (minor(z) & (1 << 29))
+#define SAMODE(z) ((dev2unit(z) & 0x3))
+#define SADENSITY(z) (((dev2unit(z) >> 2) & 0x3))
+#define SA_IS_CTRL(z) (dev2unit(z) & (1 << 29))
#define SA_NOT_CTLDEV 0
#define SA_CTLDEV 1
==== //depot/projects/mpsafetty/sys/cam/scsi/scsi_ses.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ses.c,v 1.38 2008/09/26 14:19:52 ed Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ses.c,v 1.39 2008/09/27 08:51:18 ed Exp $");
#include <sys/param.h>
#include <sys/queue.h>
@@ -155,7 +155,7 @@
#define SES_FLAG_OPEN 0x02
#define SES_FLAG_INITIALIZED 0x04
-#define SESUNIT(x) (minor((x)))
+#define SESUNIT(x) (dev2unit((x)))
static d_open_t sesopen;
static d_close_t sesclose;
==== //depot/projects/mpsafetty/sys/cam/scsi/scsi_target.c#3 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.74 2008/09/26 14:19:52 ed Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.75 2008/09/27 08:51:18 ed Exp $");
#include <sys/param.h>
@@ -180,7 +180,7 @@
/* Create the targ device, allocate its softc, initialize it */
if ((dev->si_flags & SI_NAMED) == 0) {
- make_dev(&targ_cdevsw, minor(dev), UID_ROOT, GID_WHEEL, 0600,
+ make_dev(&targ_cdevsw, dev2unit(dev), UID_ROOT, GID_WHEEL, 0600,
"targ%d", dev2unit(dev));
}
MALLOC(softc, struct targ_softc *, sizeof(*softc), M_TARG,
==== //depot/projects/mpsafetty/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c#3 (text+ko) ====
@@ -18,7 +18,7 @@
*
* CDDL HEADER END
*
- * $FreeBSD: src/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c,v 1.6 2008/08/19 21:28:58 jb Exp $
+ * $FreeBSD: src/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c,v 1.7 2008/09/27 08:51:18 ed Exp $
*/
/*
@@ -12816,7 +12816,7 @@
#else
if (dev != NULL) {
cr = dev->si_cred;
- m = minor(dev);
+ m = dev2unit(dev);
}
/* Allocate memory for the state. */
@@ -15266,7 +15266,7 @@
* The first minor device is the one that is cloned so there is
* nothing more to do here.
*/
- if (minor(dev) == 0)
+ if (dev2unit(dev) == 0)
return 0;
/*
@@ -15367,7 +15367,7 @@
dtrace_state_t *state = dev->si_drv1;
/* Check if this is not a cloned device. */
- if (minor(dev) == 0)
+ if (dev2unit(dev) == 0)
return (0);
#endif
==== //depot/projects/mpsafetty/sys/contrib/ipfilter/netinet/ip_compat.h#3 (text+ko) ====
@@ -4,7 +4,7 @@
* See the IPFILTER.LICENCE file for details on licencing.
*
* @(#)ip_compat.h 1.8 1/14/96
- * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_compat.h,v 1.36 2008/07/24 12:35:05 darrenr Exp $
+ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_compat.h,v 1.37 2008/09/27 08:51:18 ed Exp $
* Id: ip_compat.h,v 2.142.2.57 2007/10/10 09:51:42 darrenr Exp $
*/
@@ -1709,7 +1709,7 @@
# endif
# ifndef GET_MINOR
-# define GET_MINOR(x) minor(x)
+# define GET_MINOR(x) dev2unit(x)
# endif
# define PANIC(x,y) if (x) panic y
#endif /* _KERNEL */
==== //depot/projects/mpsafetty/sys/contrib/pf/net/pf_ioctl.c#4 (text+ko) ====
@@ -40,7 +40,7 @@
#include "opt_inet6.h"
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/contrib/pf/net/pf_ioctl.c,v 1.35 2008/08/17 23:27:27 bz Exp $");
+__FBSDID("$FreeBSD: src/sys/contrib/pf/net/pf_ioctl.c,v 1.36 2008/09/27 08:51:18 ed Exp $");
#endif
#ifdef __FreeBSD__
@@ -478,7 +478,7 @@
int
pfopen(struct cdev *dev, int flags, int fmt, struct proc *p)
{
- if (minor(dev) >= 1)
+ if (dev2unit(dev) >= 1)
return (ENXIO);
return (0);
}
@@ -486,7 +486,7 @@
int
pfclose(struct cdev *dev, int flags, int fmt, struct proc *p)
{
- if (minor(dev) >= 1)
+ if (dev2unit(dev) >= 1)
return (ENXIO);
return (0);
}
==== //depot/projects/mpsafetty/sys/dev/agp/agp.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/agp/agp.c,v 1.59 2008/08/23 15:57:43 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/agp/agp.c,v 1.60 2008/09/27 08:51:18 ed Exp $");
#include "opt_bus.h"
@@ -80,7 +80,7 @@
};
static devclass_t agp_devclass;
-#define KDEV2DEV(kdev) devclass_get_device(agp_devclass, minor(kdev))
+#define KDEV2DEV(kdev) devclass_get_device(agp_devclass, dev2unit(kdev))
/* Helper functions for implementing chipset mini drivers. */
==== //depot/projects/mpsafetty/sys/dev/amr/amr.c#3 (text+ko) ====
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/amr/amr.c,v 1.86 2008/07/20 16:50:14 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/amr/amr.c,v 1.87 2008/09/27 08:51:18 ed Exp $");
/*
* Driver for the AMI MegaRaid family of controllers.
@@ -438,7 +438,7 @@
static int
amr_open(struct cdev *dev, int flags, int fmt, d_thread_t *td)
{
- int unit = minor(dev);
+ int unit = dev2unit(dev);
struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit);
debug_called(1);
@@ -494,7 +494,7 @@
static int
amr_close(struct cdev *dev, int flags, int fmt, d_thread_t *td)
{
- int unit = minor(dev);
+ int unit = dev2unit(dev);
struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit);
debug_called(1);
==== //depot/projects/mpsafetty/sys/dev/arcmsr/arcmsr.c#2 (text+ko) ====
@@ -56,7 +56,7 @@
** and cause g_vfs_done() read write error
** 1.20.00.15 10/10/2007 Erich Chen support new RAID adapter type ARC120x
******************************************************************************************
-* $FreeBSD: src/sys/dev/arcmsr/arcmsr.c,v 1.27 2007/12/09 19:24:27 scottl Exp $
+* $FreeBSD: src/sys/dev/arcmsr/arcmsr.c,v 1.28 2008/09/27 08:51:18 ed Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
@@ -256,7 +256,7 @@
#if __FreeBSD_version < 503000
struct AdapterControlBlock *acb=dev->si_drv1;
#else
- int unit = minor(dev);
+ int unit = dev2unit(dev);
struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit);
#endif
if(acb==NULL) {
@@ -281,7 +281,7 @@
#if __FreeBSD_version < 503000
struct AdapterControlBlock *acb=dev->si_drv1;
#else
- int unit = minor(dev);
+ int unit = dev2unit(dev);
struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit);
#endif
if(acb==NULL) {
@@ -306,7 +306,7 @@
#if __FreeBSD_version < 503000
struct AdapterControlBlock *acb=dev->si_drv1;
#else
- int unit = minor(dev);
+ int unit = dev2unit(dev);
struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit);
#endif
==== //depot/projects/mpsafetty/sys/dev/asr/asr.c#2 (text+ko) ====
@@ -163,7 +163,7 @@
#include <dev/asr/sys_info.h>
-__FBSDID("$FreeBSD: src/sys/dev/asr/asr.c,v 1.85 2007/06/17 05:55:48 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/asr/asr.c,v 1.86 2008/09/27 08:51:18 ed Exp $");
#define ASR_VERSION 1
#define ASR_REVISION '1'
@@ -3113,7 +3113,7 @@
#undef SCSI_RESET /* Conflicts with "scsi/scsiconf.h" defintion */
#include "dev/asr/osd_unix.h"
-#define asr_unit(dev) minor(dev)
+#define asr_unit(dev) dev2unit(dev)
static u_int8_t ASR_ctlr_held;
==== //depot/projects/mpsafetty/sys/dev/ata/atapi-tape.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-tape.c,v 1.108 2008/05/08 17:55:44 grehan Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-tape.c,v 1.109 2008/09/27 08:51:18 ed Exp $");
#include "opt_ata.h"
#include <sys/param.h>
@@ -238,7 +238,7 @@
ast_write_filemark(dev, ATAPI_WF_WRITE);
/* if minor is even rewind on close */
- if (!(minor(cdev) & 0x01))
+ if (!(dev2unit(cdev) & 0x01))
ast_rewind(dev);
if (stp->cap.lock && count_dev(cdev) == 1)
==== //depot/projects/mpsafetty/sys/dev/atkbdc/psm.c#3 (text+ko) ====
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/atkbdc/psm.c,v 1.98 2008/07/26 00:01:19 trhodes Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/atkbdc/psm.c,v 1.99 2008/09/27 08:51:18 ed Exp $");
#include "opt_isa.h"
#include "opt_psm.h"
@@ -141,8 +141,8 @@
(((b[0] & 0x30) >> 2) | ((b[1] & 0x30) >> 4))
/* some macros */
-#define PSM_UNIT(dev) (minor(dev) >> 1)
-#define PSM_NBLOCKIO(dev) (minor(dev) & 1)
+#define PSM_UNIT(dev) (dev2unit(dev) >> 1)
+#define PSM_NBLOCKIO(dev) (dev2unit(dev) & 1)
#define PSM_MKMINOR(unit,block) (((unit) << 1) | ((block) ? 0:1))
/* ring buffer */
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list