PERFORCE change 109460 for review
Matt Jacob
mjacob at FreeBSD.org
Tue Nov 7 18:24:46 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=109460
Change 109460 by mjacob at newisp on 2006/11/07 18:23:51
IFC
Affected files ...
.. //depot/projects/newisp/amd64/amd64/io.c#2 integrate
.. //depot/projects/newisp/amd64/conf/DEFAULTS#3 integrate
.. //depot/projects/newisp/arm/at91/if_ate.c#3 integrate
.. //depot/projects/newisp/arm/include/atomic.h#2 integrate
.. //depot/projects/newisp/boot/Makefile#3 integrate
.. //depot/projects/newisp/boot/common/load_elf.c#3 integrate
.. //depot/projects/newisp/boot/efi/include/efilib.h#3 integrate
.. //depot/projects/newisp/boot/efi/libefi/Makefile#2 integrate
.. //depot/projects/newisp/boot/efi/libefi/bootinfo.c#2 delete
.. //depot/projects/newisp/boot/efi/libefi/copy.c#2 delete
.. //depot/projects/newisp/boot/efi/libefi/devicename.c#3 delete
.. //depot/projects/newisp/boot/efi/libefi/efiboot.h#3 delete
.. //depot/projects/newisp/boot/efi/libefi/efifpswa.c#2 delete
.. //depot/projects/newisp/boot/efi/libefi/efifs.c#3 integrate
.. //depot/projects/newisp/boot/efi/libefi/efinet.c#2 integrate
.. //depot/projects/newisp/boot/efi/libefi/elf_freebsd.c#2 delete
.. //depot/projects/newisp/boot/efi/libefi/errno.c#1 branch
.. //depot/projects/newisp/boot/efi/libefi/handles.c#1 branch
.. //depot/projects/newisp/boot/efi/libefi/libefi.c#2 integrate
.. //depot/projects/newisp/boot/efi/libefi/module.c#2 delete
.. //depot/projects/newisp/boot/efi/libefi/time.c#2 integrate
.. //depot/projects/newisp/boot/i386/boot2/boot2.c#3 integrate
.. //depot/projects/newisp/boot/i386/libi386/elf32_freebsd.c#3 integrate
.. //depot/projects/newisp/boot/ia64/Makefile#2 integrate
.. //depot/projects/newisp/boot/ia64/common/Makefile#1 branch
.. //depot/projects/newisp/boot/ia64/common/autoload.c#1 branch
.. //depot/projects/newisp/boot/ia64/common/bootinfo.c#1 branch
.. //depot/projects/newisp/boot/ia64/common/copy.c#1 branch
.. //depot/projects/newisp/boot/ia64/common/devicename.c#1 branch
.. //depot/projects/newisp/boot/ia64/common/exec.c#1 branch
.. //depot/projects/newisp/boot/ia64/common/libia64.h#1 branch
.. //depot/projects/newisp/boot/ia64/efi/Makefile#2 integrate
.. //depot/projects/newisp/boot/ia64/efi/conf.c#2 integrate
.. //depot/projects/newisp/boot/ia64/efi/efimd.c#2 integrate
.. //depot/projects/newisp/boot/ia64/efi/main.c#3 integrate
.. //depot/projects/newisp/boot/ia64/efi/version#2 integrate
.. //depot/projects/newisp/boot/ia64/ski/Makefile#2 integrate
.. //depot/projects/newisp/boot/ia64/ski/acpi_stub.c#2 integrate
.. //depot/projects/newisp/boot/ia64/ski/bootinfo.c#2 delete
.. //depot/projects/newisp/boot/ia64/ski/copy.c#2 delete
.. //depot/projects/newisp/boot/ia64/ski/devicename.c#3 delete
.. //depot/projects/newisp/boot/ia64/ski/efi_stub.c#2 integrate
.. //depot/projects/newisp/boot/ia64/ski/elf_freebsd.c#2 delete
.. //depot/projects/newisp/boot/ia64/ski/libski.h#3 integrate
.. //depot/projects/newisp/boot/ia64/ski/main.c#3 integrate
.. //depot/projects/newisp/boot/ia64/ski/skifs.c#2 integrate
.. //depot/projects/newisp/boot/ia64/ski/skimd.c#1 branch
.. //depot/projects/newisp/boot/ia64/ski/version#2 integrate
.. //depot/projects/newisp/boot/pc98/boot2/boot.c#3 integrate
.. //depot/projects/newisp/cam/cam_xpt.c#11 integrate
.. //depot/projects/newisp/cam/scsi/scsi_all.h#3 integrate
.. //depot/projects/newisp/cam/scsi/scsi_da.c#6 integrate
.. //depot/projects/newisp/compat/freebsd32/freebsd32_proto.h#11 integrate
.. //depot/projects/newisp/compat/freebsd32/freebsd32_syscall.h#11 integrate
.. //depot/projects/newisp/compat/freebsd32/freebsd32_syscalls.c#11 integrate
.. //depot/projects/newisp/compat/freebsd32/freebsd32_sysent.c#11 integrate
.. //depot/projects/newisp/compat/freebsd32/syscalls.master#11 integrate
.. //depot/projects/newisp/compat/linux/linux_misc.c#6 integrate
.. //depot/projects/newisp/compat/linux/linux_uid16.c#2 integrate
.. //depot/projects/newisp/compat/svr4/svr4_fcntl.c#3 integrate
.. //depot/projects/newisp/compat/svr4/svr4_misc.c#3 integrate
.. //depot/projects/newisp/conf/NOTES#12 integrate
.. //depot/projects/newisp/conf/files#11 integrate
.. //depot/projects/newisp/conf/options#6 integrate
.. //depot/projects/newisp/contrib/altq/altq/altq_cbq.c#2 integrate
.. //depot/projects/newisp/contrib/altq/altq/altq_cdnr.c#2 integrate
.. //depot/projects/newisp/contrib/altq/altq/altq_hfsc.c#2 integrate
.. //depot/projects/newisp/contrib/altq/altq/altq_priq.c#2 integrate
.. //depot/projects/newisp/contrib/altq/altq/altq_red.c#2 integrate
.. //depot/projects/newisp/contrib/altq/altq/altq_rio.c#2 integrate
.. //depot/projects/newisp/contrib/pf/net/if_pfsync.c#2 integrate
.. //depot/projects/newisp/ddb/db_command.c#3 integrate
.. //depot/projects/newisp/ddb/db_main.c#2 integrate
.. //depot/projects/newisp/dev/aac/aac_pci.c#2 integrate
.. //depot/projects/newisp/dev/acpi_support/acpi_aiboost.c#3 integrate
.. //depot/projects/newisp/dev/an/if_an.c#2 integrate
.. //depot/projects/newisp/dev/arl/if_arl.c#2 integrate
.. //depot/projects/newisp/dev/asr/asr.c#4 integrate
.. //depot/projects/newisp/dev/ata/atapi-cd.c#2 integrate
.. //depot/projects/newisp/dev/ce/if_ce.c#2 integrate
.. //depot/projects/newisp/dev/cnw/if_cnw.c#2 integrate
.. //depot/projects/newisp/dev/cp/if_cp.c#2 integrate
.. //depot/projects/newisp/dev/ctau/if_ct.c#2 integrate
.. //depot/projects/newisp/dev/cx/if_cx.c#2 integrate
.. //depot/projects/newisp/dev/dcons/dcons_os.c#2 integrate
.. //depot/projects/newisp/dev/drm/drmP.h#3 integrate
.. //depot/projects/newisp/dev/fdc/fdc.c#4 integrate
.. //depot/projects/newisp/dev/fxp/if_fxp.c#3 integrate
.. //depot/projects/newisp/dev/hwpmc/hwpmc_mod.c#3 integrate
.. //depot/projects/newisp/dev/if_ndis/if_ndis.c#2 integrate
.. //depot/projects/newisp/dev/kbd/kbd.c#2 integrate
.. //depot/projects/newisp/dev/lmc/if_lmc.c#2 integrate
.. //depot/projects/newisp/dev/lmc/if_lmc.h#2 integrate
.. //depot/projects/newisp/dev/mpt/mpt_cam.c#9 integrate
.. //depot/projects/newisp/dev/mpt/mpt_raid.c#3 integrate
.. //depot/projects/newisp/dev/nmdm/nmdm.c#2 integrate
.. //depot/projects/newisp/dev/null/null.c#2 integrate
.. //depot/projects/newisp/dev/ofw/ofw_console.c#2 integrate
.. //depot/projects/newisp/dev/pci/pci.c#6 integrate
.. //depot/projects/newisp/dev/random/randomdev.c#2 integrate
.. //depot/projects/newisp/dev/sbni/if_sbni.c#2 integrate
.. //depot/projects/newisp/dev/sbsh/if_sbsh.c#2 integrate
.. //depot/projects/newisp/dev/si/si.c#2 integrate
.. //depot/projects/newisp/dev/syscons/syscons.c#4 integrate
.. //depot/projects/newisp/dev/syscons/sysmouse.c#2 integrate
.. //depot/projects/newisp/dev/wi/if_wi.c#2 integrate
.. //depot/projects/newisp/dev/wl/if_wl.c#2 integrate
.. //depot/projects/newisp/dev/zs/zs.c#2 integrate
.. //depot/projects/newisp/fs/devfs/devfs_rule.c#2 integrate
.. //depot/projects/newisp/fs/devfs/devfs_vnops.c#5 integrate
.. //depot/projects/newisp/fs/hpfs/hpfs_vnops.c#2 integrate
.. //depot/projects/newisp/fs/msdosfs/msdosfs_vfsops.c#3 integrate
.. //depot/projects/newisp/fs/msdosfs/msdosfs_vnops.c#3 integrate
.. //depot/projects/newisp/fs/procfs/procfs_ioctl.c#3 integrate
.. //depot/projects/newisp/fs/smbfs/smbfs_node.c#2 integrate
.. //depot/projects/newisp/fs/smbfs/smbfs_smb.c#2 integrate
.. //depot/projects/newisp/fs/smbfs/smbfs_vnops.c#2 integrate
.. //depot/projects/newisp/fs/udf/udf_vfsops.c#3 integrate
.. //depot/projects/newisp/fs/umapfs/umap_vfsops.c#3 integrate
.. //depot/projects/newisp/geom/eli/g_eli.c#4 integrate
.. //depot/projects/newisp/geom/journal/g_journal.c#2 integrate
.. //depot/projects/newisp/gnu/fs/ext2fs/ext2_vfsops.c#3 integrate
.. //depot/projects/newisp/gnu/fs/ext2fs/ext2_vnops.c#2 integrate
.. //depot/projects/newisp/gnu/fs/reiserfs/reiserfs_fs.h#2 integrate
.. //depot/projects/newisp/gnu/fs/reiserfs/reiserfs_vfsops.c#3 integrate
.. //depot/projects/newisp/gnu/fs/xfs/FreeBSD/xfs_super.c#2 integrate
.. //depot/projects/newisp/i386/conf/DEFAULTS#3 integrate
.. //depot/projects/newisp/i386/i386/io.c#2 integrate
.. //depot/projects/newisp/i386/i386/sys_machdep.c#4 integrate
.. //depot/projects/newisp/i386/i386/vm86.c#2 integrate
.. //depot/projects/newisp/i386/ibcs2/ibcs2_misc.c#3 integrate
.. //depot/projects/newisp/i386/ibcs2/ibcs2_socksys.c#2 integrate
.. //depot/projects/newisp/i386/ibcs2/ibcs2_sysi86.c#2 integrate
.. //depot/projects/newisp/i386/linux/linux_machdep.c#5 integrate
.. //depot/projects/newisp/i4b/driver/i4b_ipr.c#2 integrate
.. //depot/projects/newisp/ia64/conf/DEFAULTS#3 integrate
.. //depot/projects/newisp/ia64/ia64/machdep.c#3 integrate
.. //depot/projects/newisp/ia64/ia64/ssc.c#2 integrate
.. //depot/projects/newisp/isofs/cd9660/cd9660_vfsops.c#3 integrate
.. //depot/projects/newisp/kern/init_sysent.c#8 integrate
.. //depot/projects/newisp/kern/kern_acct.c#4 integrate
.. //depot/projects/newisp/kern/kern_descrip.c#3 integrate
.. //depot/projects/newisp/kern/kern_environment.c#3 integrate
.. //depot/projects/newisp/kern/kern_exec.c#5 integrate
.. //depot/projects/newisp/kern/kern_fork.c#4 integrate
.. //depot/projects/newisp/kern/kern_jail.c#4 integrate
.. //depot/projects/newisp/kern/kern_ktrace.c#3 integrate
.. //depot/projects/newisp/kern/kern_linker.c#3 integrate
.. //depot/projects/newisp/kern/kern_ntptime.c#2 integrate
.. //depot/projects/newisp/kern/kern_priv.c#1 branch
.. //depot/projects/newisp/kern/kern_prot.c#4 integrate
.. //depot/projects/newisp/kern/kern_resource.c#4 integrate
.. //depot/projects/newisp/kern/kern_shutdown.c#3 integrate
.. //depot/projects/newisp/kern/kern_sysctl.c#3 integrate
.. //depot/projects/newisp/kern/kern_thr.c#4 integrate
.. //depot/projects/newisp/kern/kern_time.c#4 integrate
.. //depot/projects/newisp/kern/kern_umtx.c#10 integrate
.. //depot/projects/newisp/kern/kern_xxx.c#2 integrate
.. //depot/projects/newisp/kern/subr_acl_posix1e.c#2 integrate
.. //depot/projects/newisp/kern/subr_firmware.c#2 integrate
.. //depot/projects/newisp/kern/subr_prf.c#4 integrate
.. //depot/projects/newisp/kern/subr_witness.c#3 integrate
.. //depot/projects/newisp/kern/syscalls.c#8 integrate
.. //depot/projects/newisp/kern/syscalls.master#8 integrate
.. //depot/projects/newisp/kern/systrace_args.c#8 integrate
.. //depot/projects/newisp/kern/sysv_ipc.c#2 integrate
.. //depot/projects/newisp/kern/sysv_msg.c#4 integrate
.. //depot/projects/newisp/kern/tty.c#7 integrate
.. //depot/projects/newisp/kern/tty_cons.c#3 integrate
.. //depot/projects/newisp/kern/tty_pts.c#4 integrate
.. //depot/projects/newisp/kern/tty_pty.c#5 integrate
.. //depot/projects/newisp/kern/uipc_mbuf.c#4 integrate
.. //depot/projects/newisp/kern/uipc_mqueue.c#3 integrate
.. //depot/projects/newisp/kern/uipc_sem.c#3 integrate
.. //depot/projects/newisp/kern/uipc_socket.c#6 integrate
.. //depot/projects/newisp/kern/uipc_syscalls.c#4 integrate
.. //depot/projects/newisp/kern/vfs_mount.c#6 integrate
.. //depot/projects/newisp/kern/vfs_subr.c#7 integrate
.. //depot/projects/newisp/kern/vfs_syscalls.c#7 integrate
.. //depot/projects/newisp/kern/vfs_vnops.c#3 integrate
.. //depot/projects/newisp/modules/ath_rate_amrr/Makefile#3 integrate
.. //depot/projects/newisp/modules/bge/Makefile#2 integrate
.. //depot/projects/newisp/modules/nfe/Makefile#2 integrate
.. //depot/projects/newisp/net/bpf.c#3 integrate
.. //depot/projects/newisp/net/bridgestp.c#4 integrate
.. //depot/projects/newisp/net/if.c#4 integrate
.. //depot/projects/newisp/net/if_bridge.c#6 integrate
.. //depot/projects/newisp/net/if_gre.c#2 integrate
.. //depot/projects/newisp/net/if_ppp.c#4 integrate
.. //depot/projects/newisp/net/if_sl.c#2 integrate
.. //depot/projects/newisp/net/if_tap.c#3 integrate
.. //depot/projects/newisp/net/if_tun.c#3 integrate
.. //depot/projects/newisp/net/ppp_tty.c#2 integrate
.. //depot/projects/newisp/net/raw_usrreq.c#2 integrate
.. //depot/projects/newisp/net/rtsock.c#2 integrate
.. //depot/projects/newisp/net80211/ieee80211_ioctl.c#3 integrate
.. //depot/projects/newisp/netatalk/at_control.c#2 integrate
.. //depot/projects/newisp/netatalk/ddp_pcb.c#2 integrate
.. //depot/projects/newisp/netatm/atm_usrreq.c#2 integrate
.. //depot/projects/newisp/netgraph/bluetooth/drivers/h4/ng_h4.c#2 integrate
.. //depot/projects/newisp/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c#2 integrate
.. //depot/projects/newisp/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c#2 integrate
.. //depot/projects/newisp/netgraph/ng_device.c#2 integrate
.. //depot/projects/newisp/netgraph/ng_socket.c#3 integrate
.. //depot/projects/newisp/netgraph/ng_tty.c#2 integrate
.. //depot/projects/newisp/netinet/in.c#3 integrate
.. //depot/projects/newisp/netinet/in_pcb.c#4 integrate
.. //depot/projects/newisp/netinet/in_proto.c#2 integrate
.. //depot/projects/newisp/netinet/ip_carp.c#4 integrate
.. //depot/projects/newisp/netinet/ip_divert.c#3 integrate
.. //depot/projects/newisp/netinet/ip_fw2.c#6 integrate
.. //depot/projects/newisp/netinet/ip_mroute.c#4 integrate
.. //depot/projects/newisp/netinet/ip_output.c#7 integrate
.. //depot/projects/newisp/netinet/raw_ip.c#4 integrate
.. //depot/projects/newisp/netinet/sctp.h#1 branch
.. //depot/projects/newisp/netinet/sctp_asconf.c#1 branch
.. //depot/projects/newisp/netinet/sctp_asconf.h#1 branch
.. //depot/projects/newisp/netinet/sctp_auth.c#1 branch
.. //depot/projects/newisp/netinet/sctp_auth.h#1 branch
.. //depot/projects/newisp/netinet/sctp_bsd_addr.c#1 branch
.. //depot/projects/newisp/netinet/sctp_bsd_addr.h#1 branch
.. //depot/projects/newisp/netinet/sctp_constants.h#1 branch
.. //depot/projects/newisp/netinet/sctp_crc32.c#1 branch
.. //depot/projects/newisp/netinet/sctp_crc32.h#1 branch
.. //depot/projects/newisp/netinet/sctp_header.h#1 branch
.. //depot/projects/newisp/netinet/sctp_indata.c#1 branch
.. //depot/projects/newisp/netinet/sctp_indata.h#1 branch
.. //depot/projects/newisp/netinet/sctp_input.c#1 branch
.. //depot/projects/newisp/netinet/sctp_input.h#1 branch
.. //depot/projects/newisp/netinet/sctp_lock_bsd.h#1 branch
.. //depot/projects/newisp/netinet/sctp_os.h#1 branch
.. //depot/projects/newisp/netinet/sctp_os_bsd.h#1 branch
.. //depot/projects/newisp/netinet/sctp_output.c#1 branch
.. //depot/projects/newisp/netinet/sctp_output.h#1 branch
.. //depot/projects/newisp/netinet/sctp_pcb.c#1 branch
.. //depot/projects/newisp/netinet/sctp_pcb.h#1 branch
.. //depot/projects/newisp/netinet/sctp_peeloff.c#1 branch
.. //depot/projects/newisp/netinet/sctp_peeloff.h#1 branch
.. //depot/projects/newisp/netinet/sctp_structs.h#1 branch
.. //depot/projects/newisp/netinet/sctp_timer.c#1 branch
.. //depot/projects/newisp/netinet/sctp_timer.h#1 branch
.. //depot/projects/newisp/netinet/sctp_uio.h#1 branch
.. //depot/projects/newisp/netinet/sctp_usrreq.c#1 branch
.. //depot/projects/newisp/netinet/sctp_var.h#1 branch
.. //depot/projects/newisp/netinet/sctputil.c#1 branch
.. //depot/projects/newisp/netinet/sctputil.h#1 branch
.. //depot/projects/newisp/netinet/tcp_subr.c#8 integrate
.. //depot/projects/newisp/netinet/udp_usrreq.c#5 integrate
.. //depot/projects/newisp/netinet6/in6.c#3 integrate
.. //depot/projects/newisp/netinet6/in6_pcb.c#2 integrate
.. //depot/projects/newisp/netinet6/in6_proto.c#3 integrate
.. //depot/projects/newisp/netinet6/in6_src.c#2 integrate
.. //depot/projects/newisp/netinet6/ipsec.c#2 integrate
.. //depot/projects/newisp/netinet6/sctp6_usrreq.c#1 branch
.. //depot/projects/newisp/netinet6/sctp6_var.h#1 branch
.. //depot/projects/newisp/netinet6/udp6_usrreq.c#3 integrate
.. //depot/projects/newisp/netipsec/ipsec.c#2 integrate
.. //depot/projects/newisp/netipsec/ipsec_osdep.h#2 integrate
.. //depot/projects/newisp/netipx/ipx_pcb.c#2 integrate
.. //depot/projects/newisp/netipx/ipx_usrreq.c#2 integrate
.. //depot/projects/newisp/netncp/ncp_conn.c#2 integrate
.. //depot/projects/newisp/netncp/ncp_mod.c#2 integrate
.. //depot/projects/newisp/netncp/ncp_subr.h#2 integrate
.. //depot/projects/newisp/netsmb/smb_conn.c#2 integrate
.. //depot/projects/newisp/netsmb/smb_subr.c#2 integrate
.. //depot/projects/newisp/netsmb/smb_subr.h#2 integrate
.. //depot/projects/newisp/nfsclient/bootp_subr.c#2 integrate
.. //depot/projects/newisp/nfsserver/nfs_syscalls.c#3 integrate
.. //depot/projects/newisp/pc98/cbus/fdc.c#3 integrate
.. //depot/projects/newisp/pc98/conf/DEFAULTS#3 integrate
.. //depot/projects/newisp/posix4/p1003_1b.c#2 integrate
.. //depot/projects/newisp/powerpc/conf/DEFAULTS#3 integrate
.. //depot/projects/newisp/security/audit/audit.c#6 integrate
.. //depot/projects/newisp/security/audit/audit_arg.c#3 integrate
.. //depot/projects/newisp/security/audit/audit_pipe.c#2 integrate
.. //depot/projects/newisp/security/audit/audit_private.h#4 integrate
.. //depot/projects/newisp/security/audit/audit_syscalls.c#6 integrate
.. //depot/projects/newisp/security/mac/mac_framework.h#4 integrate
.. //depot/projects/newisp/security/mac/mac_internal.h#4 integrate
.. //depot/projects/newisp/security/mac/mac_net.c#4 integrate
.. //depot/projects/newisp/security/mac/mac_priv.c#1 branch
.. //depot/projects/newisp/security/mac/mac_system.c#3 integrate
.. //depot/projects/newisp/security/mac_bsdextended/mac_bsdextended.c#2 integrate
.. //depot/projects/newisp/security/mac_lomac/mac_lomac.c#4 integrate
.. //depot/projects/newisp/security/mac_partition/mac_partition.c#2 integrate
.. //depot/projects/newisp/security/mac_portacl/mac_portacl.c#3 integrate
.. //depot/projects/newisp/security/mac_seeotheruids/mac_seeotheruids.c#2 integrate
.. //depot/projects/newisp/security/mac_stub/mac_stub.c#2 integrate
.. //depot/projects/newisp/sparc64/conf/DEFAULTS#3 integrate
.. //depot/projects/newisp/sparc64/sparc64/genassym.c#4 integrate
.. //depot/projects/newisp/sparc64/sparc64/machdep.c#3 integrate
.. //depot/projects/newisp/sun4v/conf/DEFAULTS#3 integrate
.. //depot/projects/newisp/sun4v/include/elf.h#2 integrate
.. //depot/projects/newisp/sun4v/include/hypervisor_api.h#2 integrate
.. //depot/projects/newisp/sun4v/include/trap.h#2 integrate
.. //depot/projects/newisp/sun4v/include/utrap.h#2 integrate
.. //depot/projects/newisp/sun4v/sun4v/exception.S#2 integrate
.. //depot/projects/newisp/sun4v/sun4v/hvcons.c#3 integrate
.. //depot/projects/newisp/sun4v/sun4v/machdep.c#3 integrate
.. //depot/projects/newisp/sun4v/sun4v/pmap.c#3 integrate
.. //depot/projects/newisp/sun4v/sun4v/trap.c#3 integrate
.. //depot/projects/newisp/sun4v/sun4v/wbuf.S#2 integrate
.. //depot/projects/newisp/sys/jail.h#2 integrate
.. //depot/projects/newisp/sys/libkern.h#2 integrate
.. //depot/projects/newisp/sys/mac_policy.h#6 integrate
.. //depot/projects/newisp/sys/mbuf.h#6 integrate
.. //depot/projects/newisp/sys/priv.h#1 branch
.. //depot/projects/newisp/sys/socket.h#2 integrate
.. //depot/projects/newisp/sys/syscall.h#8 integrate
.. //depot/projects/newisp/sys/syscall.mk#8 integrate
.. //depot/projects/newisp/sys/sysproto.h#8 integrate
.. //depot/projects/newisp/sys/systm.h#5 integrate
.. //depot/projects/newisp/ufs/ffs/ffs_alloc.c#2 integrate
.. //depot/projects/newisp/ufs/ffs/ffs_vfsops.c#5 integrate
.. //depot/projects/newisp/ufs/ffs/ffs_vnops.c#3 integrate
.. //depot/projects/newisp/ufs/ufs/ufs_extattr.c#2 integrate
.. //depot/projects/newisp/ufs/ufs/ufs_quota.c#4 integrate
.. //depot/projects/newisp/ufs/ufs/ufs_vnops.c#6 integrate
.. //depot/projects/newisp/vm/swap_pager.c#4 integrate
.. //depot/projects/newisp/vm/vm_mmap.c#3 integrate
Differences ...
==== //depot/projects/newisp/amd64/amd64/io.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/io.c,v 1.1 2004/08/01 11:40:50 markm Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/io.c,v 1.2 2006/11/06 13:41:49 rwatson Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -33,6 +33,7 @@
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
+#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/signalvar.h>
#include <sys/systm.h>
@@ -54,7 +55,7 @@
{
int error;
- error = suser(td);
+ error = priv_check(td, PRIV_IO);
if (error != 0)
return (error);
error = securelevel_gt(td->td_ucred, 0);
==== //depot/projects/newisp/amd64/conf/DEFAULTS#3 (text+ko) ====
@@ -1,7 +1,7 @@
#
# DEFAULTS -- Default kernel configuration file for FreeBSD/amd64
#
-# $FreeBSD: src/sys/amd64/conf/DEFAULTS,v 1.7 2006/10/26 22:05:24 jb Exp $
+# $FreeBSD: src/sys/amd64/conf/DEFAULTS,v 1.9 2006/11/04 23:50:11 jb Exp $
machine amd64
==== //depot/projects/newisp/arm/at91/if_ate.c#3 (text) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/at91/if_ate.c,v 1.11 2006/10/20 07:04:56 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/at91/if_ate.c,v 1.12 2006/11/03 07:39:37 imp Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -195,7 +195,6 @@
ate_get_mac(sc, eaddr);
ate_set_mac(sc, eaddr);
-
sc->ifp = ifp = if_alloc(IFT_ETHER);
if (mii_phy_probe(dev, &sc->miibus, ate_ifmedia_upd, ate_ifmedia_sts)) {
device_printf(dev, "Cannot find my PHY.\n");
@@ -271,10 +270,12 @@
* For the last buffer, set the wrap bit so the controller
* restarts from the first descriptor.
*/
+ bus_dmamap_sync(sc->rx_desc_tag, sc->rx_desc_map, BUS_DMASYNC_PREWRITE);
if (i == ATE_MAX_RX_BUFFERS - 1)
sc->rx_descs[i].addr = segs[0].ds_addr | ETH_WRAP_BIT;
else
sc->rx_descs[i].addr = segs[0].ds_addr;
+ bus_dmamap_sync(sc->rx_desc_tag, sc->rx_desc_map, BUS_DMASYNC_POSTWRITE);
sc->rx_descs[i].status = 0;
/* Flush the memory in the mbuf */
bus_dmamap_sync(sc->rxtag, sc->rx_map[i], BUS_DMASYNC_PREREAD);
@@ -489,11 +490,30 @@
}
static void
+ate_stat_update(struct ate_softc *sc, int active)
+{
+ /*
+ * The speed and full/half-duplex state needs to be reflected
+ * in the ETH_CFG register.
+ */
+ if (IFM_SUBTYPE(active) == IFM_10_T)
+ WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) & ~ETH_CFG_SPD);
+ else
+ WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) | ETH_CFG_SPD);
+ if (active & IFM_FDX)
+ WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) | ETH_CFG_FD);
+ else
+ WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) & ~ETH_CFG_FD);
+}
+
+static void
ate_tick(void *xsc)
{
struct ate_softc *sc = xsc;
+ struct ifnet *ifp = sc->ifp;
struct mii_data *mii;
int active;
+ uint32_t c;
/*
* The KB920x boot loader tests ETH_SR & ETH_SR_LINK and will ask
@@ -506,25 +526,8 @@
active = mii->mii_media_active;
mii_tick(mii);
if (mii->mii_media_status & IFM_ACTIVE &&
- active != mii->mii_media_active) {
- /*
- * The speed and full/half-duplex state needs
- * to be reflected in the ETH_CFG register, it
- * seems.
- */
- if (IFM_SUBTYPE(mii->mii_media_active) == IFM_10_T)
- WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) &
- ~ETH_CFG_SPD);
- else
- WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) |
- ETH_CFG_SPD);
- if (mii->mii_media_active & IFM_FDX)
- WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) |
- ETH_CFG_FD);
- else
- WR4(sc, ETH_CFG, RD4(sc, ETH_CFG) &
- ~ETH_CFG_FD);
- }
+ active != mii->mii_media_active)
+ ate_stat_update(sc, mii->mii_media_active);
}
/*
@@ -535,16 +538,25 @@
* the dot3Stats mib, so for those we just count them as general
* errors. Stats for iframes, ibutes, oframes and obytes are
* collected elsewhere. These registers zero on a read to prevent
- * races.
+ * races. For all the collision stats, also update the collision
+ * stats for the interface.
*/
sc->mibdata.dot3StatsAlignmentErrors += RD4(sc, ETH_ALE);
sc->mibdata.dot3StatsFCSErrors += RD4(sc, ETH_SEQE);
- sc->mibdata.dot3StatsSingleCollisionFrames += RD4(sc, ETH_SCOL);
- sc->mibdata.dot3StatsMultipleCollisionFrames += RD4(sc, ETH_MCOL);
+ c = RD4(sc, ETH_SCOL);
+ ifp->if_collisions += c;
+ sc->mibdata.dot3StatsSingleCollisionFrames += c;
+ c = RD4(sc, ETH_MCOL);
+ sc->mibdata.dot3StatsMultipleCollisionFrames += c;
+ ifp->if_collisions += c;
sc->mibdata.dot3StatsSQETestErrors += RD4(sc, ETH_SQEE);
sc->mibdata.dot3StatsDeferredTransmissions += RD4(sc, ETH_DTE);
- sc->mibdata.dot3StatsLateCollisions += RD4(sc, ETH_LCOL);
- sc->mibdata.dot3StatsExcessiveCollisions += RD4(sc, ETH_ECOL);
+ c = RD4(sc, ETH_LCOL);
+ sc->mibdata.dot3StatsLateCollisions += c;
+ ifp->if_collisions += c;
+ c = RD4(sc, ETH_ECOL);
+ sc->mibdata.dot3StatsExcessiveCollisions += c;
+ ifp->if_collisions += c;
sc->mibdata.dot3StatsCarrierSenseErrors += RD4(sc, ETH_CSE);
sc->mibdata.dot3StatsFrameTooLongs += RD4(sc, ETH_ELR);
sc->mibdata.dot3StatsInternalMacReceiveErrors += RD4(sc, ETH_DRFC);
@@ -552,7 +564,7 @@
* not sure where to lump these, so count them against the errors
* for the interface.
*/
- sc->ifp->if_oerrors += RD4(sc, ETH_CSE) + RD4(sc, ETH_TUE);
+ sc->ifp->if_oerrors += RD4(sc, ETH_TUE);
sc->ifp->if_ierrors += RD4(sc, ETH_CDE) + RD4(sc, ETH_RJB) +
RD4(sc, ETH_USF);
@@ -577,9 +589,9 @@
uint32_t low, high;
/*
- * The KB920x loaders will setup the MAC with an address, if one
- * is set in the loader. The TSC loader will also set the MAC address
- * in a similar way. Grab the MAC address from the SA1[HL] registers.
+ * The boot loader setup the MAC with an address, if one is set in
+ * the loader. The TSC loader will also set the MAC address in a
+ * similar way. Grab the MAC address from the SA1[HL] registers.
*/
low = RD4(sc, ETH_SA1L);
high = RD4(sc, ETH_SA1H);
@@ -595,6 +607,7 @@
ate_intr(void *xsc)
{
struct ate_softc *sc = xsc;
+ struct ifnet *ifp = sc->ifp;
int status;
int i;
void *bp;
@@ -614,15 +627,18 @@
rx_stat = sc->rx_descs[i].status;
if ((rx_stat & ETH_LEN_MASK) == 0) {
printf("ignoring bogus 0 len packet\n");
+ bus_dmamap_sync(sc->rx_desc_tag, sc->rx_desc_map,
+ BUS_DMASYNC_PREWRITE);
sc->rx_descs[i].addr &= ~ETH_CPU_OWNER;
bus_dmamap_sync(sc->rx_desc_tag, sc->rx_desc_map,
- BUS_DMASYNC_PREWRITE);
+ BUS_DMASYNC_POSTWRITE);
continue;
}
/* Flush memory for mbuf so we don't get stale bytes */
bus_dmamap_sync(sc->rxtag, sc->rx_map[i],
BUS_DMASYNC_POSTREAD);
- WR4(sc, ETH_RSR, RD4(sc, ETH_RSR)); // XXX WHY? XXX imp
+ WR4(sc, ETH_RSR, RD4(sc, ETH_RSR));
+
/*
* The length returned by the device includes the
* ethernet CRC calculation for the packet, but
@@ -630,25 +646,37 @@
*/
mb = m_devget(sc->rx_buf[i],
(rx_stat & ETH_LEN_MASK) - ETHER_CRC_LEN,
- ETHER_ALIGN, sc->ifp, NULL);
+ ETHER_ALIGN, ifp, NULL);
+ bus_dmamap_sync(sc->rx_desc_tag, sc->rx_desc_map,
+ BUS_DMASYNC_PREWRITE);
sc->rx_descs[i].addr &= ~ETH_CPU_OWNER;
bus_dmamap_sync(sc->rx_desc_tag, sc->rx_desc_map,
- BUS_DMASYNC_PREWRITE);
+ BUS_DMASYNC_POSTWRITE);
bus_dmamap_sync(sc->rxtag, sc->rx_map[i],
BUS_DMASYNC_PREREAD);
- if (mb != NULL)
- (*sc->ifp->if_input)(sc->ifp, mb);
+ if (mb != NULL) {
+ ifp->if_ipackets++;
+ (*ifp->if_input)(ifp, mb);
+ }
+
}
}
if (status & ETH_ISR_TCOM) {
ATE_LOCK(sc);
+ /* XXX TSR register should be cleared */
if (sc->sent_mbuf[0]) {
+ bus_dmamap_sync(sc->rxtag, sc->tx_map[0],
+ BUS_DMASYNC_POSTWRITE);
m_freem(sc->sent_mbuf[0]);
+ ifp->if_opackets++;
sc->sent_mbuf[0] = NULL;
}
if (sc->sent_mbuf[1]) {
if (RD4(sc, ETH_TSR) & ETH_TSR_IDLE) {
+ bus_dmamap_sync(sc->rxtag, sc->tx_map[1],
+ BUS_DMASYNC_POSTWRITE);
m_freem(sc->sent_mbuf[1]);
+ ifp->if_opackets++;
sc->txcur = 0;
sc->sent_mbuf[0] = sc->sent_mbuf[1] = NULL;
} else {
@@ -684,6 +712,7 @@
{
struct ate_softc *sc = xsc;
struct ifnet *ifp = sc->ifp;
+ struct mii_data *mii;
ATE_ASSERT_LOCKED(sc);
@@ -731,6 +760,10 @@
*/
ifp->if_drv_flags |= IFF_DRV_RUNNING;
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
+
+ mii = device_get_softc(sc->miibus);
+ mii_pollstat(mii);
+ ate_stat_update(sc, mii->mii_media_active);
atestart_locked(ifp);
callout_reset(&sc->tick_ch, hz, ate_tick, sc);
@@ -745,7 +778,7 @@
struct ate_softc *sc = ifp->if_softc;
struct mbuf *m, *mdefrag;
bus_dma_segment_t segs[1];
- int nseg;
+ int nseg, e;
ATE_ASSERT_LOCKED(sc);
if (ifp->if_drv_flags & IFF_DRV_OACTIVE)
@@ -767,14 +800,19 @@
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
return;
}
- mdefrag = m_defrag(m, M_DONTWAIT);
- if (mdefrag == NULL) {
- IFQ_DRV_PREPEND(&ifp->if_snd, m);
- return;
+ e = bus_dmamap_load_mbuf_sg(sc->mtag, sc->tx_map[sc->txcur], m,
+ segs, &nseg, 0);
+ if (e == EFBIG) {
+ mdefrag = m_defrag(m, M_DONTWAIT);
+ if (mdefrag == NULL) {
+ IFQ_DRV_PREPEND(&ifp->if_snd, m);
+ return;
+ }
+ m = mdefrag;
+ e = bus_dmamap_load_mbuf_sg(sc->mtag,
+ sc->tx_map[sc->txcur], m, segs, &nseg, 0);
}
- m = mdefrag;
- if (bus_dmamap_load_mbuf_sg(sc->mtag, sc->tx_map[sc->txcur], m,
- segs, &nseg, 0) != 0) {
+ if (e != 0) {
m_freem(m);
continue;
}
==== //depot/projects/newisp/arm/include/atomic.h#2 (text+ko) ====
@@ -33,7 +33,7 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/arm/include/atomic.h,v 1.19 2006/05/15 13:08:12 cognet Exp $
+ * $FreeBSD: src/sys/arm/include/atomic.h,v 1.20 2006/11/07 11:53:44 cognet Exp $
*/
#ifndef _MACHINE_ATOMIC_H_
@@ -337,6 +337,7 @@
#define atomic_cmpset_acq_int atomic_cmpset_32
#define atomic_cmpset_acq_ptr atomic_cmpset_ptr
#define atomic_cmpset_acq_long atomic_cmpset_long
+#define atomic_cmpset_acq_32 atomic_cmpset_32
#define atomic_store_rel_ptr atomic_store_ptr
#define atomic_store_rel_int atomic_store_32
#define atomic_cmpset_rel_32 atomic_cmpset_32
==== //depot/projects/newisp/boot/Makefile#3 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/Makefile,v 1.31 2006/10/09 04:43:06 kmacy Exp $
+# $FreeBSD: src/sys/boot/Makefile,v 1.32 2006/11/05 22:03:02 marcel Exp $
.include <bsd.own.mk>
@@ -8,7 +8,7 @@
.endif
# Build EFI library.
-.if ${MACHINE_ARCH} == "ia64"
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "ia64"
SUBDIR+= efi
.endif
==== //depot/projects/newisp/boot/common/load_elf.c#3 (text+ko) ====
@@ -26,12 +26,13 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/common/load_elf.c,v 1.35 2006/10/29 14:50:57 ru Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/common/load_elf.c,v 1.37 2006/11/02 17:52:43 ru Exp $");
#include <sys/param.h>
#include <sys/exec.h>
#include <sys/linker.h>
#include <sys/module.h>
+#include <sys/stdint.h>
#include <string.h>
#include <machine/elf.h>
#include <stand.h>
@@ -263,7 +264,7 @@
#if __ELF_WORD_SIZE == 64
off = - (off & 0xffffffffff000000ull);/* x86_64 relocates after locore */
#else
- off = - (off & 0xc0000000u); /* i386 relocates after locore */
+ off = - (off & 0xff000000u); /* i386 relocates after locore */
#endif
#else
off = 0; /* other archs use direct mapped kernels */
@@ -400,9 +401,9 @@
lastaddr += sizeof(size);
#ifdef ELF_VERBOSE
- printf("\n%s: 0x%lx at 0x%lx -> 0x%lx-0x%lx", secname,
- shdr[i].sh_size, shdr[i].sh_offset,
- lastaddr, lastaddr + shdr[i].sh_size);
+ printf("\n%s: 0x%jx at 0x%jx -> 0x%jx-0x%jx", secname,
+ (uintmax_t)shdr[i].sh_size, (uintmax_t)shdr[i].sh_offset,
+ (uintmax_t)lastaddr, (uintmax_t)(lastaddr + shdr[i].sh_size));
#else
if (i == symstrindex)
printf("+");
==== //depot/projects/newisp/boot/efi/include/efilib.h#3 (text+ko) ====
@@ -1,5 +1,6 @@
/*-
* Copyright (c) 2000 Doug Rabson
+ * Copyright (c) 2006 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,24 +24,31 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/boot/efi/include/efilib.h,v 1.5 2006/11/02 02:42:47 marcel Exp $
+ * $FreeBSD: src/sys/boot/efi/include/efilib.h,v 1.6 2006/11/05 22:03:02 marcel Exp $
*/
-#include <efifpswa.h>
+#include <stand.h>
extern EFI_HANDLE IH;
extern EFI_SYSTEM_TABLE *ST;
extern EFI_BOOT_SERVICES *BS;
extern EFI_RUNTIME_SERVICES *RS;
-/* DIG64 Headless Console & Debug Port Table. */
-#define HCDP_TABLE_GUID \
- {0xf951938d,0x620b,0x42ef,{0x82,0x79,0xa8,0x4b,0x79,0x61,0x78,0x98}}
+extern struct devsw efifs_dev;
+extern struct fs_ops efifs_fsops;
+
+extern struct devsw efinet_dev;
+extern struct netif_driver efinetif;
void *efi_get_table(EFI_GUID *tbl);
void efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table);
-EFI_PHYSICAL_ADDRESS efimd_va2pa(EFI_VIRTUAL_ADDRESS);
+int efi_register_handles(struct devsw *, EFI_HANDLE *, int);
+EFI_HANDLE efi_find_handle(struct devsw *, int);
+int efi_handle_lookup(EFI_HANDLE, struct devsw **, int *);
+
+int efi_status_to_errno(EFI_STATUS);
+time_t efi_time(EFI_TIME *);
EFI_STATUS main(int argc, CHAR16 *argv[]);
void exit(EFI_STATUS status);
==== //depot/projects/newisp/boot/efi/libefi/Makefile#2 (text+ko) ====
@@ -1,27 +1,16 @@
-# $FreeBSD: src/sys/boot/efi/libefi/Makefile,v 1.16 2004/11/28 00:30:22 marcel Exp $
+# $FreeBSD: src/sys/boot/efi/libefi/Makefile,v 1.17 2006/11/05 22:03:03 marcel Exp $
-.PATH: ${.CURDIR}/../../../${MACHINE_ARCH}/${MACHINE_ARCH}
-
LIB= efi
INTERNALLIB=
-SRCS= bootinfo.c copy.c delay.c devicename.c efi_console.c efifs.c efinet.c \
- elf_freebsd.c libefi.c module.c time.c
+SRCS= delay.c efi_console.c efifs.c efinet.c errno.c handles.c libefi.c \
+ time.c
-.if ${MACHINE_ARCH} == "ia64"
-SRCS+= efifpswa.c pal.S
-.endif
-
CFLAGS+= -I${.CURDIR}/../include
-CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH}
+CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH:S/amd64/i386/}
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
# Pick up the bootstrap header for some interface items
CFLAGS+= -I${.CURDIR}/../../common
-# Make the disk code more talkative
-.if defined(BOOT_DISK_DEBUG)
-CFLAGS+= -DDISK_DEBUG
-.endif
-
.include <bsd.lib.mk>
==== //depot/projects/newisp/boot/efi/libefi/efifs.c#3 (text+ko) ====
@@ -1,5 +1,6 @@
/*-
* Copyright (c) 2001 Doug Rabson
+ * Copyright (c) 2006 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -22,88 +23,100 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD: src/sys/boot/efi/libefi/efifs.c,v 1.9 2006/11/02 01:23:17 marcel Exp $
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: src/sys/boot/efi/libefi/efifs.c,v 1.10 2006/11/05 22:03:03 marcel Exp $");
+
#include <sys/param.h>
#include <sys/time.h>
#include <stddef.h>
-#include <stand.h>
#include <stdarg.h>
+#include <bootstrap.h>
+
#include <efi.h>
#include <efilib.h>
-#include "efiboot.h"
+#include <efiprot.h>
/* Perform I/O in blocks of size EFI_BLOCK_SIZE. */
#define EFI_BLOCK_SIZE (1024 * 1024)
+union fileinfo {
+ EFI_FILE_INFO info;
+ char bytes[sizeof(EFI_FILE_INFO) + 508];
+};
+
+static EFI_GUID sfs_guid = SIMPLE_FILE_SYSTEM_PROTOCOL;
+static EFI_GUID fs_guid = EFI_FILE_SYSTEM_INFO_ID;
+static EFI_GUID fi_guid = EFI_FILE_INFO_ID;
+
static int
efifs_open(const char *upath, struct open_file *f)
{
- struct efi_devdesc *dev = f->f_devdata;
- static EFI_GUID sfsid = SIMPLE_FILE_SYSTEM_PROTOCOL;
- EFI_FILE_IO_INTERFACE *sfs;
- EFI_FILE *root;
- EFI_FILE *file;
+ struct devdesc *dev = f->f_devdata;
+ EFI_FILE_IO_INTERFACE *fsif;
+ EFI_FILE *file, *root;
+ EFI_HANDLE h;
EFI_STATUS status;
- CHAR16 *cp;
- CHAR16 *path;
+ CHAR16 *cp, *path;
+
+ if (f->f_dev != &efifs_dev || dev->d_unit < 0)
+ return (EINVAL);
- /*
- * We cannot blindly assume that f->f_devdata points to a
- * efi_devdesc structure. Before we dereference 'dev', make
- * sure that the underlying device is ours.
- */
- if (f->f_dev != &efifs_dev || dev->d_handle == NULL)
- return ENOENT;
+ h = efi_find_handle(f->f_dev, dev->d_unit);
+ if (h == NULL)
+ return (EINVAL);
- status = BS->HandleProtocol(dev->d_handle, &sfsid, (VOID **)&sfs);
+ status = BS->HandleProtocol(h, &sfs_guid, (VOID **)&fsif);
if (EFI_ERROR(status))
- return ENOENT;
+ return (efi_status_to_errno(status));
- /*
- * Find the root directory.
- */
- status = sfs->OpenVolume(sfs, &root);
+ /* Get the root directory. */
+ status = fsif->OpenVolume(fsif, &root);
+ if (EFI_ERROR(status))
+ return (efi_status_to_errno(status));
- /*
- * Convert path to CHAR16, skipping leading separators.
- */
while (*upath == '/')
upath++;
- if (!*upath) {
- /* Opening the root directory, */
+
+ /* Special case: opening the root directory. */
+ if (*upath == '\0') {
f->f_fsdata = root;
- return 0;
+ return (0);
+ }
+
+ path = malloc((strlen(upath) + 1) * sizeof(CHAR16));
+ if (path == NULL) {
+ root->Close(root);
+ return (ENOMEM);
}
- cp = path = malloc((strlen(upath) + 1) * sizeof(CHAR16));
- if (path == NULL)
- return ENOMEM;
- while (*upath) {
- if (*upath == '/')
+
+ cp = path;
+ while (*upath != '\0') {
+ if (*upath == '/') {
*cp = '\\';
- else
+ while (upath[1] == '/')
+ upath++;
+ } else
*cp = *upath;
upath++;
cp++;
}
- *cp++ = 0;
+ *cp = 0;
- /*
- * Try to open it.
- */
- status = root->Open(root, &file, path, EFI_FILE_MODE_READ, 0);
+ /* Open the file. */
+ status = root->Open(root, &file, path,
+ EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE, 0);
+ if (status == EFI_ACCESS_DENIED || status == EFI_WRITE_PROTECTED)
+ status = root->Open(root, &file, path, EFI_FILE_MODE_READ, 0);
free(path);
- if (EFI_ERROR(status)) {
- root->Close(root);
- return ENOENT;
- }
+ root->Close(root);
+ if (EFI_ERROR(status))
+ return (efi_status_to_errno(status));
- root->Close(root);
f->f_fsdata = file;
- return 0;
+ return (0);
}
static int
@@ -111,8 +124,12 @@
{
EFI_FILE *file = f->f_fsdata;
+ if (file == NULL)
+ return (EBADF);
+
file->Close(file);
- return 0;
+ f->f_fsdata = NULL;
+ return (0);
}
static int
@@ -123,15 +140,17 @@
UINTN sz = size;
char *bufp;
+ if (file == NULL)
+ return (EBADF);
+
bufp = buf;
while (size > 0) {
sz = size;
if (sz > EFI_BLOCK_SIZE)
sz = EFI_BLOCK_SIZE;
status = file->Read(file, &sz, bufp);
- twiddle();
if (EFI_ERROR(status))
- return EIO;
+ return (efi_status_to_errno(status));
if (sz == 0)
break;
size -= sz;
@@ -139,7 +158,7 @@
}
if (resid)
*resid = size;
- return 0;
+ return (0);
}
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list