PERFORCE change 169986 for review
Alexander Motin
mav at FreeBSD.org
Sat Oct 31 11:16:18 UTC 2009
http://p4web.freebsd.org/chv.cgi?CH=169986
Change 169986 by mav at mav_mavbook on 2009/10/31 11:15:16
IFC
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#36 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#17 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#46 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/cam.h#9 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/cam_ccb.h#29 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/cam_periph.h#19 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#113 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_da.c#49 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_sg.c#16 integrate
.. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_xpt.c#20 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/bios/apm.c#10 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/conf.h#16 integrate
Differences ...
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_da.c#36 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.7 2009/10/23 08:27:55 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.8 2009/10/31 10:43:38 mav Exp $");
#include <sys/param.h>
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#17 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/ata/ata_da.c,v 1.1 2009/07/10 08:18:08 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/ata/ata_pmp.c,v 1.2 2009/10/31 10:43:38 mav Exp $");
#include <sys/param.h>
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#46 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.9 2009/10/23 12:36:42 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.10 2009/10/31 10:43:38 mav Exp $");
#include <sys/param.h>
#include <sys/bus.h>
==== //depot/projects/scottl-camlock/src/sys/cam/cam.h#9 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/cam/cam.h,v 1.14 2009/10/23 08:27:55 mav Exp $
+ * $FreeBSD: src/sys/cam/cam.h,v 1.15 2009/10/31 10:43:38 mav Exp $
*/
#ifndef _CAM_CAM_H
==== //depot/projects/scottl-camlock/src/sys/cam/cam_ccb.h#29 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/cam/cam_ccb.h,v 1.38 2009/08/18 08:46:54 mav Exp $
+ * $FreeBSD: src/sys/cam/cam_ccb.h,v 1.39 2009/10/31 10:43:38 mav Exp $
*/
#ifndef _CAM_CAM_CCB_H
==== //depot/projects/scottl-camlock/src/sys/cam/cam_periph.h#19 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/cam/cam_periph.h,v 1.20 2009/06/22 14:43:48 scottl Exp $
+ * $FreeBSD: src/sys/cam/cam_periph.h,v 1.21 2009/10/31 10:43:38 mav Exp $
*/
#ifndef _CAM_CAM_PERIPH_H
==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#113 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.229 2009/10/31 09:03:48 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.230 2009/10/31 10:43:38 mav Exp $");
#include <sys/param.h>
#include <sys/bus.h>
==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_da.c#49 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.240 2009/10/23 08:27:55 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.241 2009/10/31 10:43:38 mav Exp $");
#include <sys/param.h>
==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_sg.c#16 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sg.c,v 1.15 2009/07/10 08:18:08 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sg.c,v 1.16 2009/10/31 10:43:38 mav Exp $");
#include <sys/param.h>
#include <sys/systm.h>
==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_xpt.c#20 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_xpt.c,v 1.4 2009/10/23 08:27:55 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_xpt.c,v 1.5 2009/10/31 10:43:38 mav Exp $");
#include <sys/param.h>
#include <sys/bus.h>
==== //depot/projects/scottl-camlock/src/sys/i386/bios/apm.c#10 (text+ko) ====
@@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/bios/apm.c,v 1.155 2009/05/04 08:41:54 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/bios/apm.c,v 1.156 2009/10/31 10:38:30 ed Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -79,9 +79,8 @@
#define SCFLAG_OCTL 0x0000002
#define SCFLAG_OPEN (SCFLAG_ONORMAL|SCFLAG_OCTL)
-#define APMDEV(dev) (dev2unit(dev)&0x0f)
#define APMDEV_NORMAL 0
-#define APMDEV_CTL 8
+#define APMDEV_CTL 1
#ifdef PC98
extern int bios32_apm98(struct bios_regs *, u_int, u_short);
@@ -1249,8 +1248,10 @@
sc->suspending = 0;
sc->running = 0;
- make_dev(&apm_cdevsw, 0, 0, 5, 0664, "apm");
- make_dev(&apm_cdevsw, 8, 0, 5, 0660, "apmctl");
+ make_dev(&apm_cdevsw, APMDEV_NORMAL,
+ UID_ROOT, GID_OPERATOR, 0664, "apm");
+ make_dev(&apm_cdevsw, APMDEV_CTL,
+ UID_ROOT, GID_OPERATOR, 0660, "apmctl");
return 0;
}
@@ -1258,12 +1259,11 @@
apmopen(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct apm_softc *sc = &apm_softc;
- int ctl = APMDEV(dev);
if (sc == NULL || sc->initialized == 0)
return (ENXIO);
- switch (ctl) {
+ switch (dev2unit(dev)) {
case APMDEV_CTL:
if (!(flag & FWRITE))
return EINVAL;
@@ -1275,9 +1275,6 @@
case APMDEV_NORMAL:
sc->sc_flags |= SCFLAG_ONORMAL;
break;
- default:
- return ENXIO;
- break;
}
return 0;
}
@@ -1286,9 +1283,8 @@
apmclose(struct cdev *dev, int flag, int fmt, struct thread *td)
{
struct apm_softc *sc = &apm_softc;
- int ctl = APMDEV(dev);
- switch (ctl) {
+ switch (dev2unit(dev)) {
case APMDEV_CTL:
apm_lastreq_rejected();
sc->sc_flags &= ~SCFLAG_OCTL;
@@ -1429,7 +1425,7 @@
}
/* for /dev/apmctl */
- if (APMDEV(dev) == APMDEV_CTL) {
+ if (dev2unit(dev) == APMDEV_CTL) {
struct apm_event_info *evp;
int i;
@@ -1468,7 +1464,7 @@
int error;
u_char enabled;
- if (APMDEV(dev) != APMDEV_CTL)
+ if (dev2unit(dev) != APMDEV_CTL)
return(ENODEV);
if (uio->uio_resid != sizeof(u_int))
return(E2BIG);
==== //depot/projects/scottl-camlock/src/sys/sys/conf.h#16 (text+ko) ====
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)conf.h 8.5 (Berkeley) 1/9/95
- * $FreeBSD: src/sys/sys/conf.h,v 1.252 2009/08/28 14:06:55 jhb Exp $
+ * $FreeBSD: src/sys/sys/conf.h,v 1.253 2009/10/31 10:35:41 ed Exp $
*/
#ifndef _SYS_CONF_H_
@@ -210,15 +210,13 @@
d_kqfilter_t *d_kqfilter;
d_purge_t *d_purge;
d_mmap_single_t *d_mmap_single;
- uid_t d_uid;
- gid_t d_gid;
- mode_t d_mode;
- const char *d_kind;
+
+ int32_t d_spare0[3];
+ void *d_spare1[3];
/* These fields should not be messed with by drivers */
- LIST_ENTRY(cdevsw) d_list;
LIST_HEAD(, cdev) d_devs;
- int d_spare3;
+ int d_spare2;
union {
struct cdevsw *gianttrick;
SLIST_ENTRY(cdevsw) postfree_list;
More information about the p4-projects
mailing list