Re: svn commit: r229981 - in head/sys: conf dev/sound/pci gnu/dev/sound/pci modules/sound/driver/emu10kx
On 11-01-2012 21:17, Pedro F. Giffuni wrote: > Author: pfg > Date: Wed Jan 11 21:17:14 2012 > New Revision: 229981 > URL: http://svn.freebsd.org/changeset/base/229981 > > Log: > Replace GPL'd headers in the emu10kx snd driver code. > > This uses the emuxkireg.h already used in the emu10k1 > snd driver. Special thanks go to Alexander Motin as > he was able to find some errors and reverse engineer > some wrong values in the emuxkireg header. > > The emu10kx driver is now free from the GPL. Thank you for taking care of this. -- Joel ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230007 - in head: etc etc/rc.d share/man/man8
Author: rea (ports committer) Date: Thu Jan 12 06:48:11 2012 New Revision: 230007 URL: http://svn.freebsd.org/changeset/base/230007 Log: rc.d: document 'quiet' prefix and fix dhclient/devd interaction Document the current semantics of the 'quiet' command prefix in the rc.subr(8). Fix dhclient rc.d script: it should not call err() for non-DHCP-enabled interface when it is called from devd, because the latter just blindly calls 'service dhclient quietstart' on each "link up" event. Since the 'quietstart' will silence the message "Cannot 'start' . Set _enable to YES in /etc/rc.conf or use 'onestart' instead of 'start'." and running dhclient on the non-DHCP-enabled interface is the same thing as running the service without _enable set, such modification is in sync with the current semantics of the 'quiet' prefix. Approved by: glebius Reviewed by: freebsd-rc list MFC after:2 weeks Modified: head/etc/rc.d/dhclient head/etc/rc.subr head/share/man/man8/rc.subr.8 Modified: head/etc/rc.d/dhclient == --- head/etc/rc.d/dhclient Thu Jan 12 05:51:11 2012(r230006) +++ head/etc/rc.d/dhclient Thu Jan 12 06:48:11 2012(r230007) @@ -22,7 +22,14 @@ stop_precmd="dhclient_pre_check" dhclient_pre_check() { if [ -z "${rc_force}" ] && ! dhcpif $ifn; then - err 1 "'$ifn' is not a DHCP-enabled interface" + local msg + msg="'$ifn' is not a DHCP-enabled interface" + if [ -z "${rc_quiet}" ]; then + err 1 "$msg" + else + debug "$msg" + exit 1 + fi fi } Modified: head/etc/rc.subr == --- head/etc/rc.subrThu Jan 12 05:51:11 2012(r230006) +++ head/etc/rc.subrThu Jan 12 06:48:11 2012(r230007) @@ -1116,7 +1116,7 @@ load_rc_config_var() # rc_usage() { - echo -n 1>&2 "Usage: $0 [fast|force|one](" + echo -n 1>&2 "Usage: $0 [fast|force|one|quiet](" _sep= for _elem; do Modified: head/share/man/man8/rc.subr.8 == --- head/share/man/man8/rc.subr.8 Thu Jan 12 05:51:11 2012 (r230006) +++ head/share/man/man8/rc.subr.8 Thu Jan 12 06:48:11 2012 (r230007) @@ -339,7 +339,7 @@ with being the list of valid arguments prefixed by .Sm off -.Dq Bq Li fast | force | one . +.Dq Bq Li fast | force | one | quiet . .Sm on .It Ic reverse_list Ar item ... Print the list of @@ -427,6 +427,22 @@ Skip the checks for being set to .Dq Li YES , but performs all the other prerequisite tests. +.It Li quiet +Inhibits some verbose diagnostics. +Currently, this includes messages +.Qq Starting ${name} +(as checked by +.Ic check_startmsgs +inside +.Nm ) +and errors about usage of services that are not enabled in +.Xr rc.conf 5 . +This prefix also sets +.Va rc_quiet Ns = Ns Li YES . +.Em Please, note: +.Va rc_quiet +is not intended to completely mask all debug and warning messages, +but only certain small classes of them. .El .Pp .Ic run_rc_command ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230006 - stable/9/release/doc/en_US.ISO8859-1/relnotes
Author: hrs Date: Thu Jan 12 05:51:11 2012 New Revision: 230006 URL: http://svn.freebsd.org/changeset/base/230006 Log: Fix example addresses. Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml == --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jan 12 05:50:32 2012(r230005) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jan 12 05:51:11 2012(r230006) @@ -1848,8 +1848,8 @@ em0: flags=8843
svn commit: r230005 - head/usr.sbin/tzsetup
Author: wollman Date: Thu Jan 12 05:50:32 2012 New Revision: 230005 URL: http://svn.freebsd.org/changeset/base/230005 Log: Use a reasonable-sized buffer when formatting error messages about installing zoneinfo. While we're in the vicinity, add some missing error checking to eliminate an unhelpful error message when unlink() fails. /me is embarrassed by the quality of his 16-year-old code. The whole thing is awful and could stand a complete rewrite. PR: 164038 Submitted by: Devin Teske (but implemented differently) Modified: head/usr.sbin/tzsetup/tzsetup.c Modified: head/usr.sbin/tzsetup/tzsetup.c == --- head/usr.sbin/tzsetup/tzsetup.c Thu Jan 12 05:47:28 2012 (r230004) +++ head/usr.sbin/tzsetup/tzsetup.c Thu Jan 12 05:50:32 2012 (r230005) @@ -57,6 +57,13 @@ __FBSDID("$FreeBSD$"); #define_PATH_DB"/var/db/zoneinfo" #define_PATH_WALL_CMOS_CLOCK "/etc/wall_cmos_clock" +#ifdef PATH_MAX +#defineSILLY_BUFFER_SIZE 2*PATH_MAX +#else +#warning "Somebody needs to fix this to dynamically size this buffer." +#defineSILLY_BUFFER_SIZE 2048 +#endif + /* special return codes for `fire' actions */ #define DITEM_FAILURE 1 @@ -638,7 +645,7 @@ static int install_zoneinfo_file(const char *zoneinfo_file) { charbuf[1024]; - chartitle[64], prompt[64]; + chartitle[64], prompt[SILLY_BUFFER_SIZE]; struct stat sb; ssize_t len; int fd1, fd2, copymode; @@ -709,7 +716,18 @@ install_zoneinfo_file(const char *zonein return (DITEM_FAILURE | DITEM_RECREATE); } - unlink(path_localtime); + if (unlink(path_localtime) < 0) { + snprintf(prompt, sizeof(prompt), + "Could not unlink %s: %s", + path_localtime, strerror(errno)); + if (usedialog) { + snprintf(title, sizeof(title), "Error"); + dialog_msgbox(title, prompt, 8, 72, 1); + } else + fprintf(stderr, "%s\n", prompt); + return (DITEM_FAILURE | DITEM_RECREATE); + } + fd2 = open(path_localtime, O_CREAT | O_EXCL | O_WRONLY, S_IRUSR | S_IRGRP | S_IROTH); if (fd2 < 0) { @@ -755,7 +773,17 @@ install_zoneinfo_file(const char *zonein fprintf(stderr, "%s\n", prompt); return (DITEM_FAILURE | DITEM_RECREATE); } - unlink(path_localtime); + if (unlink(path_localtime) < 0) { + snprintf(prompt, sizeof(prompt), + "Could not unlink %s: %s", + path_localtime, strerror(errno)); + if (usedialog) { + snprintf(title, sizeof(title), "Error"); + dialog_msgbox(title, prompt, 8, 72, 1); + } else + fprintf(stderr, "%s\n", prompt); + return (DITEM_FAILURE | DITEM_RECREATE); + } if (symlink(zoneinfo_file, path_localtime) < 0) { snprintf(title, sizeof(title), "Error"); snprintf(prompt, sizeof(prompt), ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230004 - stable/9/release/doc/en_US.ISO8859-1/relnotes
Author: hrs Date: Thu Jan 12 05:47:28 2012 New Revision: 230004 URL: http://svn.freebsd.org/changeset/base/230004 Log: Fix a typo. (s,&os;&arch.amd64,&os;/&arch.amd64,) Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml == --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jan 12 04:48:44 2012(r230003) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jan 12 05:47:28 2012(r230004) @@ -280,7 +280,7 @@ RCTL resource limiting framework. &os; now supports executing - &os; 1/&arch.i386; a.out binaries on &os;&arch.amd64;. Note + &os; 1/&arch.i386; a.out binaries on &os;/&arch.amd64;. Note that this is not built nor installed by default. To build and install them, specify options COMPAT_43 in the kernel configuration file and rebuild the base system as ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230003 - stable/9/release/doc/en_US.ISO8859-1/relnotes
Author: hrs Date: Thu Jan 12 04:48:44 2012 New Revision: 230003 URL: http://svn.freebsd.org/changeset/base/230003 Log: Various grammar/wording fixes. Submitted by: Benjamin Kaduk Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml == --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jan 12 04:37:19 2012(r230002) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jan 12 04:48:44 2012(r230003) @@ -184,12 +184,12 @@ Kernel Changes - &os; kernel now supports Capsicum + The &os; kernel now supports Capsicum Capability Mode. Capsicum is a set of features for sandboxing support, using a capability model in which the capabilities are file descriptors. Two new kernel options CAPABILITIES and - CAPABILITY_MODE have been added to + CAPABILITY_MODE have been added to the GENERIC kernel. For more information about Capsicum, see http://www.cl.cam.ac.uk/research/security/capsicum/";>. @@ -201,20 +201,21 @@ &os;/&arch.amd64;. Two new systrace_linux32 and systrace_freebsd32 kernel modules provide - support for tracing compat system calls in addition to native + support for tracing compat system calls in addition to the native system call tracing provided by the systrace module. - &os; ELF image - activator now supports PT_GNU_STACK program - header. This is disabled by default. New &man.sysctl.8; - variables kern.elf32.nxstack and - kern.elf64.nxstack allow to enable + The + &os; ELF image activator now supports the + PT_GNU_STACK program header. This is + disabled by default. New &man.sysctl.8; variables + kern.elf32.nxstack and + kern.elf64.nxstack allow enabling PT_GNU_STACK for the specified ABIs (e.g. elf32 for 32-bit ABI). The &man.hhook.9; (Helper Hook) - and &man.khelp.9; (Kernel Helpers) KPI have been implemented. + and &man.khelp.9; (Kernel Helpers) KPIs have been implemented. These are a kind of superset of &man.pfil.9; framework for more general use in the kernel. The &man.hhook.9; KPI provides a way for kernel subsystems to export hook points @@ -228,8 +229,8 @@ A &man.loader.8; tunable hw.memtest.tests has been added. - This controls whether performing a memory testing at boot time - or not. The default value is 1 (performs a + This controls whether to perform memory testing at boot time + or not. The default value is 1 (perform a memory test). A new resource accounting API has been @@ -238,12 +239,12 @@ this is not built nor installed by default. To build and install them, specify options RACCT in the kernel configuration file and rebuild the base system as - described in http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html";>&os; Handbook. - A new resource limiting API has been - implemented. It works in conjunction with + A new resource-limiting API has been + implemented. It works in conjunction with the RACCT resource accounting implementation and takes user-configurable actions based on the set of rules it maintains and the current resource usage. The &man.rctl.8; @@ -251,31 +252,31 @@ that this is not built nor installed by default. To build and install them, specify options RCTL in the kernel configuration file and rebuild the base system as - described in http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html";>&os; Handbook. The &man.sendmsg.2; and &man.recvmsg.2; - system calls in &os; Linux ABI compatibility have been + system calls in the &os; Linux ABI compatibility have been improved. The &man.open.2; and &man.fhopen.2; - system calls now support O_CLOEXEC flag, - which allows to set FD_CLOEXEC flag for the + system calls now support the O_CLOEXEC flag, + which allows setting the FD_CLOEXEC flag for the newly created file descriptor. This is standardized in IEEE Std 1003.1-2008 (POSIX, Single UNIX Specification Version 4). - &man.posix.fallocate.2; system call has + The &man.posix.fallocate.2; system call has been implemented. This is a function in POSIX to ensure that - a part of storage for regular file data is allocated on the + a part of the storage for regular file data is allocated on the file system storage media. Two new system calls setloginclass(2) and getloginclass(2) have been added. This - makes it possible for the
svn commit: r230002 - stable/9/sbin/geom/class/part
Author: wblock (doc committer) Date: Thu Jan 12 04:37:19 2012 New Revision: 230002 URL: http://svn.freebsd.org/changeset/base/230002 Log: MFC r227774, r22, r227800, r229838, r229847: MFC r227774: Add a section that explicitly describes partitioning schemes. Modify existing sections to refer to the new one. Rearrange partitioning scheme list so MBR and EBR types are together. Also add several corrections for grammar, clarity, and consistency. MFC r22: Fix date. MFC r227800: Correct and expand BSD partitioning scheme description. Correct GUID to GPT in RECOVERING section. MFC r229838: Clarity improvements. MFC r229847: Whitespace-only fix. Approved by: gjb (mentor) Modified: stable/9/sbin/geom/class/part/gpart.8 Directory Properties: stable/9/sbin/geom/ (props changed) Modified: stable/9/sbin/geom/class/part/gpart.8 == --- stable/9/sbin/geom/class/part/gpart.8 Thu Jan 12 03:52:53 2012 (r230001) +++ stable/9/sbin/geom/class/part/gpart.8 Thu Jan 12 04:37:19 2012 (r230002) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 19, 2011 +.Dd January 8, 2012 .Dt GPART 8 .Os .Sh NAME @@ -33,56 +33,25 @@ .Sh SYNOPSIS To add support for the disk partitioning GEOM class, place one or more of the following -lines in your kernel configuration file: +lines in the kernel configuration file: .Bd -ragged -offset indent .Cd "options GEOM_PART_APM" .Cd "options GEOM_PART_BSD" -.Cd "options GEOM_PART_EBR" -.Cd "options GEOM_PART_EBR_COMPAT" .Cd "options GEOM_PART_GPT" .Cd "options GEOM_PART_MBR" +.Cd "options GEOM_PART_EBR" +.Cd "options GEOM_PART_EBR_COMPAT" .Cd "options GEOM_PART_PC98" .Cd "options GEOM_PART_VTOC8" .Ed .Pp -The -.Dv GEOM_PART_APM -option adds support for the Apple Partition Map (APM) -found on Apple Macintosh computers. -The -.Dv GEOM_PART_BSD -option adds support for the traditional -.Bx -disklabel. -The -.Dv GEOM_PART_EBR -option adds support for the Extended Boot Record (EBR), -which is used to define a logical partition. -The -.Dv GEOM_PART_EBR_COMPAT -option enables backward compatibility for partition names -in the EBR scheme. -Also it makes impossible any types of actions -with such partitions. -The -.Dv GEOM_PART_GPT -option adds support for the GUID Partition Table (GPT) -found on Intel Itanium computers and Intel-based Macintosh computers. -The -.Dv GEOM_PART_MBR -option adds support for the Master Boot Record (MBR) -found on PCs and used on many removable media. -The -.Dv GEOM_PART_PC98 -option adds support for the MBR variant as used on -NEC PC-98 computers. -The -.Dv GEOM_PART_VTOC8 -option adds support for Sun's SMI VTOC8 label as -found on computers based on -.Tn SPARC64 -and -.Tn UltraSPARC. +These options provide support for the various types of partitioning +schemes supported by the +.Ns Nm +utility. +See +.Sx "PARTITIONING SCHEMES" +below for more details. .Pp Usage of the .Ns Nm @@ -190,7 +159,7 @@ utility: The .Nm utility is used to partition GEOM providers, normally disks. -The first argument of which is the action to be taken: +The first argument is the action to be taken: .Bl -tag -width ".Cm bootcode" .\" ADD .It Cm add @@ -245,7 +214,7 @@ about its use. .El .\" BACKUP .It Cm backup -Dump a partition table to standard output in special format used by +Dump a partition table to standard output in a special format used by the .Cm restore action. .\" BOOTCODE @@ -290,18 +259,17 @@ about its use. .It Cm commit Commit any pending changes for geom .Ar geom . -All actions are being committed by default and will not result in +All actions are committed by default and will not result in pending changes. Actions can be modified with the .Fl f Ar flags -option so that they are not being committed by default. -As such, they become pending. +option so that they are not committed, but become pending. Pending changes are reflected by the geom and the .Nm utility, but they are not actually written to disk. The .Cm commit -action will write any and all pending changes to disk. +action will write all pending changes to disk. .\" CREATE .It Cm create Create a new partitioning scheme on a provider given by @@ -309,16 +277,16 @@ Create a new partitioning scheme on a pr The .Fl s Ar scheme option determines the scheme to use. -The kernel needs to have support for a particular scheme before +The kernel must have support for a particular scheme before that scheme can be used to partition a disk. .Pp Additional options include: .Bl -tag -width 10n .It Fl n Ar entries The number of entries in the partition table. -Every partitioning scheme has a minimum and a maximum number of entries -and this option allows tables to be created with the number of entries -that lies anywhere between the minimum and the maximum. +Every partitioning scheme has a m
svn commit: r230001 - stable/9/release/doc/en_US.ISO8859-1/installation
Author: hrs Date: Thu Jan 12 03:52:53 2012 New Revision: 230001 URL: http://svn.freebsd.org/changeset/base/230001 Log: Use upper case in an anchor id. Modified: stable/9/release/doc/en_US.ISO8859-1/installation/article.sgml Modified: stable/9/release/doc/en_US.ISO8859-1/installation/article.sgml == --- stable/9/release/doc/en_US.ISO8859-1/installation/article.sgml Thu Jan 12 00:41:48 2012(r23) +++ stable/9/release/doc/en_US.ISO8859-1/installation/article.sgml Thu Jan 12 03:52:53 2012(r230001) @@ -52,7 +52,7 @@ If you are upgrading from a previous release of &os;, please read http://www.FreeBSD.org/releases/9.0R/relnotes-detailed.html#upgrade";>upgrading + url="http://www.FreeBSD.org/releases/9.0R/relnotes-detailed.html#UPGRADE";>upgrading section in the Release Notes for notable incompatibilities carefully. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230000 - in head/sys/cam: . scsi
Author: ken Date: Thu Jan 12 00:41:48 2012 New Revision: 23 URL: http://svn.freebsd.org/changeset/base/23 Log: Fix a race condition in CAM peripheral free handling, locking in the CAM XPT bus traversal code, and a number of other periph level issues. cam_periph.h, cam_periph.c: Modify cam_periph_acquire() to test the CAM_PERIPH_INVALID flag prior to allowing a reference count to be gained on a peripheral. Callers of this function will receive CAM_REQ_CMP_ERR status in the situation of attempting to reference an invalidated periph. This guarantees that a peripheral scheduled for a deferred free will not be accessed during its wait for destruction. Panic during attempts to drop a reference count on a peripheral that already has a zero reference count. In cam_periph_list(), use a local sbuf with SBUF_FIXEDLEN set so that mallocs do not occur while the xpt topology lock is held, regardless of the allocation policy of the passed in sbuf. Add a new routine, cam_periph_release_locked_buses(), that can be called when the caller already holds the CAM topology lock. Add some extra debugging for duplicate peripheral allocations in cam_periph_alloc(). Treat CAM_DEV_NOT_THERE much the same as a selection timeout (AC_LOST_DEVICE is emitted), but forgo retries. cam_xpt.c: Revamp the way the EDT traversal code does locking and reference counting. This was broken, since it assumed that the EDT would not change during traversal, but that assumption is no longer valid. So, to prevent devices from going away while we traverse the EDT, make sure we properly lock everything and hold references on devices that we are using. The two peripheral driver traversal routines should be examined. xptpdperiphtraverse() holds the topology lock for the entire time it runs. xptperiphtraverse() is now locked properly, but only holds the topology lock while it is traversing the list, and not while the traversal function is running. The bus locking code in xptbustraverse() should also be revisited at a later time, since it is complex and should probably be simplified. scsi_da.c:Pay attention to the return value from cam_periph_acquire(). Return 0 always from daclose() even if the disk is now gone. Add some rudimentary error injection support. scsi_sg.c:Fix reference counting in the sg(4) driver. The sg driver was calling cam_periph_release() on close, but never called cam_periph_acquire() (which increments the reference count) on open. The periph code correctly complained that the sg(4) driver was trying to decrement the refcount when it was already 0. Sponsored by: Spectra Logic MFC after:2 weeks Modified: head/sys/cam/cam_periph.c head/sys/cam/cam_periph.h head/sys/cam/cam_xpt.c head/sys/cam/scsi/scsi_da.c head/sys/cam/scsi/scsi_sg.c Modified: head/sys/cam/cam_periph.c == --- head/sys/cam/cam_periph.c Thu Jan 12 00:38:57 2012(r22) +++ head/sys/cam/cam_periph.c Thu Jan 12 00:41:48 2012(r23) @@ -171,14 +171,16 @@ cam_periph_alloc(periph_ctor_t *periph_c return (CAM_REQ_INPROG); } else { printf("cam_periph_alloc: attempt to re-allocate " - "valid device %s%d rejected\n", - periph->periph_name, periph->unit_number); + "valid device %s%d rejected flags %#x " + "refcount %d\n", periph->periph_name, + periph->unit_number, periph->flags, + periph->refcount); } return (CAM_REQ_INVALID); } periph = (struct cam_periph *)malloc(sizeof(*periph), M_CAMPERIPH, -M_NOWAIT); +M_NOWAIT|M_ZERO); if (periph == NULL) return (CAM_RESRC_UNAVAIL); @@ -190,7 +192,6 @@ cam_periph_alloc(periph_ctor_t *periph_c path_id = xpt_path_path_id(path); target_id = xpt_path_target_id(path); lun_id = xpt_path_lun_id(path); - bzero(periph, sizeof(*
svn commit: r229999 - stable/9/release/doc/share/sgml
Author: hrs Date: Thu Jan 12 00:38:57 2012 New Revision: 22 URL: http://svn.freebsd.org/changeset/base/22 Log: Bump &release.next;. Modified: stable/9/release/doc/share/sgml/release.ent Modified: stable/9/release/doc/share/sgml/release.ent == --- stable/9/release/doc/share/sgml/release.ent Thu Jan 12 00:34:54 2012 (r229998) +++ stable/9/release/doc/share/sgml/release.ent Thu Jan 12 00:38:57 2012 (r22) @@ -19,7 +19,7 @@ - + ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229998 - stable/9/release/doc/en_US.ISO8859-1/relnotes
Author: hrs Date: Thu Jan 12 00:34:54 2012 New Revision: 229998 URL: http://svn.freebsd.org/changeset/base/229998 Log: Add relnotes items: hhook(9) and khelp(9), hw.memtest.tests loader tunable, posix_fallocate(2), boot loader menu updated, iwn(4) firmware update, vxge(4) for Neterion X3100 10GbE Server/Storage adapter added, ipfw(8) fwd IPv6 support, ipfw(8) call/retrun action added, IPv4 /31 network support as in RFC 3021, IPV6_PKTINFO bug fixed, h_ertt(4) (Enhanced Round Trip Time) khelp module added, ng_ipfw(4) IPv6 support, arcmsr(4) 1.20.00.22, cam(4) descriptor format sense data in SPC-3 support added, mxge(4) updated, tws(4) for 3ware 9750 SATA+SAS 6Gb/s RAID controller added, newfs(8), fsck_ffs(8) -E option added, NFS nocto mount option added, vfs.typenumhash loader tunable, libarchive, tar(1), cpio(1) 2.8.4, makefs(8) ISO 9660 support, rtadvd(8), rtsold(8) RDNSS/DNSSL RA option support, rtadvd(8) noifprefix keyword, tftpd(8) interop issue fixed, zpool(8) labelclear command added, awk 20110807, compiler-rt imported, netcat 4.9, tnftp 20100118, less v444, OpenSSH 5.8p2 + hpn patch, pf 4.5, sendmail 8.14.5, tzdata2011m, xz 20110711. - Add descriptions about network configuration changes, openresolv import, and disk partition management utilities. Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml == --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jan 12 00:34:33 2012(r229997) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jan 12 00:34:54 2012(r229998) @@ -213,14 +213,34 @@ PT_GNU_STACK for the specified ABIs (e.g. elf32 for 32-bit ABI). + The &man.hhook.9; (Helper Hook) + and &man.khelp.9; (Kernel Helpers) KPI have been implemented. + These are a kind of superset of &man.pfil.9; framework for + more general use in the kernel. The &man.hhook.9; KPI + provides a way for kernel subsystems to export hook points + that &man.khelp.9; modules can hook to provide enhanced or new + functionality to the kernel. The &man.khelp.9; KPI provides a + framework for managing &man.khelp.9; modules, which indirectly + use the &man.hhook.9; KPI to register their hook functions + with hook points of interest within the kernel. These allow a + structured way to dynamically extend the kernel at runtime in + an ABI preserving manner. + + A &man.loader.8; + tunable hw.memtest.tests has been added. + This controls whether performing a memory testing at boot time + or not. The default value is 1 (performs a + memory test). + A new resource accounting API has been - implemented. It can keep per-process, per-jail, - per-loginclass, and per-loginclass resource accounting - information. Note that this is not built nor installed by - default. To build and install them, specify options - RACCT in the kernel configuration file and rebuild - the base system as described in &os Handbook (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html";>). + implemented. It can keep per-process, per-jail, and + per-loginclass resource accounting information. Note that + this is not built nor installed by default. To build and + install them, specify options RACCT in the + kernel configuration file and rebuild the base system as + described in http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html";>&os; + Handbook. A new resource limiting API has been implemented. It works in conjunction with @@ -231,8 +251,9 @@ that this is not built nor installed by default. To build and install them, specify options RCTL in the kernel configuration file and rebuild the base system as - described in &os Handbook (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html";>). + described in http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html";>&os; + Handbook. The &man.sendmsg.2; and &man.recvmsg.2; system calls in &os; Linux ABI compatibility have been @@ -245,6 +266,11 @@ Std 1003.1-2008 (POSIX, Single UNIX Specification Version 4). + &man.posix.fallocate.2; system call has + been implemented. This is a function in POSIX to ensure that + a part of storage for regular file data is allocated on the + file system storage media. + Two new system call
svn commit: r229997 - in head: share/examples/scsi_target sys/amd64/conf sys/cam/ctl sys/cam/scsi sys/conf sys/dev/ata sys/dev/ciss sys/i386/conf sys/ia64/conf sys/sparc64/conf usr.bin usr.bin/ctls...
Author: ken Date: Thu Jan 12 00:34:33 2012 New Revision: 229997 URL: http://svn.freebsd.org/changeset/base/229997 Log: Add the CAM Target Layer (CTL). CTL is a disk and processor device emulation subsystem originally written for Copan Systems under Linux starting in 2003. It has been shipping in Copan (now SGI) products since 2005. It was ported to FreeBSD in 2008, and thanks to an agreement between SGI (who acquired Copan's assets in 2010) and Spectra Logic in 2010, CTL is available under a BSD-style license. The intent behind the agreement was that Spectra would work to get CTL into the FreeBSD tree. Some CTL features: - Disk and processor device emulation. - Tagged queueing - SCSI task attribute support (ordered, head of queue, simple tags) - SCSI implicit command ordering support. (e.g. if a read follows a mode select, the read will be blocked until the mode select completes.) - Full task management support (abort, LUN reset, target reset, etc.) - Support for multiple ports - Support for multiple simultaneous initiators - Support for multiple simultaneous backing stores - Persistent reservation support - Mode sense/select support - Error injection support - High Availability support (1) - All I/O handled in-kernel, no userland context switch overhead. (1) HA Support is just an API stub, and needs much more to be fully functional. ctl.c:The core of CTL. Command handlers and processing, character driver, and HA support are here. ctl.h:Basic function declarations and data structures. ctl_backend.c, ctl_backend.h:The basic CTL backend API. ctl_backend_block.c, ctl_backend_block.h: The block and file backend. This allows for using a disk or a file as the backing store for a LUN. Multiple threads are started to do I/O to the backing device, primarily because the VFS API requires that to get any concurrency. ctl_backend_ramdisk.c:A "fake" ramdisk backend. It only allocates a small amount of memory to act as a source and sink for reads and writes from an initiator. Therefore it cannot be used for any real data, but it can be used to test for throughput. It can also be used to test initiators' support for extremely large LUNs. ctl_cmd_table.c: This is a table with all 256 possible SCSI opcodes, and command handler functions defined for supported opcodes. ctl_debug.h: Debugging support. ctl_error.c, ctl_error.h: CTL-specific wrappers around the CAM sense building functions. ctl_frontend.c, ctl_frontend.h: These files define the basic CTL frontend port API. ctl_frontend_cam_sim.c: This is a CTL frontend port that is also a CAM SIM. This frontend allows for using CTL without any target-capable hardware. So any LUNs you create in CTL are visible in CAM via this port. ctl_frontend_internal.c, ctl_frontend_internal.h: This is a frontend port written for Copan to do some system-specific tasks that required sending commands into CTL from inside the kernel. This isn't entirely relevant to FreeBSD in general, but can perhaps be repurposed. ctl_ha.h: This is a stubbed-out High Availability API. Much more is needed for full HA support. See the comments in the header and the description of what is needed in the README.ctl.txt file for more details. ctl_io.h: This defines most of the core CTL I/O structures. union ctl_io is conceptually very similar to CAM's union ccb. ctl_ioctl.h: This defines all ioctls available through the CTL character device, and the data structures needed for those ioctls. ctl_mem_pool.c, ctl_mem_pool.h: Generic memory pool implementation used by the internal frontend. ctl_private.h:Private data structres (e.g. CTL softc) and function prototypes. This also includes the SCSI vendor and product names used by CTL. ctl_scsi_all.c, ctl_scsi_all.h: CTL wrappers around CAM sense printing functions. ctl_ser_table.c: Command serialization table. This defines
Re: svn commit: r229986 - head/lib/libutil
On Wed, Jan 11, 2012 at 10:33:41PM +, Guy Helmer wrote: > Author: ghelmer > Date: Wed Jan 11 22:33:41 2012 > New Revision: 229986 > URL: http://svn.freebsd.org/changeset/base/229986 > > Log: > Fix namespace issues with prototype parameter names. > Add missing prototype parameter names. > > Requested by bde. > > Modified: > head/lib/libutil/libutil.h > > Modified: head/lib/libutil/libutil.h > == > --- head/lib/libutil/libutil.hWed Jan 11 22:12:45 2012 > (r229985) > +++ head/lib/libutil/libutil.hWed Jan 11 22:33:41 2012 > (r229986) > @@ -93,7 +93,7 @@ struct termios; > struct winsize; > > __BEGIN_DECLS > -char *auth_getval(const char *name); > +char *auth_getval(const char *_name); The _[a-z].* names are still in the app namespace. Only _[A-Z].* and __[a-z].* are reserved for the implementation. pgpFfR0d7M7V3.pgp Description: PGP signature
svn commit: r229996 - in stable/7/sys: dev/fb modules/splash modules/splash/txt
Author: eadler (ports committer) Date: Thu Jan 12 00:05:35 2012 New Revision: 229996 URL: http://svn.freebsd.org/changeset/base/229996 Log: MFC r228445: - Add support for ASCII art splash screens in TheDraw format PR: kern/143370 Approved by: ed Added: stable/7/sys/dev/fb/splash_txt.c - copied unchanged from r228445, head/sys/dev/fb/splash_txt.c stable/7/sys/modules/splash/txt/ - copied from r228445, head/sys/modules/splash/txt/ Modified: stable/7/sys/modules/splash/Makefile Directory Properties: stable/7/share/man/ (props changed) stable/7/share/man/man4/ (props changed) stable/7/sys/ (props changed) Copied: stable/7/sys/dev/fb/splash_txt.c (from r228445, head/sys/dev/fb/splash_txt.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/dev/fb/splash_txt.cThu Jan 12 00:05:35 2012 (r229996, copy of r228445, head/sys/dev/fb/splash_txt.c) @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 1999 Michael Smith + * Copyright (c) 1999 Kazutaka YOKOTA + * Copyright (c) 2005 Antony Mawer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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$ + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +static int splash_on = FALSE; + +static int txt_init(video_adapter_t *adp); +static int txt_end(video_adapter_t *adp); +static int txt_splash(video_adapter_t * adp, const int on); + +/* These are rows by columns of the text-mode display device. */ +#define BIN_IMAGE_WIDTH80 +#define BIN_IMAGE_HEIGHT 25 + +static splash_decoder_t txt_decoder = { + .name = "splash_txt", + .init = txt_init, + .term = txt_end, + .splash = txt_splash, + .data_type = SPLASH_IMAGE, +}; + +SPLASH_DECODER(splash_txt, txt_decoder); + +static void +draw_text_splash(sc_softc_t *sc) +{ + u_int x, y; + u_char ch, attr; + u_char *pdata = txt_decoder.data; + + /* Init failed. */ + if (txt_decoder.data == NULL) + return; + for (y = 0; y < BIN_IMAGE_HEIGHT; y++) { + for (x = 0; x < BIN_IMAGE_WIDTH; x++) { + ch = *pdata++; + attr = *pdata++; + sc_vtb_putc(&sc->cur_scp->scr, + (y * sc->cur_scp->xsize) + x, + sc->scr_map[ch], (int)attr << 8); + } + } +} + +static int +txt_init(video_adapter_t *adp) +{ + + /* Ensure that the image data exists. */ + if (txt_decoder.data == NULL || txt_decoder.data_size <= 0) { + printf("splash_txt: No ASCII bitmap file found\n"); + return (ENODEV); + } + return (0); +} + +static int +txt_end(video_adapter_t *adp) +{ + + return (0); +} + +static int +txt_splash(video_adapter_t *adp, const int on) +{ + sc_softc_t *sc; + scr_stat *scp; + + sc = sc_find_softc(adp, NULL); + if (sc == NULL) + return (EAGAIN); + scp = sc->cur_scp; + if (on) { + if (!splash_on) { + if (adp->va_info.vi_flags & V_INFO_GRAPHICS) + return EAGAIN; + /* Clear screen and set border colour. */ + sc_vtb_clear(&scp->scr, sc->scr_map[0x20], + (FG_LIGHTGREY | BG_BLACK) << 8); + (*vidsw[adp->va_index]->set_hw_cursor)(adp, -1, -1); + sc_set_border(scp, 0); + splash_on = TRUE; +
svn commit: r229995 - in stable/8/sys: dev/fb modules/splash modules/splash/txt
Author: eadler (ports committer) Date: Thu Jan 12 00:03:50 2012 New Revision: 229995 URL: http://svn.freebsd.org/changeset/base/229995 Log: MFC r228445: - Add support for ASCII art splash screens in TheDraw format PR: kern/143370 Approved by: ed Added: stable/8/sys/dev/fb/splash_txt.c - copied unchanged from r228445, head/sys/dev/fb/splash_txt.c stable/8/sys/modules/splash/txt/ - copied from r228445, head/sys/modules/splash/txt/ Modified: stable/8/sys/modules/splash/Makefile Directory Properties: stable/8/share/man/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) Copied: stable/8/sys/dev/fb/splash_txt.c (from r228445, head/sys/dev/fb/splash_txt.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/dev/fb/splash_txt.cThu Jan 12 00:03:50 2012 (r229995, copy of r228445, head/sys/dev/fb/splash_txt.c) @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 1999 Michael Smith + * Copyright (c) 1999 Kazutaka YOKOTA + * Copyright (c) 2005 Antony Mawer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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$ + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +static int splash_on = FALSE; + +static int txt_init(video_adapter_t *adp); +static int txt_end(video_adapter_t *adp); +static int txt_splash(video_adapter_t * adp, const int on); + +/* These are rows by columns of the text-mode display device. */ +#define BIN_IMAGE_WIDTH80 +#define BIN_IMAGE_HEIGHT 25 + +static splash_decoder_t txt_decoder = { + .name = "splash_txt", + .init = txt_init, + .term = txt_end, + .splash = txt_splash, + .data_type = SPLASH_IMAGE, +}; + +SPLASH_DECODER(splash_txt, txt_decoder); + +static void +draw_text_splash(sc_softc_t *sc) +{ + u_int x, y; + u_char ch, attr; + u_char *pdata = txt_decoder.data; + + /* Init failed. */ + if (txt_decoder.data == NULL) + return; + for (y = 0; y < BIN_IMAGE_HEIGHT; y++) { + for (x = 0; x < BIN_IMAGE_WIDTH; x++) { + ch = *pdata++; + attr = *pdata++; + sc_vtb_putc(&sc->cur_scp->scr, + (y * sc->cur_scp->xsize) + x, + sc->scr_map[ch], (int)attr << 8); + } + } +} + +static int +txt_init(video_adapter_t *adp) +{ + + /* Ensure that the image data exists. */ + if (txt_decoder.data == NULL || txt_decoder.data_size <= 0) { + printf("splash_txt: No ASCII bitmap file found\n"); + return (ENODEV); + } + return (0); +} + +static int +txt_end(video_adapter_t *adp) +{ + + return (0); +} + +static int +txt_splash(video_adapter_t *adp, const int on) +{ + sc_softc_t *sc; + scr_stat *scp; + + sc = sc_find_softc(adp, NULL); + if (sc == NULL) + return (EAGAIN); + scp = sc->cur_scp; + if (on) { + if (!splash_on) { + if (adp->va_info.vi_flags & V_INFO_GRAPHICS) + return EAGAIN; + /* Clear screen and set border colour. */ + sc_vtb_clear(&scp->scr, sc->scr_map[0x20], + (FG_LIGHTGREY | BG_BLACK) << 8); + (*vidsw[adp->va_index]->set_hw_cursor)(adp, -1, -1); + sc_set_border(scp, 0); + splash_on = TRUE; +
svn commit: r229994 - in stable/9: share/man/man4 sys/dev/fb sys/modules/splash sys/modules/splash/txt
Author: eadler (ports committer) Date: Thu Jan 12 00:02:14 2012 New Revision: 229994 URL: http://svn.freebsd.org/changeset/base/229994 Log: MFC r228445: - Add support for ASCII art splash screens in TheDraw format PR: kern/143370 Approved by: ed Added: stable/9/sys/dev/fb/splash_txt.c - copied unchanged from r228445, head/sys/dev/fb/splash_txt.c stable/9/sys/modules/splash/txt/ - copied from r228445, head/sys/modules/splash/txt/ Modified: stable/9/share/man/man4/splash.4 stable/9/sys/modules/splash/Makefile Directory Properties: stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/share/man/man4/splash.4 == --- stable/9/share/man/man4/splash.4Thu Jan 12 00:01:11 2012 (r229993) +++ stable/9/share/man/man4/splash.4Thu Jan 12 00:02:14 2012 (r229994) @@ -74,6 +74,14 @@ Bitmaps of other color depths will not b ZSoft PCX decoder. This decoder currently only supports version 5 8-bpp single-plane images. +.It Pa splash_txt.ko +TheDraw binary ASCII drawing file decoder. +Displays a text-mode 80x25 ASCII drawing, such as that produced by +the Binary save format in TheDraw. +This format consists of a sequence +of two byte pairs representing the 80x25 display, where the first byte +is the ASCII character to draw and the second byte indicates the +colors/attributes to use when drawing the character. .El .Pp The @@ -223,6 +231,16 @@ If the VESA support is statically linked necessary to load the VESA module. Just load the bitmap file and the splash decoder module as in the first example above. +.Pp +To load a binary ASCII drawing and display this while booting, include the +following into your +.Pa /boot/loader.conf +: +.Bd -literal -offset indent +splash_txt_load="YES" +bitmap_load="YES" +bitmap_name="/boot/splash.bin" +.Ed .\".Sh DIAGNOSTICS .Sh SEE ALSO .Xr vidcontrol 1 , @@ -256,6 +274,15 @@ module was written by based on the .Pa splash_bmp code. +The +.Pa splash_txt +module was written by +.An Antony Mawer Aq ant...@mawer.org +based on the +.Pa splash_bmp +code, with some additional inspiration from the +.Pa daemon_saver +code. .Sh CAVEATS Both the splash screen and the screen saver work with .Xr syscons 4 Copied: stable/9/sys/dev/fb/splash_txt.c (from r228445, head/sys/dev/fb/splash_txt.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/dev/fb/splash_txt.cThu Jan 12 00:02:14 2012 (r229994, copy of r228445, head/sys/dev/fb/splash_txt.c) @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 1999 Michael Smith + * Copyright (c) 1999 Kazutaka YOKOTA + * Copyright (c) 2005 Antony Mawer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * 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$ + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +static int splash_on = FALSE; + +static int txt_init(video_adapter_t *adp); +static int txt_end(video_adapter_t *adp); +static int txt_splash(video_adapter_t * adp, const int on); + +/* These are rows by columns of the text-mode display device. */ +#define BIN_IMAGE_WIDTH80 +#define BIN_IMAGE_HEIGHT 25 + +static splash_decoder_t txt_decoder = { + .name = "splash_txt", + .init = txt_init, + .term = txt_end, + .splash = txt_splash, + .data_type = SPLASH_IMAGE, +}; + +SPLASH_DECODER(splash_txt, txt_decoder); + +static void +draw_text_splash(sc_softc_t *sc) +{ + u_int x,
svn commit: r229993 - stable/8/usr.bin/du
Author: jilles Date: Thu Jan 12 00:01:11 2012 New Revision: 229993 URL: http://svn.freebsd.org/changeset/base/229993 Log: MFC r228669: du: Allow multiple -HLP options, the last one wins. This matches 4.4BSD tradition and other utilities with these options and is required by POSIX (POSIX does not specify -P, only -HL). Modified: stable/8/usr.bin/du/du.1 stable/8/usr.bin/du/du.c Directory Properties: stable/8/usr.bin/du/ (props changed) Modified: stable/8/usr.bin/du/du.1 == --- stable/8/usr.bin/du/du.1Wed Jan 11 23:30:18 2012(r229992) +++ stable/8/usr.bin/du/du.1Thu Jan 12 00:01:11 2012(r229993) @@ -32,7 +32,7 @@ .\"@(#)du.18.2 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" -.Dd December 8, 2011 +.Dd December 17, 2011 .Dt DU 1 .Os .Sh NAME @@ -159,6 +159,13 @@ or .Fl L option is specified, storage used by any symbolic links which are followed is not counted (or displayed). +The +.Fl H , +.Fl L +and +.Fl P +options override each other and the command's actions are determined +by the last one specified. .Pp The .Fl h, k Modified: stable/8/usr.bin/du/du.c == --- stable/8/usr.bin/du/du.cWed Jan 11 23:30:18 2012(r229992) +++ stable/8/usr.bin/du/du.cThu Jan 12 00:01:11 2012(r229993) @@ -94,18 +94,18 @@ main(int argc, char *argv[]) int ftsoptions; int listall; int depth; - int Hflag, Lflag, Pflag, aflag, sflag, dflag, cflag; + int Hflag, Lflag, aflag, sflag, dflag, cflag; int hflag, lflag, ch, notused, rval; char**save; static char dot[] = "."; setlocale(LC_ALL, ""); - Hflag = Lflag = Pflag = aflag = sflag = dflag = cflag = hflag = + Hflag = Lflag = aflag = sflag = dflag = cflag = hflag = lflag = Aflag = 0; save = argv; - ftsoptions = 0; + ftsoptions = FTS_PHYSICAL; savednumber = 0; threshold = 0; threshold_sign = 1; @@ -130,19 +130,17 @@ main(int argc, char *argv[]) break; case 'H': Hflag = 1; + Lflag = 0; break; case 'I': ignoreadd(optarg); break; case 'L': - if (Pflag) - usage(); Lflag = 1; + Hflag = 0; break; case 'P': - if (Lflag) - usage(); - Pflag = 1; + Hflag = Lflag = 0; break; case 'a': aflag = 1; @@ -215,20 +213,12 @@ main(int argc, char *argv[]) * the man page, so it's a feature. */ - if (Hflag + Lflag + Pflag > 1) - usage(); - - if (Hflag + Lflag + Pflag == 0) - Pflag = 1; /* -P (physical) is default */ - if (Hflag) ftsoptions |= FTS_COMFOLLOW; - - if (Lflag) + if (Lflag) { + ftsoptions &= ~FTS_PHYSICAL; ftsoptions |= FTS_LOGICAL; - - if (Pflag) - ftsoptions |= FTS_PHYSICAL; + } if (!Aflag && (cblocksize % DEV_BSIZE) != 0) cblocksize = howmany(cblocksize, DEV_BSIZE) * DEV_BSIZE; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r229966 - head/lib/libutil
On Wed, Jan 11, 2012 at 04:35:26PM +, Guy Helmer wrote: > Author: ghelmer > Date: Wed Jan 11 16:35:26 2012 > New Revision: 229966 > URL: http://svn.freebsd.org/changeset/base/229966 > > Log: > jilles pointed out that O_CLOEXEC could be used in the open(2) flags > rather than using fcntl(2) later, and in addition to saving a system > call, removes a possible race with fork/exec from threads or signal > handlers. So now we can remove fcntl() as the source of possible pidfile_open() errnos from the manual page.:) > Modified: > head/lib/libutil/pidfile.c > > Modified: head/lib/libutil/pidfile.c > == > --- head/lib/libutil/pidfile.cWed Jan 11 15:00:16 2012 > (r229965) > +++ head/lib/libutil/pidfile.cWed Jan 11 16:35:26 2012 > (r229966) > @@ -117,7 +117,7 @@ pidfile_open(const char *path, mode_t mo >* pidfile_write() can be called multiple times. >*/ > fd = flopen(pfh->pf_path, > - O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK, mode); > + O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode); > if (fd == -1) { > if (errno == EWOULDBLOCK && pidptr != NULL) { > count = 20; > @@ -139,19 +139,6 @@ pidfile_open(const char *path, mode_t mo > } > > /* > - * Prevent the file descriptor from escaping to other > - * programs via exec(3). > - */ > - if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) { > - error = errno; > - unlink(pfh->pf_path); > - close(fd); > - free(pfh); > - errno = error; > - return (NULL); > - } > - > - /* >* Remember file information, so in pidfile_write() we are sure we write >* to the proper descriptor. >*/ -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpW6Entf9saW.pgp Description: PGP signature
svn commit: r229992 - stable/9/usr.bin/du
Author: jilles Date: Wed Jan 11 23:30:18 2012 New Revision: 229992 URL: http://svn.freebsd.org/changeset/base/229992 Log: MFC r228669: du: Allow multiple -HLP options, the last one wins. This matches 4.4BSD tradition and other utilities with these options and is required by POSIX (POSIX does not specify -P, only -HL). Modified: stable/9/usr.bin/du/du.1 stable/9/usr.bin/du/du.c Directory Properties: stable/9/usr.bin/du/ (props changed) Modified: stable/9/usr.bin/du/du.1 == --- stable/9/usr.bin/du/du.1Wed Jan 11 23:11:48 2012(r229991) +++ stable/9/usr.bin/du/du.1Wed Jan 11 23:30:18 2012(r229992) @@ -28,7 +28,7 @@ .\"@(#)du.18.2 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" -.Dd December 8, 2011 +.Dd December 17, 2011 .Dt DU 1 .Os .Sh NAME @@ -155,6 +155,13 @@ or .Fl L option is specified, storage used by any symbolic links which are followed is not counted (or displayed). +The +.Fl H , +.Fl L +and +.Fl P +options override each other and the command's actions are determined +by the last one specified. .Pp The .Fl h, k Modified: stable/9/usr.bin/du/du.c == --- stable/9/usr.bin/du/du.cWed Jan 11 23:11:48 2012(r229991) +++ stable/9/usr.bin/du/du.cWed Jan 11 23:30:18 2012(r229992) @@ -90,18 +90,18 @@ main(int argc, char *argv[]) int ftsoptions; int listall; int depth; - int Hflag, Lflag, Pflag, aflag, sflag, dflag, cflag; + int Hflag, Lflag, aflag, sflag, dflag, cflag; int hflag, lflag, ch, notused, rval; char**save; static char dot[] = "."; setlocale(LC_ALL, ""); - Hflag = Lflag = Pflag = aflag = sflag = dflag = cflag = hflag = + Hflag = Lflag = aflag = sflag = dflag = cflag = hflag = lflag = Aflag = 0; save = argv; - ftsoptions = 0; + ftsoptions = FTS_PHYSICAL; savednumber = 0; threshold = 0; threshold_sign = 1; @@ -126,19 +126,17 @@ main(int argc, char *argv[]) break; case 'H': Hflag = 1; + Lflag = 0; break; case 'I': ignoreadd(optarg); break; case 'L': - if (Pflag) - usage(); Lflag = 1; + Hflag = 0; break; case 'P': - if (Lflag) - usage(); - Pflag = 1; + Hflag = Lflag = 0; break; case 'a': aflag = 1; @@ -211,20 +209,12 @@ main(int argc, char *argv[]) * the man page, so it's a feature. */ - if (Hflag + Lflag + Pflag > 1) - usage(); - - if (Hflag + Lflag + Pflag == 0) - Pflag = 1; /* -P (physical) is default */ - if (Hflag) ftsoptions |= FTS_COMFOLLOW; - - if (Lflag) + if (Lflag) { + ftsoptions &= ~FTS_PHYSICAL; ftsoptions |= FTS_LOGICAL; - - if (Pflag) - ftsoptions |= FTS_PHYSICAL; + } if (!Aflag && (cblocksize % DEV_BSIZE) != 0) cblocksize = howmany(cblocksize, DEV_BSIZE) * DEV_BSIZE; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229991 - stable/7/usr.sbin/cron/crontab
Author: wblock (doc committer) Date: Wed Jan 11 23:11:48 2012 New Revision: 229991 URL: http://svn.freebsd.org/changeset/base/229991 Log: MFC r227981: Point out that @reboot runs at every cron startup, not just system startup. Approved by: gjb (mentor) Modified: stable/7/usr.sbin/cron/crontab/crontab.5 Directory Properties: stable/7/usr.sbin/cron/ (props changed) Modified: stable/7/usr.sbin/cron/crontab/crontab.5 == --- stable/7/usr.sbin/cron/crontab/crontab.5Wed Jan 11 23:11:27 2012 (r229990) +++ stable/7/usr.sbin/cron/crontab/crontab.5Wed Jan 11 23:11:48 2012 (r229991) @@ -224,7 +224,7 @@ one of eight special strings may appear: .Bd -literal -offset indent string meaning -- --- -@rebootRun once, at startup. +@rebootRun once, at startup of cron. @yearlyRun once a year, "0 0 1 1 *". @annually (same as @yearly) @monthly Run once a month, "0 0 1 * *". ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229990 - stable/8/usr.sbin/cron/crontab
Author: wblock (doc committer) Date: Wed Jan 11 23:11:27 2012 New Revision: 229990 URL: http://svn.freebsd.org/changeset/base/229990 Log: MFC r227981: Point out that @reboot runs at every cron startup, not just system startup. Approved by: gjb (mentor) Modified: stable/8/usr.sbin/cron/crontab/crontab.5 Directory Properties: stable/8/usr.sbin/cron/ (props changed) Modified: stable/8/usr.sbin/cron/crontab/crontab.5 == --- stable/8/usr.sbin/cron/crontab/crontab.5Wed Jan 11 23:06:37 2012 (r229989) +++ stable/8/usr.sbin/cron/crontab/crontab.5Wed Jan 11 23:11:27 2012 (r229990) @@ -224,7 +224,7 @@ one of eight special strings may appear: .Bd -literal -offset indent string meaning -- --- -@rebootRun once, at startup. +@rebootRun once, at startup of cron. @yearlyRun once a year, "0 0 1 1 *". @annually (same as @yearly) @monthly Run once a month, "0 0 1 * *". ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229988 - head/lib/libutil
Author: ghelmer Date: Wed Jan 11 22:45:15 2012 New Revision: 229988 URL: http://svn.freebsd.org/changeset/base/229988 Log: Fix prototype formatting (indentation, long lines, and continued lines). Requested by bde. Modified: head/lib/libutil/libutil.h Modified: head/lib/libutil/libutil.h == --- head/lib/libutil/libutil.h Wed Jan 11 22:37:45 2012(r229987) +++ head/lib/libutil/libutil.h Wed Jan 11 22:45:15 2012(r229988) @@ -101,7 +101,7 @@ int extattr_namespace_to_string(int _att intextattr_string_to_namespace(const char *_string, int *_attrnamespace); intflopen(const char *_path, int _flags, ...); intforkpty(int *_amaster, char *_name, -struct termios *_termp, struct winsize *_winp); + struct termios *_termp, struct winsize *_winp); void hexdump(const void *_ptr, int _length, const char *_hdr, int _flags); inthumanize_number(char *_buf, size_t _len, int64_t _number, const char *_suffix, int _scale, int _flags); @@ -117,22 +117,25 @@ int kld_isloaded(const char *_name); intkld_load(const char *_name); intlogin_tty(int _fd); intopenpty(int *_amaster, int *_aslave, char *_name, -struct termios *_termp, struct winsize *_winp); + struct termios *_termp, struct winsize *_winp); void properties_free(properties _list); char *property_find(properties _list, const char *_name); -properties properties_read(int _fd); +properties + properties_read(int fd); intrealhostname(char *_host, size_t _hsize, const struct in_addr *_ip); intrealhostname_sa(char *_host, size_t _hsize, struct sockaddr *_addr, -int _addrlen); + int _addrlen); int_secure_path(const char *_path, uid_t _uid, gid_t _gid); void trimdomain(char *_fullhost, int _hostsize); -const char *uu_lockerr(int _uu_lockresult); +const char * + uu_lockerr(int _uu_lockresult); intuu_lock(const char *_ttyname); intuu_unlock(const char *_ttyname); intuu_lock_txfr(const char *_ttyname, pid_t _pid); #ifdef _STDIO_H_ /* avoid adding new includes */ -char *fparseln(FILE *_fp, size_t *_len, size_t *_lineno, const char _delim[3], int _flags); +char *fparseln(FILE *_fp, size_t *_len, size_t *_lineno, + const char _delim[3], int _flags); #endif #ifdef _PWD_H_ @@ -165,28 +168,32 @@ int gr_tmp(int _mdf); #endif #ifdef _SYS_PARAM_H_ -int pidfile_close(struct pidfh *_pfh); -int pidfile_fileno(const struct pidfh *_pfh); -struct pidfh *pidfile_open(const char *_path, mode_t _mode, pid_t *_pidptr); -int pidfile_remove(struct pidfh *_pfh); -int pidfile_write(struct pidfh *_pfh); +intpidfile_close(struct pidfh *_pfh); +intpidfile_fileno(const struct pidfh *_pfh); +struct pidfh * + pidfile_open(const char *_path, mode_t _mode, pid_t *_pidptr); +intpidfile_remove(struct pidfh *_pfh); +intpidfile_write(struct pidfh *_pfh); #endif #ifdef _UFS_UFS_QUOTA_H_ struct fstab; struct quotafile; -int quota_check_path(const struct quotafile *_qf, const char *_path); -void quota_close(struct quotafile *_qf); -int quota_convert(struct quotafile *_qf, int _wordsize); -const char *quota_fsname(const struct quotafile *_qf); -int quota_maxid(struct quotafile *_qf); -int quota_off(struct quotafile *_qf); -int quota_on(struct quotafile *_qf); -struct quotafile *quota_open(struct fstab *_fs, int _quotatype, int _openflags); -const char *quota_qfname(const struct quotafile *_qf); -int quota_read(struct quotafile *_qf, struct dqblk *_dqb, int _id); -int quota_write_limits(struct quotafile *_qf, struct dqblk *_dqb, int _id); -int quota_write_usage(struct quotafile *_qf, struct dqblk *_dqb, int _id); +intquota_check_path(const struct quotafile *_qf, const char *_path); +void quota_close(struct quotafile *_qf); +intquota_convert(struct quotafile *_qf, int _wordsize); +const char * + quota_fsname(const struct quotafile *_qf); +intquota_maxid(struct quotafile *_qf); +intquota_off(struct quotafile *_qf); +intquota_on(struct quotafile *_qf); +struct quotafile * + quota_open(struct fstab *_fs, int _quotatype, int _openflags); +const char * + quota_qfname(const struct quotafile *_qf); +intquota_read(struct quotafile *_qf, struct dqblk *_dqb, int _id); +intquota_write_limits(struct quotafile *_qf, struct dqblk *_dqb, int _id); +intquota_write_usage(struct quotafile *_qf, struct dqblk *_dqb, int _id); #endif __END_DECLS ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229987 - stable/9/usr.sbin/cron/crontab
Author: wblock (doc committer) Date: Wed Jan 11 22:37:45 2012 New Revision: 229987 URL: http://svn.freebsd.org/changeset/base/229987 Log: MFC r227981: Point out that @reboot runs at every cron startup, not just system startup. Approved by: gjb (mentor) Modified: stable/9/usr.sbin/cron/crontab/crontab.5 Directory Properties: stable/9/usr.sbin/cron/ (props changed) Modified: stable/9/usr.sbin/cron/crontab/crontab.5 == --- stable/9/usr.sbin/cron/crontab/crontab.5Wed Jan 11 22:33:41 2012 (r229986) +++ stable/9/usr.sbin/cron/crontab/crontab.5Wed Jan 11 22:37:45 2012 (r229987) @@ -224,7 +224,7 @@ one of eight special strings may appear: .Bd -literal -offset indent string meaning -- --- -@rebootRun once, at startup. +@rebootRun once, at startup of cron. @yearlyRun once a year, "0 0 1 1 *". @annually (same as @yearly) @monthly Run once a month, "0 0 1 * *". ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229986 - head/lib/libutil
Author: ghelmer Date: Wed Jan 11 22:33:41 2012 New Revision: 229986 URL: http://svn.freebsd.org/changeset/base/229986 Log: Fix namespace issues with prototype parameter names. Add missing prototype parameter names. Requested by bde. Modified: head/lib/libutil/libutil.h Modified: head/lib/libutil/libutil.h == --- head/lib/libutil/libutil.h Wed Jan 11 22:12:45 2012(r229985) +++ head/lib/libutil/libutil.h Wed Jan 11 22:33:41 2012(r229986) @@ -93,7 +93,7 @@ struct termios; struct winsize; __BEGIN_DECLS -char *auth_getval(const char *name); +char *auth_getval(const char *_name); void clean_environment(const char * const *_white, const char * const *_more_white); intexpand_number(const char *_buf, uint64_t *_num); @@ -102,7 +102,7 @@ int extattr_string_to_namespace(const ch intflopen(const char *_path, int _flags, ...); intforkpty(int *_amaster, char *_name, struct termios *_termp, struct winsize *_winp); -void hexdump(const void *ptr, int length, const char *hdr, int flags); +void hexdump(const void *_ptr, int _length, const char *_hdr, int _flags); inthumanize_number(char *_buf, size_t _len, int64_t _number, const char *_suffix, int _scale, int _flags); struct kinfo_file * @@ -113,17 +113,17 @@ struct kinfo_proc * kinfo_getallproc(int *_cntp); struct kinfo_proc * kinfo_getproc(pid_t _pid); -intkld_isloaded(const char *name); -intkld_load(const char *name); +intkld_isloaded(const char *_name); +intkld_load(const char *_name); intlogin_tty(int _fd); intopenpty(int *_amaster, int *_aslave, char *_name, struct termios *_termp, struct winsize *_winp); -void properties_free(properties list); -char *property_find(properties list, const char *name); -properties properties_read(int fd); -intrealhostname(char *host, size_t hsize, const struct in_addr *ip); -intrealhostname_sa(char *host, size_t hsize, struct sockaddr *addr, -int addrlen); +void properties_free(properties _list); +char *property_find(properties _list, const char *_name); +properties properties_read(int _fd); +intrealhostname(char *_host, size_t _hsize, const struct in_addr *_ip); +intrealhostname_sa(char *_host, size_t _hsize, struct sockaddr *_addr, +int _addrlen); int_secure_path(const char *_path, uid_t _uid, gid_t _gid); void trimdomain(char *_fullhost, int _hostsize); const char *uu_lockerr(int _uu_lockresult); @@ -132,7 +132,7 @@ int uu_unlock(const char *_ttyname); intuu_lock_txfr(const char *_ttyname, pid_t _pid); #ifdef _STDIO_H_ /* avoid adding new includes */ -char *fparseln(FILE *, size_t *, size_t *, const char[3], int); +char *fparseln(FILE *_fp, size_t *_len, size_t *_lineno, const char _delim[3], int _flags); #endif #ifdef _PWD_H_ @@ -153,40 +153,40 @@ int pw_tmp(int _mfd); #ifdef _GRP_H_ intgr_copy(int __ffd, int _tfd, const struct group *_gr, struct group *_old_gr); -struct group *gr_dup(const struct group *gr); -intgr_equal(const struct group *gr1, const struct group *gr2); +struct group *gr_dup(const struct group *_gr); +intgr_equal(const struct group *_gr1, const struct group *_gr2); void gr_fini(void); intgr_init(const char *_dir, const char *_master); intgr_lock(void); -char *gr_make(const struct group *gr); +char *gr_make(const struct group *_gr); intgr_mkdb(void); +struct group *gr_scan(const char *_line); intgr_tmp(int _mdf); -struct group *gr_scan(const char *line); #endif #ifdef _SYS_PARAM_H_ -int pidfile_close(struct pidfh *pfh); -int pidfile_fileno(const struct pidfh *pfh); -struct pidfh *pidfile_open(const char *path, mode_t mode, pid_t *pidptr); -int pidfile_remove(struct pidfh *pfh); -int pidfile_write(struct pidfh *pfh); +int pidfile_close(struct pidfh *_pfh); +int pidfile_fileno(const struct pidfh *_pfh); +struct pidfh *pidfile_open(const char *_path, mode_t _mode, pid_t *_pidptr); +int pidfile_remove(struct pidfh *_pfh); +int pidfile_write(struct pidfh *_pfh); #endif #ifdef _UFS_UFS_QUOTA_H_ struct fstab; struct quotafile; -int quota_check_path(const struct quotafile *, const char *path); -void quota_close(struct quotafile *); -int quota_convert(struct quotafile *, int); -const char *quota_fsname(const struct quotafile *); -int quota_maxid(struct quotafile *); -int quota_off(struct quotafile *); -int quota_on(struct quotafile *); -struct quotafile *quota_open(struct fstab *, int, int); -const char *quota_qfname(const struct quotafile *); -int quota_read(struct quotafile *, struct dqblk *, int); -int quota_write_limits(struct quotafile *, struct dqblk *, int); -int quota_write_usage(struct quotafile *, struct dqblk *, int); +int quota_check_path(const struct quotafile *_qf, const char *_path); +void quo
svn commit: r229985 - head/lib/libutil
Author: ghelmer Date: Wed Jan 11 22:12:45 2012 New Revision: 229985 URL: http://svn.freebsd.org/changeset/base/229985 Log: Fix forward structure declaration and prototype disorder. Requested by bde. Modified: head/lib/libutil/libutil.h Modified: head/lib/libutil/libutil.h == --- head/lib/libutil/libutil.h Wed Jan 11 21:38:05 2012(r229984) +++ head/lib/libutil/libutil.h Wed Jan 11 22:12:45 2012(r229985) @@ -84,45 +84,27 @@ struct pidfh { #endif /* Avoid pulling in all the include files for no need */ -struct termios; -struct winsize; struct in_addr; struct kinfo_file; struct kinfo_proc; struct kinfo_vmentry; +struct sockaddr; +struct termios; +struct winsize; __BEGIN_DECLS +char *auth_getval(const char *name); void clean_environment(const char * const *_white, const char * const *_more_white); +intexpand_number(const char *_buf, uint64_t *_num); intextattr_namespace_to_string(int _attrnamespace, char **_string); intextattr_string_to_namespace(const char *_string, int *_attrnamespace); intflopen(const char *_path, int _flags, ...); -void hexdump(const void *ptr, int length, const char *hdr, int flags); -intlogin_tty(int _fd); -void trimdomain(char *_fullhost, int _hostsize); -intopenpty(int *_amaster, int *_aslave, char *_name, -struct termios *_termp, struct winsize *_winp); intforkpty(int *_amaster, char *_name, struct termios *_termp, struct winsize *_winp); +void hexdump(const void *ptr, int length, const char *hdr, int flags); inthumanize_number(char *_buf, size_t _len, int64_t _number, const char *_suffix, int _scale, int _flags); -intexpand_number(const char *_buf, uint64_t *_num); -const char *uu_lockerr(int _uu_lockresult); -intuu_lock(const char *_ttyname); -intuu_unlock(const char *_ttyname); -intuu_lock_txfr(const char *_ttyname, pid_t _pid); -int_secure_path(const char *_path, uid_t _uid, gid_t _gid); -properties properties_read(int fd); -void properties_free(properties list); -char *property_find(properties list, const char *name); -char *auth_getval(const char *name); -intrealhostname(char *host, size_t hsize, const struct in_addr *ip); -struct sockaddr; -intrealhostname_sa(char *host, size_t hsize, struct sockaddr *addr, -int addrlen); - -intkld_isloaded(const char *name); -intkld_load(const char *name); struct kinfo_file * kinfo_getfile(pid_t _pid, int *_cntp); struct kinfo_vmentry * @@ -131,6 +113,23 @@ struct kinfo_proc * kinfo_getallproc(int *_cntp); struct kinfo_proc * kinfo_getproc(pid_t _pid); +intkld_isloaded(const char *name); +intkld_load(const char *name); +intlogin_tty(int _fd); +intopenpty(int *_amaster, int *_aslave, char *_name, +struct termios *_termp, struct winsize *_winp); +void properties_free(properties list); +char *property_find(properties list, const char *name); +properties properties_read(int fd); +intrealhostname(char *host, size_t hsize, const struct in_addr *ip); +intrealhostname_sa(char *host, size_t hsize, struct sockaddr *addr, +int addrlen); +int_secure_path(const char *_path, uid_t _uid, gid_t _gid); +void trimdomain(char *_fullhost, int _hostsize); +const char *uu_lockerr(int _uu_lockresult); +intuu_lock(const char *_ttyname); +intuu_unlock(const char *_ttyname); +intuu_lock_txfr(const char *_ttyname, pid_t _pid); #ifdef _STDIO_H_ /* avoid adding new includes */ char *fparseln(FILE *, size_t *, size_t *, const char[3], int); @@ -166,28 +165,28 @@ struct group *gr_scan(const char *line); #endif #ifdef _SYS_PARAM_H_ -struct pidfh *pidfile_open(const char *path, mode_t mode, pid_t *pidptr); -int pidfile_write(struct pidfh *pfh); int pidfile_close(struct pidfh *pfh); -int pidfile_remove(struct pidfh *pfh); int pidfile_fileno(const struct pidfh *pfh); +struct pidfh *pidfile_open(const char *path, mode_t mode, pid_t *pidptr); +int pidfile_remove(struct pidfh *pfh); +int pidfile_write(struct pidfh *pfh); #endif #ifdef _UFS_UFS_QUOTA_H_ -struct quotafile; struct fstab; -struct quotafile *quota_open(struct fstab *, int, int); +struct quotafile; +int quota_check_path(const struct quotafile *, const char *path); void quota_close(struct quotafile *); -int quota_on(struct quotafile *); -int quota_off(struct quotafile *); +int quota_convert(struct quotafile *, int); const char *quota_fsname(const struct quotafile *); -const char *quota_qfname(const struct quotafile *); int quota_maxid(struct quotafile *); -int quota_check_path(const struct quotafile *, const char *path); +int quota_off(struct quotafile *); +int quota_on(struct quotafile *); +struct quotafile *quota_open(struct fstab *, int, int); +const char *quota_qfname(const struc
svn commit: r229984 - head/sys/dev/pst
Author: truckman Date: Wed Jan 11 21:38:05 2012 New Revision: 229984 URL: http://svn.freebsd.org/changeset/base/229984 Log: Pass the arguments to mtx_init() in the correct order. There should be no change to the binary because the value of MTX_DEF is zero and there is a visible function prototype. MFC after:1 week Modified: head/sys/dev/pst/pst-pci.c Modified: head/sys/dev/pst/pst-pci.c == --- head/sys/dev/pst/pst-pci.c Wed Jan 11 21:26:46 2012(r229983) +++ head/sys/dev/pst/pst-pci.c Wed Jan 11 21:38:05 2012(r229984) @@ -95,7 +95,7 @@ iop_pci_attach(device_t dev) sc->ibase = rman_get_virtual(sc->r_mem); sc->reg = (struct i2o_registers *)sc->ibase; sc->dev = dev; -mtx_init(&sc->mtx, "pst lock", MTX_DEF, 0); +mtx_init(&sc->mtx, "pst lock", NULL, MTX_DEF); if (!iop_init(sc)) return 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229983 - vendor-sys/acpica/20120111
Author: jkim Date: Wed Jan 11 21:26:46 2012 New Revision: 229983 URL: http://svn.freebsd.org/changeset/base/229983 Log: Tag ACPICA 20120111. Added: vendor-sys/acpica/20120111/ - copied from r229982, vendor-sys/acpica/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229981 - in head/sys: conf dev/sound/pci gnu/dev/sound/pci modules/sound/driver/emu10kx
Author: pfg Date: Wed Jan 11 21:17:14 2012 New Revision: 229981 URL: http://svn.freebsd.org/changeset/base/229981 Log: Replace GPL'd headers in the emu10kx snd driver code. This uses the emuxkireg.h already used in the emu10k1 snd driver. Special thanks go to Alexander Motin as he was able to find some errors and reverse engineer some wrong values in the emuxkireg header. The emu10kx driver is now free from the GPL. PR: 153901 Tested by:mav, joel Approved by: jhb (mentor) MFC after:2 weeks Deleted: head/sys/gnu/dev/sound/pci/emu10k1-alsa.h head/sys/gnu/dev/sound/pci/p16v-alsa.h head/sys/gnu/dev/sound/pci/p17v-alsa.h Modified: head/sys/conf/files head/sys/dev/sound/pci/emu10kx-midi.c head/sys/dev/sound/pci/emu10kx-pcm.c head/sys/dev/sound/pci/emu10kx.c head/sys/dev/sound/pci/emu10kx.h head/sys/dev/sound/pci/emuxkireg.h head/sys/modules/sound/driver/emu10kx/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Wed Jan 11 21:03:54 2012(r229980) +++ head/sys/conf/files Wed Jan 11 21:17:14 2012(r229981) @@ -50,11 +50,6 @@ aic79xx_reg_print.c optional ahd pci aic79xx_reg_print.ooptional ahd pci ahd_reg_pretty_print \ compile-with"${NORMAL_C}" \ no-implicit-rule local -emu10k1-alsa%diked.h optional snd_emu10kx \ - dependency "$S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/emu10k1-alsa.h" \ - compile-with"CC='${CC}' AWK=${AWK} sh $S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/emu10k1-alsa.h emu10k1-alsa%diked.h" \ - no-obj no-implicit-rule before-depend \ - clean "emu10k1-alsa%diked.h" # # The 'fdt_dtb_file' target covers an actual DTB file name, which is derived # from the specified source (DTS) file: .dts -> .dtb @@ -67,16 +62,6 @@ fdt_static_dtb.h optional fdt fdt_dtb_s compile-with "sh $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ." \ no-obj no-implicit-rule before-depend \ clean "fdt_static_dtb.h" -p16v-alsa%diked.h optional snd_emu10kx pci \ - dependency "$S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/p16v-alsa.h" \ - compile-with"CC='${CC}' AWK=${AWK} sh $S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/p16v-alsa.h p16v-alsa%diked.h" \ - no-obj no-implicit-rule before-depend \ - clean "p16v-alsa%diked.h" -p17v-alsa%diked.h optional snd_emu10kx pci \ - dependency "$S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/p17v-alsa.h" \ - compile-with"CC='${CC}' AWK=${AWK} sh $S/tools/sound/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/p17v-alsa.h p17v-alsa%diked.h" \ - no-obj no-implicit-rule before-depend \ - clean "p17v-alsa%diked.h" feeder_eq_gen.hoptional sound \ dependency "$S/tools/sound/feeder_eq_mkfilter.awk"\ compile-with"${AWK} -f $S/tools/sound/feeder_eq_mkfilter.awk -- ${FEEDER_EQ_PRESETS} > feeder_eq_gen.h" \ @@ -1733,19 +1718,9 @@ dev/sound/pci/csa.c optional snd_csa pc dev/sound/pci/csapcm.c optional snd_csa pci dev/sound/pci/ds1.coptional snd_ds1 pci dev/sound/pci/emu10k1.coptional snd_emu10k1 pci -dev/sound/pci/emu10kx.coptional snd_emu10kx pci \ - dependency "emu10k1-alsa%diked.h" \ - dependency "p16v-alsa%diked.h" \ - dependency "p17v-alsa%diked.h" \ - warning "kernel contains GPL contaminated emu10kx headers" -dev/sound/pci/emu10kx-pcm.coptional snd_emu10kx pci \ - dependency "emu10k1-alsa%diked.h" \ - dependency "p16v-alsa%diked.h" \ - dependency "p17v-alsa%diked.h" \ - warning "kernel contains GPL contaminated emu10kx headers" -dev/sound/pci/emu10kx-midi.c optional snd_emu10kx pci \ - dependency "emu10k1-alsa%diked.h" \ - warning "kernel contains GPL contaminated emu10kx headers" +dev/sound/pci/emu10kx.coptional snd_emu10kx pci +dev/sound/pci/emu10kx-pcm.coptional snd_emu10kx pci +dev/sound/pci/emu10kx-midi.c optional snd_emu10kx pci dev/sound/pci/envy24.c optional snd_envy24 pci dev/sound/pci/envy24ht.c optional snd_envy24ht pci dev/sound/pci/es137x.c optional snd_es137x pci Modified: head/sys/dev/sound/pci/emu10kx-midi.c == --- head/sys/dev/sound/pci/emu10kx-midi.c Wed Jan 11 21:03:54 2012 (r229980) +++ head/sys/dev/sound/pci/emu10kx-midi.c Wed Jan 11 21:17:14 2012 (r229981) @@ -
svn commit: r229980 - head/sys/dev/sound/pci
Author: pfg Date: Wed Jan 11 21:03:54 2012 New Revision: 229980 URL: http://svn.freebsd.org/changeset/base/229980 Log: Fix an inconsistency that crept in while replacing constants from the new header. Approved by: jhb (mentor) MFC after:3 days Modified: head/sys/dev/sound/pci/emu10k1.c Modified: head/sys/dev/sound/pci/emu10k1.c == --- head/sys/dev/sound/pci/emu10k1.cWed Jan 11 20:04:52 2012 (r229979) +++ head/sys/dev/sound/pci/emu10k1.cWed Jan 11 21:03:54 2012 (r229980) @@ -1079,9 +1079,9 @@ emurchan_trigger(kobj_t obj, void *data, emu_wrptr(sc, 0, ch->sizereg, sz); if (ch->num == 0) { if (sc->audigy) { - val = EMU_ADCCR_LCHANENABLE; + val = EMU_A_ADCCR_LCHANENABLE; if (AFMT_CHANNEL(ch->fmt) > 1) - val |= EMU_ADCCR_RCHANENABLE; + val |= EMU_A_ADCCR_RCHANENABLE; val |= audigy_recval(ch->spd); } else { val = EMU_ADCCR_LCHANENABLE; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229979 - in stable/9/release/doc/en_US.ISO8859-1: . installation
Author: hrs Date: Wed Jan 11 20:04:52 2012 New Revision: 229979 URL: http://svn.freebsd.org/changeset/base/229979 Log: Add a document for brief installation instructions. Submitted by: kensmith Added: stable/9/release/doc/en_US.ISO8859-1/installation/ stable/9/release/doc/en_US.ISO8859-1/installation/Makefile (contents, props changed) stable/9/release/doc/en_US.ISO8859-1/installation/article.sgml (contents, props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/Makefile Modified: stable/9/release/doc/en_US.ISO8859-1/Makefile == --- stable/9/release/doc/en_US.ISO8859-1/Makefile Wed Jan 11 19:12:29 2012(r229978) +++ stable/9/release/doc/en_US.ISO8859-1/Makefile Wed Jan 11 20:04:52 2012(r229979) @@ -6,6 +6,7 @@ SUBDIR = relnotes SUBDIR+= hardware SUBDIR+= readme SUBDIR+= errata +SUBDIR+= installation COMPAT_SYMLINK = en Added: stable/9/release/doc/en_US.ISO8859-1/installation/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/release/doc/en_US.ISO8859-1/installation/Makefile Wed Jan 11 20:04:52 2012(r229979) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +RELN_ROOT?= ${.CURDIR}/../.. +.ifdef NO_LANGCODE_IN_DESTDIR +DESTDIR?= ${DOCDIR}/installation +.else +DESTDIR?= ${DOCDIR}/en_US.ISO8859-1/installation +.endif + +DOC?= article +FORMATS?= html +INSTALL_COMPRESSED?= gz +INSTALL_ONLY_COMPRESSED?= + +# SGML content +SRCS+= article.sgml + +.include "${RELN_ROOT}/share/mk/doc.relnotes.mk" +.include "${DOC_PREFIX}/share/mk/doc.project.mk" Added: stable/9/release/doc/en_US.ISO8859-1/installation/article.sgml == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/release/doc/en_US.ISO8859-1/installation/article.sgml Wed Jan 11 20:04:52 2012(r229979) @@ -0,0 +1,162 @@ + +%articles.ent; + + +%release; +]> + + + +&os; &release.current; Installation Instructions + +The &os; Project + +$FreeBSD$ + + + 2012 + + mailto:d...@freebsd.org";>The &os; Documentation Project + + + + &tm-attrib.freebsd; + &tm-attrib.intel; + &tm-attrib.sparc; + &tm-attrib.general; + + + + +This article gives some brief instructions on installing + &os; &release.current; and upgrading the systems running earlier + releases. + + + +Installing &os; + +The Installing + &os; + chapter of the &os; + Handbook provides more in-depth information about the + installation program itself, including a guided walk-through with + screenshots. + + + +Upgrading &os; + +If you are upgrading from a previous release of &os;, please + read http://www.FreeBSD.org/releases/9.0R/relnotes-detailed.html#upgrade";>upgrading + section in the Release Notes for notable + incompatibilities carefully. + + + Upgrading from Source + + The procedure for doing a source code based update is + described in +and + . + + For SVN use the releng/9.0 branch + which will be where any upcoming Security Advisories or Errata + Notices will be applied. The branch tag to use for updating + the source is RELENG_9_0 for CVS. + + + + Upgrading Using &os; Update + + The &man.freebsd-update.8; utility supports binary + upgrades of &arch.i386; and &arch.amd64; systems running + earlier FreeBSD releases. Systems running + 7.[34]-RELEASE, + 8.[12]-RELEASE, + 9.0-BETA[123], or + 9.0-RC[123] can upgrade as follows: + + First, ensure that your current system is up to date; a + change was recently made to &man.freebsd-update.8; (Errata + Notice http://security.FreeBSD.org/advisories/FreeBSD-EN-12:01.freebsd-update.asc";>FreeBSD-EN-12:01.freebsd-update) + which is needed in order to upgrade to &os; + &release.current;. + + &prompt.root; freebsd-update fetch +&prompt.root; freebsd-update install + + Now the &man.freebsd-update.8; utility can fetch bits + belonging to &release.current;. During this process + &man.freebsd-update.8; will ask for help in merging + configuration files. + + &prompt.root; freebsd-update upgrade -r 9.0-RELEASE + + Due to changes in the way that &os; is packaged on the + release media, two complications may arise in this process if + upgrading from FreeBSD 7.x or 8.x: + + + + The &os;, which previously could appear in either + /boot/kernel or + /boot/GENERIC, now only appears as + /boot/kernel. As a result, any + kernel appearing in /boot/GENERIC + will be deleted. Please carefully read the output printed +
svn commit: r229978 - stable/8/sys/kern
Author: mckusick Date: Wed Jan 11 19:12:29 2012 New Revision: 229978 URL: http://svn.freebsd.org/changeset/base/229978 Log: MFC: 226265 When unmounting a filesystem always wait for the vfs_busy lock to clear so that if no vnodes in the filesystem are actively in use the unmount will succeed rather than failing with EBUSY. Reported by: Garrett Cooper Reviewed by: Attilio Rao and Kostik Belousov Tested by: Garrett Cooper PR: kern/161016 Modified: stable/8/sys/kern/vfs_mount.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/vfs_mount.c == --- stable/8/sys/kern/vfs_mount.c Wed Jan 11 18:38:52 2012 (r229977) +++ stable/8/sys/kern/vfs_mount.c Wed Jan 11 19:12:29 2012 (r229978) @@ -1260,18 +1260,6 @@ dounmount(mp, flags, td) mp->mnt_kern_flag |= MNTK_UNMOUNTF; error = 0; if (mp->mnt_lockref) { - if ((flags & MNT_FORCE) == 0) { - mp->mnt_kern_flag &= ~(MNTK_UNMOUNT | MNTK_NOINSMNTQ | - MNTK_UNMOUNTF); - if (mp->mnt_kern_flag & MNTK_MWAIT) { - mp->mnt_kern_flag &= ~MNTK_MWAIT; - wakeup(mp); - } - MNT_IUNLOCK(mp); - if (coveredvp) - VOP_UNLOCK(coveredvp, 0); - return (EBUSY); - } mp->mnt_kern_flag |= MNTK_DRAINING; error = msleep(&mp->mnt_lockref, MNT_MTX(mp), PVFS, "mount drain", 0); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r229976 - head/sys/contrib/pf/net
On Wed, Jan 11, 2012 at 06:34:57PM +, Gleb Smirnoff wrote: T> Author: glebius T> Date: Wed Jan 11 18:34:57 2012 T> New Revision: 229976 T> URL: http://svn.freebsd.org/changeset/base/229976 T> T> Log: T> Redo r226660: T>- Define schednetisr() to swi_sched. T>- In the swi handler check if there is some data prepared, T> and if true, then call pfsync_sendout(), however tell it T> not to schedule swi again. T>- Since now we don't obtain the pfsync lock in the swi handler, ^^^ T> don't use ifqueue mutex to synchronize queue access. Sorry, that should have been "now we do obtain" :( -- Totus tuus, Glebius. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229977 - in head/release/doc: en_US.ISO8859-1/hardware share/misc
Author: brueffer Date: Wed Jan 11 18:38:52 2012 New Revision: 229977 URL: http://svn.freebsd.org/changeset/base/229977 Log: Add hpt27xx to the hardware notes, While here, add the 2012 copyright. MFC after:1 week Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml head/release/doc/share/misc/dev.archlist.txt Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml == --- head/release/doc/en_US.ISO8859-1/hardware/article.sgml Wed Jan 11 18:34:57 2012(r229976) +++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml Wed Jan 11 18:38:52 2012(r229977) @@ -32,6 +32,7 @@ 2009 2010 2011 + 2012 mailto:d...@freebsd.org";>The &os; Documentation Project @@ -773,6 +774,8 @@ &hwlist.esp; + &hwlist.hpt27xx; + &hwlist.hptiop; &hwlist.hptmv; Modified: head/release/doc/share/misc/dev.archlist.txt == --- head/release/doc/share/misc/dev.archlist.txtWed Jan 11 18:34:57 2012(r229976) +++ head/release/doc/share/misc/dev.archlist.txtWed Jan 11 18:38:52 2012(r229977) @@ -72,6 +72,7 @@ exi386,amd64 fe i386,pc98,amd64 fwohci i386,sparc64,ia64,amd64,powerpc hifn i386,pc98,amd64 +hpt27xxi386,amd64 hptiop i386,amd64 hptmv i386,amd64 hptrr i386,amd64 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229976 - head/sys/contrib/pf/net
Author: glebius Date: Wed Jan 11 18:34:57 2012 New Revision: 229976 URL: http://svn.freebsd.org/changeset/base/229976 Log: Redo r226660: - Define schednetisr() to swi_sched. - In the swi handler check if there is some data prepared, and if true, then call pfsync_sendout(), however tell it not to schedule swi again. - Since now we don't obtain the pfsync lock in the swi handler, don't use ifqueue mutex to synchronize queue access. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c == --- head/sys/contrib/pf/net/if_pfsync.c Wed Jan 11 18:18:37 2012 (r229975) +++ head/sys/contrib/pf/net/if_pfsync.c Wed Jan 11 18:34:57 2012 (r229976) @@ -309,6 +309,9 @@ static int pfsync_multicast_setup(struct static voidpfsync_multicast_cleanup(struct pfsync_softc *); static int pfsync_init(void); static voidpfsync_uninit(void); +static voidpfsync_sendout1(int); + +#defineschednetisr(NETISR_PFSYNC) swi_sched(V_pfsync_swi_cookie, 0) SYSCTL_NODE(_net, OID_AUTO, pfsync, CTLFLAG_RW, 0, "PFSYNC"); SYSCTL_VNET_STRUCT(_net_pfsync, OID_AUTO, stats, CTLFLAG_RW, @@ -823,11 +826,7 @@ pfsync_state_import(struct pfsync_state CLR(st->state_flags, PFSTATE_NOSYNC); if (ISSET(st->state_flags, PFSTATE_ACK)) { pfsync_q_ins(st, PFSYNC_S_IACK); -#ifdef __FreeBSD__ - pfsync_sendout(); -#else schednetisr(NETISR_PFSYNC); -#endif } } CLR(st->state_flags, PFSTATE_ACK); @@ -1283,11 +1282,7 @@ pfsync_in_upd(struct pfsync_pkt *pkt, st V_pfsyncstats.pfsyncs_stale++; pfsync_update_state(st); -#ifdef __FreeBSD__ - pfsync_sendout(); -#else schednetisr(NETISR_PFSYNC); -#endif continue; } pfsync_alloc_scrub_memory(&sp->dst, &st->dst); @@ -1393,11 +1388,7 @@ pfsync_in_upd_c(struct pfsync_pkt *pkt, V_pfsyncstats.pfsyncs_stale++; pfsync_update_state(st); -#ifdef __FreeBSD__ - pfsync_sendout(); -#else schednetisr(NETISR_PFSYNC); -#endif continue; } pfsync_alloc_scrub_memory(&up->dst, &st->dst); @@ -2098,12 +2089,20 @@ pfsync_drop(struct pfsync_softc *sc) sc->sc_len = PFSYNC_MINPKT; } -void -pfsync_sendout(void) -{ #ifdef __FreeBSD__ +void pfsync_sendout() +{ + pfsync_sendout1(1); +} + +static void +pfsync_sendout1(int schedswi) +{ struct pfsync_softc *sc = V_pfsyncif; #else +void +pfsync_sendout(void) +{ struct pfsync_softc *sc = pfsyncif; #endif #if NBPFILTER > 0 @@ -2124,7 +2123,6 @@ pfsync_sendout(void) #endif #ifdef __FreeBSD__ size_t pktlen; - int dummy_error; #endif int offset; int q, count = 0; @@ -2329,8 +2327,14 @@ pfsync_sendout(void) sc->sc_ifp->if_obytes += m->m_pkthdr.len; sc->sc_len = PFSYNC_MINPKT; - IFQ_ENQUEUE(&sc->sc_ifp->if_snd, m, dummy_error); - swi_sched(V_pfsync_swi_cookie, 0); + if (!_IF_QFULL(&sc->sc_ifp->if_snd)) + _IF_ENQUEUE(&sc->sc_ifp->if_snd, m); + else { + m_freem(m); +sc->sc_ifp->if_snd.ifq_drops++; + } + if (schedswi) + swi_sched(V_pfsync_swi_cookie, 0); #else sc->sc_if.if_opackets++; sc->sc_if.if_obytes += m->m_pkthdr.len; @@ -2389,11 +2393,7 @@ pfsync_insert_state(struct pf_state *st) pfsync_q_ins(st, PFSYNC_S_INS); if (ISSET(st->state_flags, PFSTATE_ACK)) -#ifdef __FreeBSD__ - pfsync_sendout(); -#else schednetisr(NETISR_PFSYNC); -#endif else st->sync_updates = 0; } @@ -2592,11 +2592,7 @@ pfsync_update_state(struct pf_state *st) if (sync || (time_uptime - st->pfsync_time) < 2) { pfsync_upds++; -#ifdef __FreeBSD__ - pfsync_sendout(); -#else schednetisr(NETISR_PFSYNC); -#endif } } @@ -2647,11 +2643,7 @@ pfsync_request_update(u_int32_t creatori TAILQ_INSERT_TAIL(&sc->sc_upd_req_list, item, ur_entry); sc->sc_len += nlen; -#ifdef __FreeBSD__ - pfsync_sendout(); -#else schednetisr(NETISR_PFSYNC); -#endif } void @@ -2680,11 +2672,7 @@ pfsync_update_state_req(struct pf_state pfsync_q_del(st); case PFSYNC_S_NONE: pfsync_q_ins(st, PFSYNC_S_UPD); -#ifdef __FreeBSD__ - pfsync_sendout(); -#else schednetisr(NETISR_PFSYNC); -#endif return; case PFSYNC_S_INS: @@ -3255,7 +3243,11 @@ pfsyncintr(void *arg) CURVNET_SET(sc->sc_ifp->if_vnet);
svn commit: r229975 - in stable: 8/share/man/man4 8/sys/amd64/conf 8/sys/conf 8/sys/dev/hpt27xx 8/sys/i386/conf 8/sys/modules 8/sys/modules/hpt27xx 9/share/man/man4 9/sys/amd64/conf 9/sys/conf 9/sy...
Author: delphij Date: Wed Jan 11 18:18:37 2012 New Revision: 229975 URL: http://svn.freebsd.org/changeset/base/229975 Log: MFC r228940: Import the first release of HighPoint RocketRAID 27xx SAS 6Gb/s HBA card driver. This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms. Many thanks to HighPoint for providing this driver. Added: stable/8/share/man/man4/hpt27xx.4 - copied unchanged from r228940, head/share/man/man4/hpt27xx.4 stable/8/sys/dev/hpt27xx/ - copied from r228940, head/sys/dev/hpt27xx/ stable/8/sys/modules/hpt27xx/ - copied from r228940, head/sys/modules/hpt27xx/ Modified: stable/8/share/man/man4/Makefile stable/8/sys/amd64/conf/NOTES stable/8/sys/conf/files.amd64 stable/8/sys/conf/files.i386 stable/8/sys/i386/conf/NOTES stable/8/sys/modules/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) Changes in other areas also in this revision: Added: stable/9/share/man/man4/hpt27xx.4 - copied unchanged from r228940, head/share/man/man4/hpt27xx.4 stable/9/sys/dev/hpt27xx/ - copied from r228940, head/sys/dev/hpt27xx/ stable/9/sys/modules/hpt27xx/ - copied from r228940, head/sys/modules/hpt27xx/ Modified: stable/9/share/man/man4/Makefile stable/9/sys/amd64/conf/NOTES stable/9/sys/conf/files.amd64 stable/9/sys/conf/files.i386 stable/9/sys/i386/conf/NOTES stable/9/sys/modules/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/8/share/man/man4/Makefile == --- stable/8/share/man/man4/MakefileWed Jan 11 18:14:22 2012 (r229974) +++ stable/8/share/man/man4/MakefileWed Jan 11 18:18:37 2012 (r229975) @@ -139,6 +139,7 @@ MAN=aac.4 \ hfa.4 \ hifn.4 \ hme.4 \ + ${_hpt27xx.4} \ ${_hptiop.4} \ ${_hptmv.4} \ ${_hptrr.4} \ @@ -663,6 +664,7 @@ _asmc.4=asmc.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 +_hpt27xx.4=hpt27xx.4 _hptiop.4= hptiop.4 _hptmv.4= hptmv.4 _hptrr.4= hptrr.4 Copied: stable/8/share/man/man4/hpt27xx.4 (from r228940, head/share/man/man4/hpt27xx.4) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/hpt27xx.4 Wed Jan 11 18:18:37 2012 (r229975, copy of r228940, head/share/man/man4/hpt27xx.4) @@ -0,0 +1,101 @@ +.\" +.\" Copyright (c) 2011 iXsystems, Inc. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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$ +.\" +.Dd December 28, 2011 +.Dt HPT27XX 4 +.Os +.Sh NAME +.Nm hpt27xx +.Nd "HighPoint RocketRAID 27xx SAS 6Gb/s HBA card driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device hpt27xx" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hpt27xx_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for HighPoint's RocketRAID 27xx based RAID controller. +.Pp +These devices support SAS disk drives +and provide RAID0 (striping), RAID1 (mirroring), and RAID5 functionality. +.Sh HARDWARE +The +.Nm +driver supports the following SAS +controllers: +.Pp +.Bl -bullet -compact +.It +HighPoint's RocketRAID 271x series +.It +HighPoint's RocketRAID 272x series +.It +HighPoint's RocketRAID 274x series +.It +HighPoint's RocketRA
svn commit: r229975 - in stable: 8/share/man/man4 8/sys/amd64/conf 8/sys/conf 8/sys/dev/hpt27xx 8/sys/i386/conf 8/sys/modules 8/sys/modules/hpt27xx 9/share/man/man4 9/sys/amd64/conf 9/sys/conf 9/sy...
Author: delphij Date: Wed Jan 11 18:18:37 2012 New Revision: 229975 URL: http://svn.freebsd.org/changeset/base/229975 Log: MFC r228940: Import the first release of HighPoint RocketRAID 27xx SAS 6Gb/s HBA card driver. This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms. Many thanks to HighPoint for providing this driver. Added: stable/9/share/man/man4/hpt27xx.4 - copied unchanged from r228940, head/share/man/man4/hpt27xx.4 stable/9/sys/dev/hpt27xx/ - copied from r228940, head/sys/dev/hpt27xx/ stable/9/sys/modules/hpt27xx/ - copied from r228940, head/sys/modules/hpt27xx/ Modified: stable/9/share/man/man4/Makefile stable/9/sys/amd64/conf/NOTES stable/9/sys/conf/files.amd64 stable/9/sys/conf/files.i386 stable/9/sys/i386/conf/NOTES stable/9/sys/modules/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Changes in other areas also in this revision: Added: stable/8/share/man/man4/hpt27xx.4 - copied unchanged from r228940, head/share/man/man4/hpt27xx.4 stable/8/sys/dev/hpt27xx/ - copied from r228940, head/sys/dev/hpt27xx/ stable/8/sys/modules/hpt27xx/ - copied from r228940, head/sys/modules/hpt27xx/ Modified: stable/8/share/man/man4/Makefile stable/8/sys/amd64/conf/NOTES stable/8/sys/conf/files.amd64 stable/8/sys/conf/files.i386 stable/8/sys/i386/conf/NOTES stable/8/sys/modules/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) Modified: stable/9/share/man/man4/Makefile == --- stable/9/share/man/man4/MakefileWed Jan 11 18:14:22 2012 (r229974) +++ stable/9/share/man/man4/MakefileWed Jan 11 18:18:37 2012 (r229975) @@ -150,6 +150,7 @@ MAN=aac.4 \ hifn.4 \ hme.4 \ hpet.4 \ + ${_hpt27xx.4} \ ${_hptiop.4} \ ${_hptmv.4} \ ${_hptrr.4} \ @@ -686,6 +687,7 @@ _atp.4= atp.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 +_hpt27xx.4=hpt27xx.4 _hptiop.4= hptiop.4 _hptmv.4= hptmv.4 _hptrr.4= hptrr.4 Copied: stable/9/share/man/man4/hpt27xx.4 (from r228940, head/share/man/man4/hpt27xx.4) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/share/man/man4/hpt27xx.4 Wed Jan 11 18:18:37 2012 (r229975, copy of r228940, head/share/man/man4/hpt27xx.4) @@ -0,0 +1,101 @@ +.\" +.\" Copyright (c) 2011 iXsystems, Inc. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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$ +.\" +.Dd December 28, 2011 +.Dt HPT27XX 4 +.Os +.Sh NAME +.Nm hpt27xx +.Nd "HighPoint RocketRAID 27xx SAS 6Gb/s HBA card driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device hpt27xx" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hpt27xx_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for HighPoint's RocketRAID 27xx based RAID controller. +.Pp +These devices support SAS disk drives +and provide RAID0 (striping), RAID1 (mirroring), and RAID5 functionality. +.Sh HARDWARE +The +.Nm +driver supports the following SAS +controllers: +.Pp +.Bl -bullet -compact +.It +HighPoint's RocketRAID 271x series +.It +HighPoint's RocketRAID 272x series +.It +HighPoint's RocketRAID 274x series +.It +HighPoint's
svn commit: r229974 - stable/8/sys/dev/sound/pci/hda
Author: mav Date: Wed Jan 11 18:14:22 2012 New Revision: 229974 URL: http://svn.freebsd.org/changeset/base/229974 Log: MFC r228726, r228727: Cast some vendor-specific spell on VIA VT1708S codecs to: - make analog input loopback work; - get access to the mics boost controls. Sponsored by: iXsystems, Inc. Modified: stable/8/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdac.c == --- stable/8/sys/dev/sound/pci/hda/hdac.c Wed Jan 11 18:12:53 2012 (r229973) +++ stable/8/sys/dev/sound/pci/hda/hdac.c Wed Jan 11 18:14:22 2012 (r229974) @@ -4921,6 +4921,30 @@ hdac_vendor_patch_parse(struct hdac_devi if (w != NULL) w->connsenable[0] = 0; break; + case HDA_CODEC_VT1708S_0: + case HDA_CODEC_VT1708S_1: + case HDA_CODEC_VT1708S_2: + case HDA_CODEC_VT1708S_3: + case HDA_CODEC_VT1708S_4: + case HDA_CODEC_VT1708S_5: + case HDA_CODEC_VT1708S_6: + case HDA_CODEC_VT1708S_7: + /* +* These codecs have hidden mic boost controls. +*/ + w = hdac_widget_get(devinfo, 26); + if (w != NULL) + w->param.inamp_cap = + (40 << HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_SHIFT) | + (3 << HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_SHIFT) | + (0 << HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_SHIFT); + w = hdac_widget_get(devinfo, 30); + if (w != NULL) + w->param.inamp_cap = + (40 << HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_SHIFT) | + (3 << HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_SHIFT) | + (0 << HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_SHIFT); + break; } } @@ -6408,7 +6432,7 @@ hdac_audio_commit(struct hdac_devinfo *d struct hdac_softc *sc = devinfo->codec->sc; struct hdac_widget *w; nid_t cad; - uint32_t gdata, gmask, gdir; + uint32_t id, gdata, gmask, gdir; int commitgpio, numgpio; int i; @@ -6417,6 +6441,24 @@ hdac_audio_commit(struct hdac_devinfo *d if (sc->pci_subvendor == APPLE_INTEL_MAC) hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, 0x7e7, 0), cad); + id = hdac_codec_id(devinfo->codec); + switch (id) { + case HDA_CODEC_VT1708S_0: + case HDA_CODEC_VT1708S_1: + case HDA_CODEC_VT1708S_2: + case HDA_CODEC_VT1708S_3: + case HDA_CODEC_VT1708S_4: + case HDA_CODEC_VT1708S_5: + case HDA_CODEC_VT1708S_6: + case HDA_CODEC_VT1708S_7: + /* Enable Mic Boost Volume controls. */ + hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, + 0xf98, 0x01), cad); + /* Don't bypass mixer. */ + hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, + 0xf88, 0xc0), cad); + break; + } /* Commit controls. */ hdac_audio_ctl_commit(devinfo); @@ -7718,10 +7760,6 @@ hdac_attach2(void *arg) ); hdac_audio_parse(devinfo); HDA_BOOTHVERBOSE( - device_printf(sc->dev, "Parsing Ctls...\n"); - ); - hdac_audio_ctl_parse(devinfo); - HDA_BOOTHVERBOSE( device_printf(sc->dev, "Parsing vendor patch...\n"); ); hdac_vendor_patch_parse(devinfo); @@ -7729,6 +7767,10 @@ hdac_attach2(void *arg) devinfo->function.audio.quirks &= ~quirks_off; HDA_BOOTHVERBOSE( + device_printf(sc->dev, "Parsing Ctls...\n"); + ); + hdac_audio_ctl_parse(devinfo); + HDA_BOOTHVERBOSE( device_printf(sc->dev, "Disabling nonaudio...\n"); ); hdac_audio_disable_nonaudio(devinfo); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229973 - stable/9/sys/dev/sound/pci/hda
Author: mav Date: Wed Jan 11 18:12:53 2012 New Revision: 229973 URL: http://svn.freebsd.org/changeset/base/229973 Log: MFC r228726, r228727: Cast some vendor-specific spell on VIA VT1708S codecs to: - make analog input loopback work; - get access to the mics boost controls. Sponsored by: iXsystems, Inc. Modified: stable/9/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdac.c == --- stable/9/sys/dev/sound/pci/hda/hdac.c Wed Jan 11 17:51:56 2012 (r229972) +++ stable/9/sys/dev/sound/pci/hda/hdac.c Wed Jan 11 18:12:53 2012 (r229973) @@ -4971,6 +4971,30 @@ hdac_vendor_patch_parse(struct hdac_devi if (w != NULL) w->connsenable[0] = 0; break; + case HDA_CODEC_VT1708S_0: + case HDA_CODEC_VT1708S_1: + case HDA_CODEC_VT1708S_2: + case HDA_CODEC_VT1708S_3: + case HDA_CODEC_VT1708S_4: + case HDA_CODEC_VT1708S_5: + case HDA_CODEC_VT1708S_6: + case HDA_CODEC_VT1708S_7: + /* +* These codecs have hidden mic boost controls. +*/ + w = hdac_widget_get(devinfo, 26); + if (w != NULL) + w->param.inamp_cap = + (40 << HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_SHIFT) | + (3 << HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_SHIFT) | + (0 << HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_SHIFT); + w = hdac_widget_get(devinfo, 30); + if (w != NULL) + w->param.inamp_cap = + (40 << HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_SHIFT) | + (3 << HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_SHIFT) | + (0 << HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_SHIFT); + break; } } @@ -6458,7 +6482,7 @@ hdac_audio_commit(struct hdac_devinfo *d struct hdac_softc *sc = devinfo->codec->sc; struct hdac_widget *w; nid_t cad; - uint32_t gdata, gmask, gdir; + uint32_t id, gdata, gmask, gdir; int commitgpio, numgpio; int i; @@ -6467,6 +6491,24 @@ hdac_audio_commit(struct hdac_devinfo *d if (sc->pci_subvendor == APPLE_INTEL_MAC) hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, 0x7e7, 0), cad); + id = hdac_codec_id(devinfo->codec); + switch (id) { + case HDA_CODEC_VT1708S_0: + case HDA_CODEC_VT1708S_1: + case HDA_CODEC_VT1708S_2: + case HDA_CODEC_VT1708S_3: + case HDA_CODEC_VT1708S_4: + case HDA_CODEC_VT1708S_5: + case HDA_CODEC_VT1708S_6: + case HDA_CODEC_VT1708S_7: + /* Enable Mic Boost Volume controls. */ + hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, + 0xf98, 0x01), cad); + /* Don't bypass mixer. */ + hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, + 0xf88, 0xc0), cad); + break; + } /* Commit controls. */ hdac_audio_ctl_commit(devinfo); @@ -7768,10 +7810,6 @@ hdac_attach2(void *arg) ); hdac_audio_parse(devinfo); HDA_BOOTHVERBOSE( - device_printf(sc->dev, "Parsing Ctls...\n"); - ); - hdac_audio_ctl_parse(devinfo); - HDA_BOOTHVERBOSE( device_printf(sc->dev, "Parsing vendor patch...\n"); ); hdac_vendor_patch_parse(devinfo); @@ -7779,6 +7817,10 @@ hdac_attach2(void *arg) devinfo->function.audio.quirks &= ~quirks_off; HDA_BOOTHVERBOSE( + device_printf(sc->dev, "Parsing Ctls...\n"); + ); + hdac_audio_ctl_parse(devinfo); + HDA_BOOTHVERBOSE( device_printf(sc->dev, "Disabling nonaudio...\n"); ); hdac_audio_disable_nonaudio(
Re: svn commit: r229972 - in head/tools/tools/wtap: . wtap
On 11 January 2012 21:51, Adrian Chadd wrote: > Author: adrian > Date: Wed Jan 11 17:51:56 2012 > New Revision: 229972 > URL: http://svn.freebsd.org/changeset/base/229972 > > Log: > Bring over a tool to create and destroy wtap instances. > > Submitted by: Monthadar Al Jaberi > > Added: > head/tools/tools/wtap/ > head/tools/tools/wtap/wtap/ > head/tools/tools/wtap/wtap/Makefile (contents, props changed) > head/tools/tools/wtap/wtap/wtap.c (contents, props changed) > > Added: head/tools/tools/wtap/wtap/Makefile > == > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tools/tools/wtap/wtap/Makefile Wed Jan 11 17:51:56 2012 > (r229972) > @@ -0,0 +1,9 @@ > +# $FreeBSD$ > + > +PROG= wtap > +SRC= wtap.c > +NO_MAN= 1 > + > +CFLAGS+= -I${.CURDIR}/../../../../sys/dev/wtap/ [nitpicking] I assume this is to properly build with if_wtapioctl.h. Maybe better install this header to /usr/include/sys then? > + > +.include > > Added: head/tools/tools/wtap/wtap/wtap.c > == > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tools/tools/wtap/wtap/wtap.c Wed Jan 11 17:51:56 2012 > (r229972) > @@ -0,0 +1,82 @@ > +/*- > + * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer, > + * without modification. > + * 2. Redistributions in binary form must reproduce at minimum a disclaimer > + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any > + * redistribution must be conditioned upon including a substantially > + * similar Disclaimer requirement for further binary redistribution. > + * > + * NO WARRANTY > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY > + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL > + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, > + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER > + * IN CONTRACT, STRICT 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 DAMAGES. > + * > + * $FreeBSD$ > + */ > +#include > +#include > +#include > +#include > + > +#include "if_wtapioctl.h" .. to use rather > + > +static int dev = -1; > + > +static void create(int id) > +{ > + if(ioctl(dev, WTAPIOCTLCRT, &id) < 0){ > + printf("error creating wtap with id=%d\n", id); > + } > +} > + > +static void delete(int id) > +{ > + if(ioctl(dev, WTAPIOCTLDEL, &id) < 0){ > + printf("error deleting wtap with id=%d\n", id); > + } > +} > + > +int main( int argc, const char* argv[]) > +{ > + if(argc != 3){ > + printf("usage: %s [c | d] wtap_id\n", argv[0]); > + return -1; > + } > + int id = atoi(argv[2]); > + if(!(id >= 0 && id < 64)){ > + printf("wtap_id must be between 0 and 7\n"); > + return -1; > + } This checks to be not larger than 64, but prints a warning to be not larger than 7. > + dev = open("/dev/wtapctl", O_RDONLY); > + if(dev < 0){ > + printf("error opening wtapctl cdev\n"); > + return -1; > + } Perhaps, it makes sense to print errno. > + switch((char)*argv[1]){ > + case 'c': > + create(id); > + break; > + case 'd': > + delete(id); > + break; > + default: > + printf("wtap ioctl: unkown command '%c'\n", *argv[1]); a typo there > + return -1; > + } > + return 0; > +} The code could be better styled. Thanks for your work! -- wbr, pluknet ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229972 - in head/tools/tools/wtap: . wtap
Author: adrian Date: Wed Jan 11 17:51:56 2012 New Revision: 229972 URL: http://svn.freebsd.org/changeset/base/229972 Log: Bring over a tool to create and destroy wtap instances. Submitted by: Monthadar Al Jaberi Added: head/tools/tools/wtap/ head/tools/tools/wtap/wtap/ head/tools/tools/wtap/wtap/Makefile (contents, props changed) head/tools/tools/wtap/wtap/wtap.c (contents, props changed) Added: head/tools/tools/wtap/wtap/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/wtap/wtap/Makefile Wed Jan 11 17:51:56 2012 (r229972) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +PROG= wtap +SRC= wtap.c +NO_MAN=1 + +CFLAGS+= -I${.CURDIR}/../../../../sys/dev/wtap/ + +.include Added: head/tools/tools/wtap/wtap/wtap.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/wtap/wtap/wtap.c Wed Jan 11 17:51:56 2012 (r229972) @@ -0,0 +1,82 @@ +/*- + * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer, + *without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + *similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + *redistribution must be conditioned upon including a substantially + *similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT 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 DAMAGES. + * + * $FreeBSD$ + */ +#include +#include +#include +#include + +#include "if_wtapioctl.h" + +static int dev = -1; + +static void create(int id) +{ +if(ioctl(dev, WTAPIOCTLCRT, &id) < 0){ + printf("error creating wtap with id=%d\n", id); +} +} + +static void delete(int id) +{ +if(ioctl(dev, WTAPIOCTLDEL, &id) < 0){ + printf("error deleting wtap with id=%d\n", id); +} +} + +int main( int argc, const char* argv[]) +{ +if(argc != 3){ + printf("usage: %s [c | d] wtap_id\n", argv[0]); + return -1; +} +int id = atoi(argv[2]); +if(!(id >= 0 && id < 64)){ + printf("wtap_id must be between 0 and 7\n"); + return -1; +} +dev = open("/dev/wtapctl", O_RDONLY); +if(dev < 0){ + printf("error opening wtapctl cdev\n"); + return -1; +} +switch((char)*argv[1]){ + case 'c': + create(id); + break; + case 'd': + delete(id); + break; + default: + printf("wtap ioctl: unkown command '%c'\n", *argv[1]); + return -1; +} +return 0; +} ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229971 - head/sys/dev/uart
Author: kib Date: Wed Jan 11 17:46:08 2012 New Revision: 229971 URL: http://svn.freebsd.org/changeset/base/229971 Log: Add PCI Id for the AMT SOL UART on 5 series Intel chipsets. MFC after:1 week Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c == --- head/sys/dev/uart/uart_bus_pci.cWed Jan 11 17:41:14 2012 (r229970) +++ head/sys/dev/uart/uart_bus_pci.cWed Jan 11 17:46:08 2012 (r229971) @@ -112,6 +112,8 @@ static struct pci_id pci_ns8250_ids[] = 0x10, 16384000 }, { 0x151f, 0x, 0x, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x8086, 0x1c3d, 0x, 0, "Intel AMT - KT Controller", 0x10 }, +{ 0x8086, 0x3b67, 0x, 0, "5 Series/3400 Series Chipset KT Controller", + 0x10 }, { 0x8086, 0x8811, 0x, 0, "Intel EG20T Serial Port 0", 0x10 }, { 0x8086, 0x8812, 0x, 0, "Intel EG20T Serial Port 1", 0x10 }, { 0x8086, 0x8813, 0x, 0, "Intel EG20T Serial Port 2", 0x10 }, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229970 - in head/sys: dev/wtap dev/wtap/plugins dev/wtap/wtap_hal modules/wtap
Author: adrian Date: Wed Jan 11 17:41:14 2012 New Revision: 229970 URL: http://svn.freebsd.org/changeset/base/229970 Log: Introduce wtap, the beginnings of a net80211 wlan simulator. This introduces: * a basic wtap interface * a HAL, which implements an abstraction layer for implementing different device behavious; * A visibility plugin, which allows for control over which nodes see other nodes (useful for mesh work.) It doesn't yet implement sta/adhoc/hostap modes but these are quite feasible to implement. Monthadar uses it to do 802.11s mesh verification. The userland tools will be committed in a follow-up commit. Submitted by: Monthadar Al Jaberi Added: head/sys/dev/wtap/ head/sys/dev/wtap/if_medium.c (contents, props changed) head/sys/dev/wtap/if_medium.h (contents, props changed) head/sys/dev/wtap/if_wtap.c (contents, props changed) head/sys/dev/wtap/if_wtap_module.c (contents, props changed) head/sys/dev/wtap/if_wtapioctl.h (contents, props changed) head/sys/dev/wtap/if_wtapvar.h (contents, props changed) head/sys/dev/wtap/plugins/ head/sys/dev/wtap/plugins/visibility.c (contents, props changed) head/sys/dev/wtap/plugins/visibility.h (contents, props changed) head/sys/dev/wtap/plugins/visibility_ioctl.h (contents, props changed) head/sys/dev/wtap/plugins/wtap_plugin.h (contents, props changed) head/sys/dev/wtap/wtap_hal/ head/sys/dev/wtap/wtap_hal/hal.c (contents, props changed) head/sys/dev/wtap/wtap_hal/hal.h (contents, props changed) head/sys/dev/wtap/wtap_hal/handler.h (contents, props changed) head/sys/modules/wtap/ head/sys/modules/wtap/Makefile (contents, props changed) Added: head/sys/dev/wtap/if_medium.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/wtap/if_medium.c Wed Jan 11 17:41:14 2012 (r229970) @@ -0,0 +1,120 @@ +/*- + * Copyright (c) 2010-2011 Monthadar Al Jaberi, TerraNet AB + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer, + *without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + *similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + *redistribution must be conditioned upon including a substantially + *similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT 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 DAMAGES. + * + * $FreeBSD$ + */ +#include "if_wtapvar.h" +#include "if_medium.h" + +void +init_medium(struct wtap_medium *md) +{ + + DWTAP_PRINTF("%s\n", __func__); + STAILQ_INIT(&md->md_pktbuf); + mtx_init(&md->md_mtx, "wtap_medium mtx", NULL, MTX_DEF | MTX_RECURSE); + + /* Event handler for sending packets between wtaps */ + struct eventhandler *eh = (struct eventhandler *) + malloc(sizeof(struct eventhandler), M_WTAP, M_NOWAIT | M_ZERO); + eh->tq = taskqueue_create("wtap_tx_taskq", M_NOWAIT | M_ZERO, + taskqueue_thread_enqueue, &eh->tq); + taskqueue_start_threads(&eh->tq, 1, PI_NET, "%s taskq", "wtap_medium"); + md->tx_handler = eh; + /* Mark medium closed by default */ + md->open = 0; +} + +void +deinit_medium(struct wtap_medium *md) +{ + + DWTAP_PRINTF("%s\n", __func__); + taskqueue_free(md->tx_handler->tq); + free(md->tx_handler, M_WTAP); +} + +int +medium_transmit(struct wtap_medium *md, int id, struct mbuf*m) +{ + + mtx_lock(&md->md_mtx); + if (md->open == 0){ + DWTAP_PRINTF("[%d] dropping m=%p\n", id, m); + m_free(m); + mtx_unlock(&md->md_mtx); + return 0; + } + + DWTAP_PRINTF("[%d] transmiting m=%p\n", id, m); + struct packet *p = (struct packet *)malloc(sizeof(struct packet), + M_WTAP_PACKET, M_ZERO | M_NOWAIT); + p->id = id; + p->m = m
svn commit: r229969 - stable/7/etc/defaults
Author: pluknet Date: Wed Jan 11 17:21:22 2012 New Revision: 229969 URL: http://svn.freebsd.org/changeset/base/229969 Log: MFC r211801: fix typo. Spotted by: Ildar Hizbulin (stable/7) Modified: stable/7/etc/defaults/rc.conf Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/defaults/rc.conf == --- stable/7/etc/defaults/rc.conf Wed Jan 11 17:10:27 2012 (r229968) +++ stable/7/etc/defaults/rc.conf Wed Jan 11 17:21:22 2012 (r229969) @@ -196,7 +196,7 @@ ifconfig_lo0="inet 127.0.0.1" # default #ifconfig_ed0_ipx="ipx 0x00010010" # Sample IPX address family entry. #ifconfig_fxp0_name="net0" # Change interface name from fxp0 to net0. #vlans_fxp0="101 vlan0"# vlan(4) interfaces for fxp0 device -#create_arg_vlan0="vlan 102" # vlan tag for vlan0 device +#create_args_vlan0="vlan 102" # vlan tag for vlan0 device #ipv4_addrs_fxp0="192.168.0.1/24 192.168.1.1-5/28" # example IPv4 address entry. # #autobridge_interfaces="bridge0" # List of bridges to check ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229968 - head/sys/net80211
Author: adrian Date: Wed Jan 11 17:10:27 2012 New Revision: 229968 URL: http://svn.freebsd.org/changeset/base/229968 Log: Add the ability to kick an existing mesh node without waiting for it to time out. Submitted by: Monthadar Al Jaberi Modified: head/sys/net80211/ieee80211_ioctl.c Modified: head/sys/net80211/ieee80211_ioctl.c == --- head/sys/net80211/ieee80211_ioctl.c Wed Jan 11 16:53:51 2012 (r229967) +++ head/sys/net80211/ieee80211_ioctl.c Wed Jan 11 17:10:27 2012 (r229968) @@ -1397,6 +1397,17 @@ setmlme_common(struct ieee80211vap *vap, IEEE80211_FC0_SUBTYPE_DEAUTH, reason); ieee80211_free_node(ni); break; + case IEEE80211_M_MBSS: + IEEE80211_NODE_LOCK(nt); + ni = ieee80211_find_node_locked(nt, mac); + if (ni != NULL) { + ieee80211_node_leave(ni); + ieee80211_free_node(ni); + } else { + error = ENOENT; + } + IEEE80211_NODE_UNLOCK(nt); + break; default: error = EINVAL; break; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229967 - head/sys/powerpc/powerpc
Author: nwhitehorn Date: Wed Jan 11 16:53:51 2012 New Revision: 229967 URL: http://svn.freebsd.org/changeset/base/229967 Log: Add a memory barrier to bus_dmamap_sync(), as should have always been present. We need a sync instead of eieio, as eieio does not enforce storage ordering between main and device memory. Modified: head/sys/powerpc/powerpc/busdma_machdep.c Modified: head/sys/powerpc/powerpc/busdma_machdep.c == --- head/sys/powerpc/powerpc/busdma_machdep.c Wed Jan 11 16:35:26 2012 (r229966) +++ head/sys/powerpc/powerpc/busdma_machdep.c Wed Jan 11 16:53:51 2012 (r229967) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include "iommu_if.h" @@ -979,6 +980,8 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus dmat->bounce_zone->total_bounced++; } } + + powerpc_sync(); } static void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r229937 - in head/lib: libc/gen libutil
On Wed, 11 Jan 2012, Guy Helmer wrote: On Jan 11, 2012, at 6:25 AM, Bruce Evans wrote: Is there any chance of keeping sorted lists sorted? This file used to be mostly sorted and mostly in KNF (tab before function names) and mostly without namespace pollution in parameter names). Newer code in it violates all of these style and header implementation rules. The pidfile code was already especially bad, and adding to the end of the unsorted list in it doesn't help. The pidfile man page is also unsorted. It was in "operations" order ... The Makefile for libutil is also unsorted: - SRCS is sorted or nearly so - disorder in MAN begins with pty.3. The rest of MAN is unsorted in much the same disorder as the prototypes - MLINKS is considerably more disordered, but is much larger so it needs ordering even more. SRCS and MAN are simple lists (except for the internal structure of MAN -- sections). MLINKS has more internal structure (pairs of link source and target, which should be sorted on the source first, then the target. See Makefile.inc's in libc for rasonably correct examples. Does this patch improve the situation? Sure. I have not found guidance for line lengths in style(9) -- am I looking in the wrong place? Not really. style(9) is supposed to consist mainly of examples. It contains no examples of lines longer than 80 (preferably 79). Therefore, lines longer than 80 are bad style. You have to know that it has been mangled into man page form and cancel the lossages from this. One lossage is that man adds a left margin of 5 spaces. So it is lines of length longer than 85 in the man output that would be too long. man should format man pages for the terminal or page width. This might exceed 80, or it might be less than 85 so it might be man and not the examples that are giving the line length limit. However, most of the examples are in literal text which man should not reformat. Thus the output has some lines slightly longer than 80 if that is the terminal width, but hopefully none more than 85. The 5 character margin also destroys the tab structure in the output. The man page is careful to preserve the 8-column primary indentation and the 4-column continuation-line indentation, but these cannot be done with tabs. Some user like wide terminals, but small screens are more common now, so even 80 columns may be too wide for a default. It's just too hard to have enough indentation in 64 columns. Index: libutil.h === --- libutil.h (revision 229961) +++ libutil.h (working copy) @@ -84,110 +84,117 @@ ... __BEGIN_DECLS -void clean_environment(const char * const *_white, +char *auth_getval(const char *_name); +voidclean_environment(const char * const *_white, const char * const *_more_white); -intextattr_namespace_to_string(int _attrnamespace, char **_string); -intextattr_string_to_namespace(const char *_string, int *_attrnamespace); -intflopen(const char *_path, int _flags, ...); I'd prefer to see the changes separately: sort, reformat, fix namespaces; not necessarily in that order. Sorting gives especially unreadable diffs. Here you changed to the style that leaves an extra space before the function name to line up with function names that have a `*' before them. That is too much for me. It also gives unreadable diffs by changing almost every line, since it was not used in this file before. This can be seen in the declaration of `clean_environment' above. ... +int uu_unlock(const char *_ttyname); +int uu_lock_txfr(const char *_ttyname, pid_t _pid); +int _secure_path(const char *_path, uid_t _uid, gid_t _gid); The best order for sorting `_foo' is unclear. In ASCII it is between A-Z and a-z. Lists in makefiles mostly use pure ASCII order since that is easiest to generate and check by doing the sorting using ls. In source code we might prefer to ignore underscores in sorting. The leading underscore in this name seems to be bogus. The function is documented. Use of it in other library functions might require an underscore to avoid namespace pollution, but this library is not generally careful about that. + Extra blank line. +int quota_check_path(const struct quotafile *_qf, const char *_path); +voidquota_close(struct quotafile *_qf); +int quota_convert(struct quotafile *_qf, int _wordsize); ... I checked that a few of these names match the man page. Seems fairly complete and correct. Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r229936 - head/lib/libutil
On Jan 10, 2012, at 5:06 PM, Jilles Tjoelker wrote: > On Tue, Jan 10, 2012 at 06:43:27PM +, Guy Helmer wrote: >> Author: ghelmer >> Date: Tue Jan 10 18:43:27 2012 >> New Revision: 229936 >> URL: http://svn.freebsd.org/changeset/base/229936 > >> Log: >> Set the FD_CLOEXEC flag on the open pidfile file descriptor. > >> Discussed with: pjd, des > >> Modified: >> head/lib/libutil/pidfile.c > >> +/* >> + * Prevent the file descriptor from escaping to other >> + * programs via exec(3). >> + */ >> +if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) { > > Consider adding O_CLOEXEC to the flopen() flags instead. That saves a > system call and removes a possible race condition with fork/exec from > threads or signal handlers. > > -- > Jilles Tjoelker Good idea, thanks! Guy This message has been scanned by ComplianceSafe, powered by Palisade's PacketSure. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229966 - head/lib/libutil
Author: ghelmer Date: Wed Jan 11 16:35:26 2012 New Revision: 229966 URL: http://svn.freebsd.org/changeset/base/229966 Log: jilles pointed out that O_CLOEXEC could be used in the open(2) flags rather than using fcntl(2) later, and in addition to saving a system call, removes a possible race with fork/exec from threads or signal handlers. Modified: head/lib/libutil/pidfile.c Modified: head/lib/libutil/pidfile.c == --- head/lib/libutil/pidfile.c Wed Jan 11 15:00:16 2012(r229965) +++ head/lib/libutil/pidfile.c Wed Jan 11 16:35:26 2012(r229966) @@ -117,7 +117,7 @@ pidfile_open(const char *path, mode_t mo * pidfile_write() can be called multiple times. */ fd = flopen(pfh->pf_path, - O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK, mode); + O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode); if (fd == -1) { if (errno == EWOULDBLOCK && pidptr != NULL) { count = 20; @@ -139,19 +139,6 @@ pidfile_open(const char *path, mode_t mo } /* -* Prevent the file descriptor from escaping to other -* programs via exec(3). -*/ - if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) { - error = errno; - unlink(pfh->pf_path); - close(fd); - free(pfh); - errno = error; - return (NULL); - } - - /* * Remember file information, so in pidfile_write() we are sure we write * to the proper descriptor. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r229937 - in head/lib: libc/gen libutil
On Jan 11, 2012, at 6:25 AM, Bruce Evans wrote: > On Tue, 10 Jan 2012, Pawel Jakub Dawidek wrote: > >> On Tue, Jan 10, 2012 at 07:53:25PM +, Guy Helmer wrote: >> [...] >>> Modified: head/lib/libutil/libutil.h >>> == >>> --- head/lib/libutil/libutil.h Tue Jan 10 18:43:27 2012 >>> (r229936) >>> +++ head/lib/libutil/libutil.h Tue Jan 10 19:53:25 2012 >>> (r229937) >>> @@ -170,6 +170,7 @@ struct pidfh *pidfile_open(const char *p >>> int pidfile_write(struct pidfh *pfh); >>> int pidfile_close(struct pidfh *pfh); >>> int pidfile_remove(struct pidfh *pfh); >>> +int pidfile_fileno(struct pidfh *pfh); >>> #endif >>> >>> #ifdef _UFS_UFS_QUOTA_H_ >> >> One more thing. You also need to add link in Makefile, so that >> 'man pidfile_fileno' will work. > > Is there any chance of keeping sorted lists sorted? > > This file used to be mostly sorted and mostly in KNF (tab before > function names) and mostly without namespace pollution in parameter > names). Newer code in it violates all of these style and header > implementation rules. The pidfile code was already especially bad, > and adding to the end of the unsorted list in it doesn't help. > > The pidfile man page is also unsorted. It was in "operations" order > "open/write/close/remove". That is hard to maintain and hard to search > for long lists. Adding pidfile_fileno() to the end of the list in the > same disorder as above makes the list not even in "operations" order > (since pidfile_fileno() is only valid betwen pidfile_open() and > pidfile_close()). > > Old disorder and nearby bugs in libutil.h (old := before 2005): > - the forward declarations of structs are totally disordered > - the following prototypes are disordered (mostly by adding them to > the end of a orginally-almost-sorted list: >trimdomain(), forkpty(), humanize_number(), uu_lockerr(), uu_unlock(), >_secure_path(), properties_read(), properties_free(), properties_find(), >auth_getval(), realhostname(), > - the forward declaration of struct sockaddr is disorderd (not unsorted > at the beginning with the others) > - surprisingly, realhostname_sa() is not unsorted relative to realhostname() > - the following prototypes have namespace pollution in parameter names > (their parameter names are in the implementation namespace, unlike for > all of the older prototypes in the file): >properties read(), properties free(), properties free(), auth_getval(), >realhostname(), realhostname_sa(). The properties code used to be the >only really ugly code in this file. > - formatting errors for openpty() (premature line splitting and wrong > continuation indent). The very first prototype in this file gives > an example of normal splitting and continuation indent > - formatting errors for forkpty() (same as for openpty()) > - line too long for realhostname_sa(), pw_copy() > - consider fparseln() as being in a new section so it isn't unsorted. > The start of this section should be delimited by a blank line (this is > done in -current). The new section isn't really justified. It is > just 1 function ifdefed to avoid a namespace problem. > - no namespace pollution for fparseln()'s parameters, but that it because > it is in a style different from all older prototypes in the file -- it > doesn't name its parameters. > > Newer disorder and nearby bugs: > - further unsorting of the forward declarations by adding kinfo* to the > end of the unsorted list. At least the new declarations are sorted > internally. > - the following protypes in the early sections are disordered: >expand_number(), kld*(), kinfo* (no need for a new section for the >last 2. At least they are each sorted internally), gr_scan() > - the following prototypes have namespace pollution in parameter names: >hexdump(), kld*(), gr_dup(), gr_equal(), gr_make(), gr_scan(). Only >about half of the gr*() prototypes have this bug > - better indentation for kinfo*() than for older or newer entries! > - line too long for gr_entry() > - pidfile*() have all of the above bugs, plus they are the only prototypes > up to this point in the file that don't put a tab before the function > name when the return type is int > - quota*() are slightly worse than pidfile*(). They add the additional > style bug of not using parameter names at all, except for 1 of 2 > parameters in 1 of 12 prototypes. That parameter is namespace pollution. > > Bruce Does this patch improve the situation? I have not found guidance for line lengths in style(9) -- am I looking in the wrong place? Guy Index: libutil.h === --- libutil.h (revision 229961) +++ libutil.h (working copy) @@ -84,110 +84,117 @@ #endif /* Avoid pulling in all the include files for no need */ -struct termios; -struct winsize; struct in_addr; struct kinfo_file; struct kinf
svn commit: r229965 - head/sys/dev/null
Author: gnn Date: Wed Jan 11 15:00:16 2012 New Revision: 229965 URL: http://svn.freebsd.org/changeset/base/229965 Log: Fix for PR 138526. Add the ability for /dev/null and /dev/zero to accept being set into non blocking mode via fcntl(). This brings the code into compliance with IEEE Std 1003.1-2001 as referenced in another PR, 94729. Reviewed by: jhb MFC after:1 week Modified: head/sys/dev/null/null.c Modified: head/sys/dev/null/null.c == --- head/sys/dev/null/null.cWed Jan 11 14:24:03 2012(r229964) +++ head/sys/dev/null/null.cWed Jan 11 15:00:16 2012(r229965) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -49,6 +50,7 @@ static struct cdev *zero_dev; static d_write_t null_write; static d_ioctl_t null_ioctl; +static d_ioctl_t zero_ioctl; static d_read_t zero_read; static struct cdevsw null_cdevsw = { @@ -63,6 +65,7 @@ static struct cdevsw zero_cdevsw = { .d_version =D_VERSION, .d_read = zero_read, .d_write = null_write, + .d_ioctl = zero_ioctl, .d_name = "zero", .d_flags = D_MMAP_ANON, }; @@ -82,17 +85,50 @@ null_ioctl(struct cdev *dev __unused, u_ int flags __unused, struct thread *td) { int error; + error = 0; - if (cmd != DIOCSKERNELDUMP) - return (ENOIOCTL); - error = priv_check(td, PRIV_SETDUMPER); - if (error) - return (error); - return (set_dumper(NULL)); + switch (cmd) { + case DIOCSKERNELDUMP: + error = priv_check(td, PRIV_SETDUMPER); + if (error == 0) + error = set_dumper(NULL); + break; + case FIONBIO: + break; + case FIOASYNC: + if (*(int *)data != 0) + error = EINVAL; + break; + default: + error = ENOIOCTL; + } + return (error); } /* ARGSUSED */ static int +zero_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data __unused, + int flags __unused, struct thread *td) +{ + int error; + error = 0; + + switch (cmd) { + case FIONBIO: + break; + case FIOASYNC: + if (*(int *)data != 0) + error = EINVAL; + break; + default: + error = ENOIOCTL; + } + return (error); +} + + +/* ARGSUSED */ +static int zero_read(struct cdev *dev __unused, struct uio *uio, int flags __unused) { void *zbuf; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229964 - head/sys/contrib/pf/net
Author: glebius Date: Wed Jan 11 14:24:03 2012 New Revision: 229964 URL: http://svn.freebsd.org/changeset/base/229964 Log: Fix some spacing in code under __FreeBSD__. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c == --- head/sys/contrib/pf/net/if_pfsync.c Wed Jan 11 14:19:04 2012 (r229963) +++ head/sys/contrib/pf/net/if_pfsync.c Wed Jan 11 14:24:03 2012 (r229964) @@ -2068,7 +2068,7 @@ pfsync_drop(struct pfsync_softc *sc) #ifdef PFSYNC_DEBUG #ifdef __FreeBSD__ KASSERT(st->sync_state == q, - ("%s: st->sync_state == q", + ("%s: st->sync_state == q", __FUNCTION__)); #else KASSERT(st->sync_state == q); @@ -2848,7 +2848,7 @@ pfsync_q_del(struct pf_state *st) int q = st->sync_state; #ifdef __FreeBSD__ - KASSERT(st->sync_state != PFSYNC_S_NONE, + KASSERT(st->sync_state != PFSYNC_S_NONE, ("%s: st->sync_state != PFSYNC_S_NONE", __FUNCTION__)); #else KASSERT(st->sync_state != PFSYNC_S_NONE); @@ -3348,14 +3348,14 @@ pfsync_multicast_cleanup(struct pfsync_s #ifdef INET extern struct domain inetdomain; static struct protosw in_pfsync_protosw = { - .pr_type = SOCK_RAW, - .pr_domain =&inetdomain, - .pr_protocol = IPPROTO_PFSYNC, - .pr_flags = PR_ATOMIC|PR_ADDR, - .pr_input = pfsync_input, - .pr_output =(pr_output_t *)rip_output, - .pr_ctloutput = rip_ctloutput, - .pr_usrreqs = &rip_usrreqs + .pr_type = SOCK_RAW, + .pr_domain =&inetdomain, + .pr_protocol = IPPROTO_PFSYNC, + .pr_flags = PR_ATOMIC|PR_ADDR, + .pr_input = pfsync_input, + .pr_output =(pr_output_t *)rip_output, + .pr_ctloutput = rip_ctloutput, + .pr_usrreqs = &rip_usrreqs }; #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229963 - head/sys/contrib/pf/net
Author: glebius Date: Wed Jan 11 14:19:04 2012 New Revision: 229963 URL: http://svn.freebsd.org/changeset/base/229963 Log: Add necessary locking in pfsync_in_ureq(). Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c == --- head/sys/contrib/pf/net/if_pfsync.c Wed Jan 11 14:13:42 2012 (r229962) +++ head/sys/contrib/pf/net/if_pfsync.c Wed Jan 11 14:19:04 2012 (r229963) @@ -1433,6 +1433,9 @@ pfsync_in_ureq(struct pfsync_pkt *pkt, s } ura = (struct pfsync_upd_req *)(mp->m_data + offp); +#ifdef __FreeBSD__ + PF_LOCK(); +#endif for (i = 0; i < count; i++) { ur = &ura[i]; @@ -1450,11 +1453,12 @@ pfsync_in_ureq(struct pfsync_pkt *pkt, s if (ISSET(st->state_flags, PFSTATE_NOSYNC)) continue; - PF_LOCK(); pfsync_update_state_req(st); - PF_UNLOCK(); } } +#ifdef __FreeBSD__ + PF_UNLOCK(); +#endif return (len); } @@ -2975,7 +2979,7 @@ pfsync_bulk_start(void) printf("pfsync: received bulk update request\n"); #ifdef __FreeBSD__ - PF_LOCK(); + PF_LOCK_ASSERT(); if (TAILQ_EMPTY(&V_state_list)) #else if (TAILQ_EMPTY(&state_list)) @@ -2994,9 +2998,6 @@ pfsync_bulk_start(void) pfsync_bulk_status(PFSYNC_BUS_START); callout_reset(&sc->sc_bulk_tmo, 1, pfsync_bulk_update, sc); } -#ifdef __FreeBSD__ - PF_UNLOCK(); -#endif } void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229962 - head/sys/contrib/pf/net
Author: glebius Date: Wed Jan 11 14:13:42 2012 New Revision: 229962 URL: http://svn.freebsd.org/changeset/base/229962 Log: Move PF_LOCK_ASSERT() under __FreeBSD__. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c == --- head/sys/contrib/pf/net/if_pfsync.c Wed Jan 11 14:11:10 2012 (r229961) +++ head/sys/contrib/pf/net/if_pfsync.c Wed Jan 11 14:13:42 2012 (r229962) @@ -681,9 +681,9 @@ pfsync_state_import(struct pfsync_state int pool_flags; int error; +#ifdef __FreeBSD__ PF_LOCK_ASSERT(); -#ifdef __FreeBSD__ if (sp->creatorid == 0 && V_pf_status.debug >= PF_DEBUG_MISC) { #else if (sp->creatorid == 0 && pf_status.debug >= PF_DEBUG_MISC) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229961 - head/sys/contrib/pf/net
Author: glebius Date: Wed Jan 11 14:11:10 2012 New Revision: 229961 URL: http://svn.freebsd.org/changeset/base/229961 Log: Merge from OpenBSD: revision 1.128 date: 2009/08/16 13:01:57; author: jsg; state: Exp; lines: +1 -5 remove prototypes of a bunch of functions that had their implementations removed in pfsync v5. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c == --- head/sys/contrib/pf/net/if_pfsync.c Wed Jan 11 13:59:49 2012 (r229960) +++ head/sys/contrib/pf/net/if_pfsync.c Wed Jan 11 14:11:10 2012 (r229961) @@ -47,6 +47,7 @@ * 1.118, 1.124, 1.148, 1.149, 1.151, 1.171 - fixes to bulk updates * 1.120, 1.175 - use monotonic time_uptime * 1.122 - reduce number of updates for non-TCP sessions + * 1.128 - cleanups * 1.170 - SIOCSIFMTU checks */ @@ -342,7 +343,6 @@ int pfsyncioctl(struct ifnet *, u_long, void pfsyncstart(struct ifnet *); struct mbuf *pfsync_if_dequeue(struct ifnet *); -struct mbuf *pfsync_get_mbuf(struct pfsync_softc *); void pfsync_deferred(struct pf_state *, int); void pfsync_undefer(struct pfsync_deferral *, int); @@ -354,11 +354,8 @@ void pfsync_update_state_req(struct pf_s void pfsync_drop(struct pfsync_softc *); void pfsync_sendout(void); void pfsync_send_plus(void *, size_t); -intpfsync_tdb_sendout(struct pfsync_softc *); -intpfsync_sendout_mbuf(struct pfsync_softc *, struct mbuf *); void pfsync_timeout(void *); void pfsync_tdb_timeout(void *); -void pfsync_send_bus(struct pfsync_softc *, u_int8_t); void pfsync_bulk_start(void); void pfsync_bulk_status(u_int8_t); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229960 - stable/7/sys/boot/pc98/boot2
Author: nyan Date: Wed Jan 11 13:59:49 2012 New Revision: 229960 URL: http://svn.freebsd.org/changeset/base/229960 Log: MFC: revision 229462 Fix 230MB MO support. Submitted by: Kaho Toshikazu Modified: stable/7/sys/boot/pc98/boot2/boot1.S Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/boot/pc98/boot2/boot1.S == --- stable/7/sys/boot/pc98/boot2/boot1.SWed Jan 11 13:57:48 2012 (r229959) +++ stable/7/sys/boot/pc98/boot2/boot1.SWed Jan 11 13:59:49 2012 (r229960) @@ -219,7 +219,7 @@ read: xor %ax,%ax jc read_load and $0xff7f,%si /* SCSI MO */ mov %di,%cx - shr $16,%di + shr $16,%edi mov %di,%dx jmp read_load read_fd: or $0xd000,%si ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229959 - head/sys/contrib/pf/net
Author: glebius Date: Wed Jan 11 13:57:48 2012 New Revision: 229959 URL: http://svn.freebsd.org/changeset/base/229959 Log: When running with INVARIANTS the mutex(9) code does all necessary asserts for non-recursive mutexes. Modified: head/sys/contrib/pf/net/pfvar.h Modified: head/sys/contrib/pf/net/pfvar.h == --- head/sys/contrib/pf/net/pfvar.h Wed Jan 11 13:56:31 2012 (r229958) +++ head/sys/contrib/pf/net/pfvar.h Wed Jan 11 13:57:48 2012 (r229959) @@ -241,15 +241,8 @@ extern struct mtx pf_task_mtx; #definePF_LOCK_ASSERT()mtx_assert(&pf_task_mtx, MA_OWNED) #definePF_UNLOCK_ASSERT() mtx_assert(&pf_task_mtx, MA_NOTOWNED) - -#definePF_LOCK() do {\ - PF_UNLOCK_ASSERT(); \ - mtx_lock(&pf_task_mtx); \ -} while(0) -#definePF_UNLOCK() do {\ - PF_LOCK_ASSERT(); \ - mtx_unlock(&pf_task_mtx); \ -} while(0) +#definePF_LOCK() mtx_lock(&pf_task_mtx) +#definePF_UNLOCK() mtx_unlock(&pf_task_mtx) #else #definePF_LOCK_ASSERT() #definePF_UNLOCK_ASSERT() ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229958 - stable/8/sys/boot/pc98/boot2
Author: nyan Date: Wed Jan 11 13:56:31 2012 New Revision: 229958 URL: http://svn.freebsd.org/changeset/base/229958 Log: MFC: revision 229462 Fix 230MB MO support. Submitted by: Kaho Toshikazu Modified: stable/8/sys/boot/pc98/boot2/boot1.S Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/boot/pc98/boot2/boot1.S == --- stable/8/sys/boot/pc98/boot2/boot1.SWed Jan 11 13:52:34 2012 (r229957) +++ stable/8/sys/boot/pc98/boot2/boot1.SWed Jan 11 13:56:31 2012 (r229958) @@ -219,7 +219,7 @@ read: xor %ax,%ax jc read_load and $0xff7f,%si /* SCSI MO */ mov %di,%cx - shr $16,%di + shr $16,%edi mov %di,%dx jmp read_load read_fd: or $0xd000,%si ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229957 - stable/9/sys/boot/pc98/boot2
Author: nyan Date: Wed Jan 11 13:52:34 2012 New Revision: 229957 URL: http://svn.freebsd.org/changeset/base/229957 Log: MFC: revision 229462 Fix 230MB MO support. Submitted by: Kaho Toshikazu Modified: stable/9/sys/boot/pc98/boot2/boot1.S Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/pc98/boot2/boot1.S == --- stable/9/sys/boot/pc98/boot2/boot1.SWed Jan 11 02:46:42 2012 (r229956) +++ stable/9/sys/boot/pc98/boot2/boot1.SWed Jan 11 13:52:34 2012 (r229957) @@ -219,7 +219,7 @@ read: xor %ax,%ax jc read_load and $0xff7f,%si /* SCSI MO */ mov %di,%cx - shr $16,%di + shr $16,%edi mov %di,%dx jmp read_load read_fd: or $0xd000,%si ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r229937 - in head/lib: libc/gen libutil
On Tue, 10 Jan 2012, Pawel Jakub Dawidek wrote: On Tue, Jan 10, 2012 at 07:53:25PM +, Guy Helmer wrote: [...] Modified: head/lib/libutil/libutil.h == --- head/lib/libutil/libutil.h Tue Jan 10 18:43:27 2012(r229936) +++ head/lib/libutil/libutil.h Tue Jan 10 19:53:25 2012(r229937) @@ -170,6 +170,7 @@ struct pidfh *pidfile_open(const char *p int pidfile_write(struct pidfh *pfh); int pidfile_close(struct pidfh *pfh); int pidfile_remove(struct pidfh *pfh); +int pidfile_fileno(struct pidfh *pfh); #endif #ifdef _UFS_UFS_QUOTA_H_ One more thing. You also need to add link in Makefile, so that 'man pidfile_fileno' will work. Is there any chance of keeping sorted lists sorted? This file used to be mostly sorted and mostly in KNF (tab before function names) and mostly without namespace pollution in parameter names). Newer code in it violates all of these style and header implementation rules. The pidfile code was already especially bad, and adding to the end of the unsorted list in it doesn't help. The pidfile man page is also unsorted. It was in "operations" order "open/write/close/remove". That is hard to maintain and hard to search for long lists. Adding pidfile_fileno() to the end of the list in the same disorder as above makes the list not even in "operations" order (since pidfile_fileno() is only valid betwen pidfile_open() and pidfile_close()). Old disorder and nearby bugs in libutil.h (old := before 2005): - the forward declarations of structs are totally disordered - the following prototypes are disordered (mostly by adding them to the end of a orginally-almost-sorted list: trimdomain(), forkpty(), humanize_number(), uu_lockerr(), uu_unlock(), _secure_path(), properties_read(), properties_free(), properties_find(), auth_getval(), realhostname(), - the forward declaration of struct sockaddr is disorderd (not unsorted at the beginning with the others) - surprisingly, realhostname_sa() is not unsorted relative to realhostname() - the following prototypes have namespace pollution in parameter names (their parameter names are in the implementation namespace, unlike for all of the older prototypes in the file): properties read(), properties free(), properties free(), auth_getval(), realhostname(), realhostname_sa(). The properties code used to be the only really ugly code in this file. - formatting errors for openpty() (premature line splitting and wrong continuation indent). The very first prototype in this file gives an example of normal splitting and continuation indent - formatting errors for forkpty() (same as for openpty()) - line too long for realhostname_sa(), pw_copy() - consider fparseln() as being in a new section so it isn't unsorted. The start of this section should be delimited by a blank line (this is done in -current). The new section isn't really justified. It is just 1 function ifdefed to avoid a namespace problem. - no namespace pollution for fparseln()'s parameters, but that it because it is in a style different from all older prototypes in the file -- it doesn't name its parameters. Newer disorder and nearby bugs: - further unsorting of the forward declarations by adding kinfo* to the end of the unsorted list. At least the new declarations are sorted internally. - the following protypes in the early sections are disordered: expand_number(), kld*(), kinfo* (no need for a new section for the last 2. At least they are each sorted internally), gr_scan() - the following prototypes have namespace pollution in parameter names: hexdump(), kld*(), gr_dup(), gr_equal(), gr_make(), gr_scan(). Only about half of the gr*() prototypes have this bug - better indentation for kinfo*() than for older or newer entries! - line too long for gr_entry() - pidfile*() have all of the above bugs, plus they are the only prototypes up to this point in the file that don't put a tab before the function name when the return type is int - quota*() are slightly worse than pidfile*(). They add the additional style bug of not using parameter names at all, except for 1 of 2 parameters in 1 of 12 prototypes. That parameter is namespace pollution. Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"