svn commit: r215604 - in projects/sbruno_64cpus: bin/sh
contrib/ipfilter/man contrib/top lib/liblzma sbin/camcontrol
sbin/geom/class/part sbin/mount share/man/man1 share/man/man4
share/mk sys/amd64...
Sean Bruno
sbruno at FreeBSD.org
Sun Nov 21 02:00:55 UTC 2010
Author: sbruno
Date: Sun Nov 21 02:00:54 2010
New Revision: 215604
URL: http://svn.freebsd.org/changeset/base/215604
Log:
Merge to head for retesting
Added:
projects/sbruno_64cpus/tools/regression/bin/sh/builtins/wait3.0
- copied unchanged from r215603, head/tools/regression/bin/sh/builtins/wait3.0
projects/sbruno_64cpus/tools/regression/bin/sh/expansion/arith6.0
- copied unchanged from r215603, head/tools/regression/bin/sh/expansion/arith6.0
Deleted:
projects/sbruno_64cpus/sys/ufs/ffs/README.snapshot
Modified:
projects/sbruno_64cpus/bin/sh/Makefile
projects/sbruno_64cpus/bin/sh/builtins.def
projects/sbruno_64cpus/bin/sh/eval.c
projects/sbruno_64cpus/bin/sh/expand.c
projects/sbruno_64cpus/bin/sh/main.c
projects/sbruno_64cpus/bin/sh/mksyntax.c
projects/sbruno_64cpus/bin/sh/options.c
projects/sbruno_64cpus/bin/sh/output.c
projects/sbruno_64cpus/bin/sh/output.h
projects/sbruno_64cpus/bin/sh/sh.1
projects/sbruno_64cpus/bin/sh/var.c
projects/sbruno_64cpus/contrib/ipfilter/man/ipnat.8
projects/sbruno_64cpus/contrib/ipfilter/man/mkfilters.1
projects/sbruno_64cpus/lib/liblzma/Symbol.map
projects/sbruno_64cpus/sbin/camcontrol/camcontrol.c
projects/sbruno_64cpus/sbin/geom/class/part/geom_part.c
projects/sbruno_64cpus/sbin/geom/class/part/gpart.8
projects/sbruno_64cpus/sbin/mount/mount.8
projects/sbruno_64cpus/share/man/man1/builtin.1
projects/sbruno_64cpus/share/man/man4/ata.4
projects/sbruno_64cpus/sys/amd64/include/specialreg.h
projects/sbruno_64cpus/sys/boot/ofw/libofw/openfirm.c
projects/sbruno_64cpus/sys/dev/acpica/acpi_hpet.c
projects/sbruno_64cpus/sys/dev/ata/ata-all.c
projects/sbruno_64cpus/sys/dev/ata/ata-all.h
projects/sbruno_64cpus/sys/dev/atkbdc/psm.c
projects/sbruno_64cpus/sys/dev/mii/atphy.c
projects/sbruno_64cpus/sys/fs/cd9660/cd9660_node.c
projects/sbruno_64cpus/sys/fs/coda/coda_vnops.c
projects/sbruno_64cpus/sys/fs/ext2fs/ext2_inode.c
projects/sbruno_64cpus/sys/fs/hpfs/hpfs_vnops.c
projects/sbruno_64cpus/sys/fs/msdosfs/msdosfs_denode.c
projects/sbruno_64cpus/sys/fs/nfsclient/nfs_clnode.c
projects/sbruno_64cpus/sys/fs/ntfs/ntfs_vnops.c
projects/sbruno_64cpus/sys/gnu/fs/reiserfs/reiserfs_inode.c
projects/sbruno_64cpus/sys/i386/i386/initcpu.c
projects/sbruno_64cpus/sys/i386/include/pmap.h
projects/sbruno_64cpus/sys/i386/include/specialreg.h
projects/sbruno_64cpus/sys/i386/xen/mp_machdep.c
projects/sbruno_64cpus/sys/i386/xen/pmap.c
projects/sbruno_64cpus/sys/i386/xen/xen_machdep.c
projects/sbruno_64cpus/sys/kern/kern_module.c
projects/sbruno_64cpus/sys/kern/p1003_1b.c
projects/sbruno_64cpus/sys/kern/posix4_mib.c
projects/sbruno_64cpus/sys/kern/uipc_sem.c
projects/sbruno_64cpus/sys/kern/vfs_subr.c
projects/sbruno_64cpus/sys/netinet/siftr.c
projects/sbruno_64cpus/sys/netinet6/nd6_nbr.c
projects/sbruno_64cpus/sys/nfsclient/nfs_node.c
projects/sbruno_64cpus/sys/sys/vnode.h
projects/sbruno_64cpus/sys/ufs/ufs/ufs_inode.c
projects/sbruno_64cpus/sys/vm/vm_contig.c
projects/sbruno_64cpus/sys/vm/vm_object.c
projects/sbruno_64cpus/sys/vm/vm_page.c
projects/sbruno_64cpus/sys/vm/vm_pageout.c
projects/sbruno_64cpus/sys/vm/vm_pageout.h
projects/sbruno_64cpus/sys/vm/vm_reserv.c
projects/sbruno_64cpus/usr.bin/at/at.c
projects/sbruno_64cpus/usr.bin/chkey/chkey.c
projects/sbruno_64cpus/usr.bin/netstat/if.c
projects/sbruno_64cpus/usr.bin/printf/printf.1
projects/sbruno_64cpus/usr.bin/printf/printf.c
projects/sbruno_64cpus/usr.bin/vmstat/vmstat.c
projects/sbruno_64cpus/usr.sbin/mfiutil/mfi_config.c
projects/sbruno_64cpus/usr.sbin/mfiutil/mfi_evt.c
projects/sbruno_64cpus/usr.sbin/mfiutil/mfi_flash.c
Directory Properties:
projects/sbruno_64cpus/ (props changed)
projects/sbruno_64cpus/cddl/contrib/opensolaris/ (props changed)
projects/sbruno_64cpus/contrib/bind9/ (props changed)
projects/sbruno_64cpus/contrib/binutils/ (props changed)
projects/sbruno_64cpus/contrib/bzip2/ (props changed)
projects/sbruno_64cpus/contrib/ee/ (props changed)
projects/sbruno_64cpus/contrib/expat/ (props changed)
projects/sbruno_64cpus/contrib/file/ (props changed)
projects/sbruno_64cpus/contrib/gdb/ (props changed)
projects/sbruno_64cpus/contrib/gdtoa/ (props changed)
projects/sbruno_64cpus/contrib/gnu-sort/ (props changed)
projects/sbruno_64cpus/contrib/groff/ (props changed)
projects/sbruno_64cpus/contrib/less/ (props changed)
projects/sbruno_64cpus/contrib/libpcap/ (props changed)
projects/sbruno_64cpus/contrib/llvm/ (props changed)
projects/sbruno_64cpus/contrib/llvm/tools/clang/ (props changed)
projects/sbruno_64cpus/contrib/ncurses/ (props changed)
projects/sbruno_64cpus/contrib/netcat/ (props changed)
projects/sbruno_64cpus/contrib/ntp/ (props changed)
projects/sbruno_64cpus/contrib/one-true-awk/ (props changed)
projects/sbruno_64cpus/contrib/openbsm/ (props changed)
projects/sbruno_64cpus/contrib/openpam/ (props changed)
projects/sbruno_64cpus/contrib/pf/ (props changed)
projects/sbruno_64cpus/contrib/sendmail/ (props changed)
projects/sbruno_64cpus/contrib/tcpdump/ (props changed)
projects/sbruno_64cpus/contrib/tcsh/ (props changed)
projects/sbruno_64cpus/contrib/top/ (props changed)
projects/sbruno_64cpus/contrib/top/install-sh (props changed)
projects/sbruno_64cpus/contrib/tzcode/stdtime/ (props changed)
projects/sbruno_64cpus/contrib/tzcode/zic/ (props changed)
projects/sbruno_64cpus/contrib/tzdata/ (props changed)
projects/sbruno_64cpus/contrib/wpa/ (props changed)
projects/sbruno_64cpus/contrib/xz/ (props changed)
projects/sbruno_64cpus/crypto/openssh/ (props changed)
projects/sbruno_64cpus/crypto/openssl/ (props changed)
projects/sbruno_64cpus/lib/libc/ (props changed)
projects/sbruno_64cpus/lib/libc/stdtime/ (props changed)
projects/sbruno_64cpus/lib/libutil/ (props changed)
projects/sbruno_64cpus/lib/libz/ (props changed)
projects/sbruno_64cpus/sbin/ (props changed)
projects/sbruno_64cpus/sbin/ipfw/ (props changed)
projects/sbruno_64cpus/share/mk/bsd.arch.inc.mk (props changed)
projects/sbruno_64cpus/share/zoneinfo/ (props changed)
projects/sbruno_64cpus/sys/ (props changed)
projects/sbruno_64cpus/sys/amd64/include/xen/ (props changed)
projects/sbruno_64cpus/sys/cddl/contrib/opensolaris/ (props changed)
projects/sbruno_64cpus/sys/contrib/dev/acpica/ (props changed)
projects/sbruno_64cpus/sys/contrib/pf/ (props changed)
projects/sbruno_64cpus/sys/contrib/x86emu/ (props changed)
projects/sbruno_64cpus/sys/dev/xen/xenpci/ (props changed)
projects/sbruno_64cpus/usr.bin/calendar/ (props changed)
projects/sbruno_64cpus/usr.bin/csup/ (props changed)
projects/sbruno_64cpus/usr.bin/procstat/ (props changed)
projects/sbruno_64cpus/usr.sbin/zic/ (props changed)
Modified: projects/sbruno_64cpus/bin/sh/Makefile
==============================================================================
--- projects/sbruno_64cpus/bin/sh/Makefile Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/bin/sh/Makefile Sun Nov 21 02:00:54 2010 (r215604)
@@ -5,7 +5,7 @@ PROG= sh
INSTALLFLAGS= -S
SHSRCS= alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \
histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
- mystring.c options.c output.c parser.c redir.c show.c \
+ mystring.c options.c output.c parser.c printf.c redir.c show.c \
test.c trap.c var.c
GENSRCS= builtins.c init.c nodes.c syntax.c
GENHDRS= builtins.h nodes.h syntax.h token.h
@@ -26,7 +26,8 @@ WARNS?= 2
WFORMAT=0
.PATH: ${.CURDIR}/bltin \
- ${.CURDIR}/../test
+ ${.CURDIR}/../test \
+ ${.CURDIR}/../../usr.bin/printf
CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
mksyntax mksyntax.o
Modified: projects/sbruno_64cpus/bin/sh/builtins.def
==============================================================================
--- projects/sbruno_64cpus/bin/sh/builtins.def Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/bin/sh/builtins.def Sun Nov 21 02:00:54 2010 (r215604)
@@ -71,7 +71,7 @@ histcmd -h fc
jobidcmd jobid
jobscmd jobs
localcmd local
-#printfcmd printf
+printfcmd printf
pwdcmd pwd
readcmd read
returncmd -s return
Modified: projects/sbruno_64cpus/bin/sh/eval.c
==============================================================================
--- projects/sbruno_64cpus/bin/sh/eval.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/bin/sh/eval.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -699,13 +699,13 @@ evalcommand(union node *cmd, int flags,
for (sp = varlist.list ; sp ; sp = sp->next) {
if (sep != 0)
out2c(' ');
- p = sp->text;
- while (*p != '=' && *p != '\0')
- out2c(*p++);
- if (*p != '\0') {
- out2c(*p++);
+ p = strchr(sp->text, '=');
+ if (p != NULL) {
+ p++;
+ outbin(sp->text, p - sp->text, out2);
out2qstr(p);
- }
+ } else
+ out2qstr(sp->text);
sep = ' ';
}
for (sp = arglist.list ; sp ; sp = sp->next) {
Modified: projects/sbruno_64cpus/bin/sh/expand.c
==============================================================================
--- projects/sbruno_64cpus/bin/sh/expand.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/bin/sh/expand.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -1592,9 +1592,7 @@ wordexpcmd(int argc, char **argv)
for (i = 1, len = 0; i < argc; i++)
len += strlen(argv[i]);
out1fmt("%08x", (int)len);
- for (i = 1; i < argc; i++) {
- out1str(argv[i]);
- out1c('\0');
- }
+ for (i = 1; i < argc; i++)
+ outbin(argv[i], strlen(argv[i]) + 1, out1);
return (0);
}
Modified: projects/sbruno_64cpus/bin/sh/main.c
==============================================================================
--- projects/sbruno_64cpus/bin/sh/main.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/bin/sh/main.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -128,10 +128,8 @@ main(int argc, char *argv[])
exitshell(exitstatus);
}
reset();
- if (exception == EXINT) {
- out2c('\n');
- flushout(&errout);
- }
+ if (exception == EXINT)
+ out2fmt_flush("\n");
popstackmark(&smark);
FORCEINTON; /* enable interrupts */
if (state == 1)
Modified: projects/sbruno_64cpus/bin/sh/mksyntax.c
==============================================================================
--- projects/sbruno_64cpus/bin/sh/mksyntax.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/bin/sh/mksyntax.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -342,9 +342,9 @@ print(const char *name)
static const char *macro[] = {
"#define is_digit(c)\t((is_type+SYNBASE)[(int)c] & ISDIGIT)",
"#define is_eof(c)\t((c) == PEOF)",
- "#define is_alpha(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && (is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER))",
- "#define is_name(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && (is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER))",
- "#define is_in_name(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && (is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER|ISDIGIT))",
+ "#define is_alpha(c)\t((is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER))",
+ "#define is_name(c)\t((is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER))",
+ "#define is_in_name(c)\t((is_type+SYNBASE)[(int)c] & (ISUPPER|ISLOWER|ISUNDER|ISDIGIT))",
"#define is_special(c)\t((is_type+SYNBASE)[(int)c] & (ISSPECL|ISDIGIT))",
NULL
};
Modified: projects/sbruno_64cpus/bin/sh/options.c
==============================================================================
--- projects/sbruno_64cpus/bin/sh/options.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/bin/sh/options.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -261,13 +261,12 @@ minus_o(char *name, int val)
optlist[i].val ? "on" : "off");
} else {
/* Output suitable for re-input to shell. */
- for (i = 0; i < NOPTS; i++) {
- if (i % 6 == 0)
- out1str(i == 0 ? "set" : "\nset");
- out1fmt(" %co %s", optlist[i].val ? '-' : '+',
- optlist[i].name);
- }
- out1c('\n');
+ for (i = 0; i < NOPTS; i++)
+ out1fmt("%s %co %s%s",
+ i % 6 == 0 ? "set" : "",
+ optlist[i].val ? '-' : '+',
+ optlist[i].name,
+ i % 6 == 5 || i == NOPTS - 1 ? "\n" : "");
}
} else {
for (i = 0; i < NOPTS; i++)
Modified: projects/sbruno_64cpus/bin/sh/output.c
==============================================================================
--- projects/sbruno_64cpus/bin/sh/output.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/bin/sh/output.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -96,6 +96,12 @@ RESET {
void
+outcslow(int c, struct output *file)
+{
+ outc(c, file);
+}
+
+void
out1str(const char *p)
{
outstr(p, out1);
@@ -149,19 +155,19 @@ outqstr(const char *p, struct output *fi
case '\'':
/* Can't quote single quotes inside single quotes. */
if (inquotes)
- outc('\'', file);
+ outcslow('\'', file);
inquotes = 0;
outstr("\\'", file);
break;
default:
if (!inquotes)
- outc('\'', file);
+ outcslow('\'', file);
inquotes = 1;
outc(ch, file);
}
}
if (inquotes)
- outc('\'', file);
+ outcslow('\'', file);
}
void
Modified: projects/sbruno_64cpus/bin/sh/output.h
==============================================================================
--- projects/sbruno_64cpus/bin/sh/output.h Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/bin/sh/output.h Sun Nov 21 02:00:54 2010 (r215604)
@@ -54,6 +54,7 @@ extern struct output *out1; /* &memout i
extern struct output *out2; /* &memout if backquote with 2>&1, otherwise
&errout */
+void outcslow(int, struct output *);
void out1str(const char *);
void out1qstr(const char *);
void out2str(const char *);
@@ -74,7 +75,7 @@ int xwrite(int, const char *, int);
#define outc(c, file) (--(file)->nleft < 0? (emptyoutbuf(file), *(file)->nextc++ = (c)) : (*(file)->nextc++ = (c)))
#define out1c(c) outc(c, out1);
-#define out2c(c) outc(c, out2);
+#define out2c(c) outcslow(c, out2);
#define OUTPUT_INCL
#endif
Modified: projects/sbruno_64cpus/bin/sh/sh.1
==============================================================================
--- projects/sbruno_64cpus/bin/sh/sh.1 Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/bin/sh/sh.1 Sun Nov 21 02:00:54 2010 (r215604)
@@ -32,7 +32,7 @@
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
.\" $FreeBSD$
.\"
-.Dd November 12, 2010
+.Dd November 19, 2010
.Dt SH 1
.Os
.Sh NAME
@@ -2049,6 +2049,9 @@ line.
See the
.Sx Functions
subsection.
+.It Ic printf
+A built-in equivalent of
+.Xr printf 1 .
.It Ic pwd Op Fl L | P
Print the path of the current directory.
The built-in command may
@@ -2470,6 +2473,7 @@ will return the argument.
.Xr echo 1 ,
.Xr ed 1 ,
.Xr emacs 1 ,
+.Xr printf 1 ,
.Xr pwd 1 ,
.Xr test 1 ,
.Xr vi 1 ,
Modified: projects/sbruno_64cpus/bin/sh/var.c
==============================================================================
--- projects/sbruno_64cpus/bin/sh/var.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/bin/sh/var.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -633,10 +633,10 @@ showvarscmd(int argc __unused, char **ar
qsort(vars, n, sizeof(*vars), var_compare);
for (i = 0; i < n; i++) {
- for (s = vars[i]; *s != '='; s++)
- out1c(*s);
- out1c('=');
- out1qstr(s + 1);
+ s = strchr(vars[i], '=');
+ s++;
+ outbin(vars[i], s - vars[i], out1);
+ out1qstr(s);
out1c('\n');
}
ckfree(vars);
@@ -710,12 +710,15 @@ found:;
out1str(cmdname);
out1c(' ');
}
- for (p = vp->text ; *p != '=' ; p++)
- out1c(*p);
+ p = strchr(vp->text, '=');
if (values && !(vp->flags & VUNSET)) {
- out1c('=');
- out1qstr(p + 1);
- }
+ p++;
+ outbin(vp->text, p - vp->text,
+ out1);
+ out1qstr(p);
+ } else
+ outbin(vp->text, p - vp->text,
+ out1);
out1c('\n');
}
}
Modified: projects/sbruno_64cpus/contrib/ipfilter/man/ipnat.8
==============================================================================
--- projects/sbruno_64cpus/contrib/ipfilter/man/ipnat.8 Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/contrib/ipfilter/man/ipnat.8 Sun Nov 21 02:00:54 2010 (r215604)
@@ -66,6 +66,6 @@ and active rules/table entries.
.SH FILES
/dev/ipnat
.br
-/usr/share/examples/ipf Directory with examples.
+/usr/share/examples/ipfilter Directory with examples.
.SH SEE ALSO
ipnat(5), ipf(8), ipfstat(8)
Modified: projects/sbruno_64cpus/contrib/ipfilter/man/mkfilters.1
==============================================================================
--- projects/sbruno_64cpus/contrib/ipfilter/man/mkfilters.1 Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/contrib/ipfilter/man/mkfilters.1 Sun Nov 21 02:00:54 2010 (r215604)
@@ -6,7 +6,7 @@ mkfilters \- generate a minimal firewall
.SH SYNOPSIS
.B mkfilters
.SH FILES
-/usr/share/examples/ipf/mkfilters
+/usr/share/examples/ipfilter/mkfilters
.SH DESCRIPTION
.PP
\fBmkfilters\fP is a perl script that generates a minimal filter rule set for
Modified: projects/sbruno_64cpus/lib/liblzma/Symbol.map
==============================================================================
--- projects/sbruno_64cpus/lib/liblzma/Symbol.map Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/lib/liblzma/Symbol.map Sun Nov 21 02:00:54 2010 (r215604)
@@ -107,7 +107,6 @@ XZprivate_1.0 {
lzma_check_finish;
lzma_check_init;
lzma_check_update;
- lzma_chunk_size;
lzma_delta_coder_init;
lzma_delta_coder_memusage;
lzma_delta_decoder_init;
Modified: projects/sbruno_64cpus/sbin/camcontrol/camcontrol.c
==============================================================================
--- projects/sbruno_64cpus/sbin/camcontrol/camcontrol.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/sbin/camcontrol/camcontrol.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -1526,6 +1526,7 @@ rescan_or_reset_bus(int bus, int rescan)
bzero(&(&matchccb.ccb_h)[1],
sizeof(struct ccb_dev_match) - sizeof(struct ccb_hdr));
matchccb.ccb_h.func_code = XPT_DEV_MATCH;
+ matchccb.ccb_h.path_id = CAM_BUS_WILDCARD;
bufsize = sizeof(struct dev_match_result) * 20;
matchccb.cdm.match_buf_len = bufsize;
matchccb.cdm.matches=(struct dev_match_result *)malloc(bufsize);
Modified: projects/sbruno_64cpus/sbin/geom/class/part/geom_part.c
==============================================================================
--- projects/sbruno_64cpus/sbin/geom/class/part/geom_part.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/sbin/geom/class/part/geom_part.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$");
#include <sys/vtoc.h>
#include <assert.h>
+#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
@@ -85,6 +86,8 @@ static int gpart_show_hasopt(struct gctl
static void gpart_write_partcode(struct ggeom *, int, void *, ssize_t);
static void gpart_write_partcode_vtoc8(struct ggeom *, int, void *);
static void gpart_print_error(const char *);
+static void gpart_backup(struct gctl_req *, unsigned int);
+static void gpart_restore(struct gctl_req *, unsigned int);
struct g_command PUBSYM(class_commands)[] = {
{ "add", 0, gpart_issue, {
@@ -97,6 +100,11 @@ struct g_command PUBSYM(class_commands)[
G_OPT_SENTINEL },
"[-b start] [-s size] -t type [-i index] [-l label] [-f flags] geom"
},
+ { "backup", 0, gpart_backup, {
+ { 'l', "backup_labels", NULL, G_TYPE_BOOL},
+ G_OPT_SENTINEL },
+ "[-l] geom"
+ },
{ "bootcode", 0, gpart_bootcode, {
{ 'b', GPART_PARAM_BOOTCODE, G_VAL_OPTIONAL, G_TYPE_STRING },
{ 'p', GPART_PARAM_PARTCODE, G_VAL_OPTIONAL, G_TYPE_STRING },
@@ -165,6 +173,12 @@ struct g_command PUBSYM(class_commands)[
G_OPT_SENTINEL },
"[-s size] -i index [-f flags] geom"
},
+ { "restore", 0, gpart_restore, {
+ { 'F', "force", NULL, G_TYPE_BOOL },
+ { 'f', "flags", GPART_FLAGS, G_TYPE_STRING },
+ G_OPT_SENTINEL },
+ "[-F] [-f flags] provider [...]"
+ },
{ "recover", 0, gpart_issue, {
{ 'f', "flags", GPART_FLAGS, G_TYPE_STRING },
G_OPT_SENTINEL },
@@ -654,6 +668,295 @@ gpart_show(struct gctl_req *req, unsigne
geom_deletetree(&mesh);
}
+static void
+gpart_backup(struct gctl_req *req, unsigned int fl __unused)
+{
+ struct gmesh mesh;
+ struct gclass *classp;
+ struct gprovider *pp;
+ struct ggeom *gp;
+ const char *s, *scheme;
+ off_t sector, end;
+ off_t length, secsz;
+ int error, labels, i, windex, wblocks, wtype;
+
+ if (gctl_get_int(req, "nargs") != 1)
+ errx(EXIT_FAILURE, "Invalid number of arguments.");
+ error = geom_gettree(&mesh);
+ if (error != 0)
+ errc(EXIT_FAILURE, error, "Cannot get GEOM tree");
+ s = gctl_get_ascii(req, "class");
+ if (s == NULL)
+ abort();
+ classp = find_class(&mesh, s);
+ if (classp == NULL) {
+ geom_deletetree(&mesh);
+ errx(EXIT_FAILURE, "Class %s not found.", s);
+ }
+ s = gctl_get_ascii(req, "arg0");
+ if (s == NULL)
+ abort();
+ labels = gctl_get_int(req, "backup_labels");
+ gp = find_geom(classp, s);
+ if (gp == NULL)
+ errx(EXIT_FAILURE, "No such geom: %s.", s);
+ scheme = find_geomcfg(gp, "scheme");
+ if (scheme == NULL)
+ abort();
+ pp = LIST_FIRST(&gp->lg_consumer)->lg_provider;
+ secsz = pp->lg_sectorsize;
+ s = find_geomcfg(gp, "last");
+ wblocks = strlen(s);
+ wtype = 0;
+ LIST_FOREACH(pp, &gp->lg_provider, lg_provider) {
+ s = find_provcfg(pp, "type");
+ i = strlen(s);
+ if (i > wtype)
+ wtype = i;
+ }
+ s = find_geomcfg(gp, "entries");
+ windex = strlen(s);
+ printf("%s %s\n", scheme, s);
+ LIST_FOREACH(pp, &gp->lg_provider, lg_provider) {
+ s = find_provcfg(pp, "start");
+ if (s == NULL) {
+ s = find_provcfg(pp, "offset");
+ sector = (off_t)strtoimax(s, NULL, 0) / secsz;
+ } else
+ sector = (off_t)strtoimax(s, NULL, 0);
+
+ s = find_provcfg(pp, "end");
+ if (s == NULL) {
+ s = find_provcfg(pp, "length");
+ length = (off_t)strtoimax(s, NULL, 0) / secsz;
+ } else {
+ end = (off_t)strtoimax(s, NULL, 0);
+ length = end - sector + 1;
+ }
+ s = find_provcfg(pp, "label");
+ printf("%-*s %*s %*jd %*jd",
+ windex, find_provcfg(pp, "index"),
+ wtype, find_provcfg(pp, "type"),
+ wblocks, (intmax_t)sector,
+ wblocks, (intmax_t)length);
+ if (labels && s != NULL)
+ printf(" %s", s);
+ printf(" %s\n", fmtattrib(pp));
+ }
+ geom_deletetree(&mesh);
+}
+
+static int
+skip_line(const char *p)
+{
+
+ while (*p != '\0') {
+ if (*p == '#')
+ return (1);
+ if (isspace(*p) == 0)
+ return (0);
+ p++;
+ }
+ return (1);
+}
+
+static void
+gpart_restore(struct gctl_req *req, unsigned int fl __unused)
+{
+ struct gmesh mesh;
+ struct gclass *classp;
+ struct gctl_req *r;
+ struct ggeom *gp;
+ const char *s, *flags, *errstr, *label;
+ char **ap, *argv[6], line[BUFSIZ], *pline;
+ int error, forced, i, l, nargs, created;
+ intmax_t n;
+
+ nargs = gctl_get_int(req, "nargs");
+ if (nargs < 1)
+ errx(EXIT_FAILURE, "Invalid number of arguments.");
+
+ forced = gctl_get_int(req, "force");
+ flags = gctl_get_ascii(req, "flags");
+ s = gctl_get_ascii(req, "class");
+ if (s == NULL)
+ abort();
+ error = geom_gettree(&mesh);
+ if (error != 0)
+ errc(EXIT_FAILURE, error, "Cannot get GEOM tree");
+ classp = find_class(&mesh, s);
+ if (classp == NULL) {
+ geom_deletetree(&mesh);
+ errx(EXIT_FAILURE, "Class %s not found.", s);
+ }
+ if (forced) {
+ /* destroy existent partition table before restore */
+ for (i = 0; i < nargs; i++) {
+ s = gctl_get_ascii(req, "arg%d", i);
+ gp = find_geom(classp, s);
+ if (gp != NULL) {
+ r = gctl_get_handle();
+ gctl_ro_param(r, "class", -1,
+ classp->lg_name);
+ gctl_ro_param(r, "verb", -1, "destroy");
+ gctl_ro_param(r, "flags", -1, "restore");
+ gctl_ro_param(r, "force", sizeof(forced),
+ &forced);
+ gctl_ro_param(r, "arg0", -1, s);
+ errstr = gctl_issue(r);
+ if (errstr != NULL && errstr[0] != '\0') {
+ gpart_print_error(errstr);
+ gctl_free(r);
+ goto backout;
+ }
+ gctl_free(r);
+ }
+ }
+ }
+ created = 0;
+ while (fgets(line, sizeof(line) - 1, stdin)) {
+ /* Format of backup entries:
+ * <scheme name> <number of entries>
+ * <index> <type> <start> <size> [label] ['['attrib[,attrib]']']
+ */
+ pline = (char *)line;
+ pline[strlen(line) - 1] = 0;
+ if (skip_line(pline))
+ continue;
+ for (ap = argv;
+ (*ap = strsep(&pline, " \t")) != NULL;)
+ if (**ap != '\0' && ++ap >= &argv[6])
+ break;
+ l = ap - &argv[0];
+ label = pline = NULL;
+ if (l == 2) { /* create table */
+ if (created)
+ errx(EXIT_FAILURE, "Incorrect backup format.");
+ n = atoi(argv[1]);
+ for (i = 0; i < nargs; i++) {
+ s = gctl_get_ascii(req, "arg%d", i);
+ r = gctl_get_handle();
+ n = strtoimax(argv[1], NULL, 0);
+ gctl_ro_param(r, "class", -1,
+ classp->lg_name);
+ gctl_ro_param(r, "verb", -1, "create");
+ gctl_ro_param(r, "scheme", -1, argv[0]);
+ gctl_ro_param(r, "entries", sizeof(n), &n);
+ gctl_ro_param(r, "flags", -1, "restore");
+ gctl_ro_param(r, "arg0", -1, s);
+ errstr = gctl_issue(r);
+ if (errstr != NULL && errstr[0] != '\0') {
+ gpart_print_error(errstr);
+ gctl_free(r);
+ goto backout;
+ }
+ gctl_free(r);
+ }
+ created = 1;
+ continue;
+ } else if (l < 4 || created == 0)
+ errx(EXIT_FAILURE, "Incorrect backup format.");
+ else if (l == 5) {
+ if (strchr(argv[4], '[') == NULL)
+ label = argv[4];
+ else
+ pline = argv[4];
+ } else if (l == 6) {
+ label = argv[4];
+ pline = argv[5];
+ }
+ /* Add partitions to each table */
+ for (i = 0; i < nargs; i++) {
+ s = gctl_get_ascii(req, "arg%d", i);
+ r = gctl_get_handle();
+ n = strtoimax(argv[0], NULL, 0);
+ gctl_ro_param(r, "class", -1, classp->lg_name);
+ gctl_ro_param(r, "verb", -1, "add");
+ gctl_ro_param(r, "flags", -1, "restore");
+ gctl_ro_param(r, GPART_PARAM_INDEX, sizeof(n), &n);
+ gctl_ro_param(r, "type", -1, argv[1]);
+ gctl_ro_param(r, "start", -1, argv[2]);
+ gctl_ro_param(r, "size", -1, argv[3]);
+ if (label != NULL)
+ gctl_ro_param(r, "label", -1, argv[4]);
+ gctl_ro_param(r, "arg0", -1, s);
+ error = gpart_autofill(r);
+ if (error != 0)
+ errc(EXIT_FAILURE, error, "autofill");
+ errstr = gctl_issue(r);
+ if (errstr != NULL && errstr[0] != '\0') {
+ gpart_print_error(errstr);
+ gctl_free(r);
+ goto backout;
+ }
+ gctl_free(r);
+ }
+ if (pline == NULL || *pline != '[')
+ continue;
+ /* set attributes */
+ pline++;
+ for (ap = argv;
+ (*ap = strsep(&pline, ",]")) != NULL;)
+ if (**ap != '\0' && ++ap >= &argv[6])
+ break;
+ for (i = 0; i < nargs; i++) {
+ l = ap - &argv[0];
+ s = gctl_get_ascii(req, "arg%d", i);
+ while (l > 0) {
+ r = gctl_get_handle();
+ gctl_ro_param(r, "class", -1, classp->lg_name);
+ gctl_ro_param(r, "verb", -1, "set");
+ gctl_ro_param(r, "flags", -1, "restore");
+ gctl_ro_param(r, GPART_PARAM_INDEX,
+ sizeof(n), &n);
+ gctl_ro_param(r, "attrib", -1, argv[--l]);
+ gctl_ro_param(r, "arg0", -1, s);
+ errstr = gctl_issue(r);
+ if (errstr != NULL && errstr[0] != '\0') {
+ gpart_print_error(errstr);
+ gctl_free(r);
+ goto backout;
+ }
+ gctl_free(r);
+ }
+ }
+ }
+ /* commit changes if needed */
+ if (strchr(flags, 'C') != NULL) {
+ for (i = 0; i < nargs; i++) {
+ s = gctl_get_ascii(req, "arg%d", i);
+ r = gctl_get_handle();
+ gctl_ro_param(r, "class", -1, classp->lg_name);
+ gctl_ro_param(r, "verb", -1, "commit");
+ gctl_ro_param(r, "arg0", -1, s);
+ errstr = gctl_issue(r);
+ if (errstr != NULL && errstr[0] != '\0') {
+ gpart_print_error(errstr);
+ gctl_free(r);
+ goto backout;
+ }
+ gctl_free(r);
+ }
+ }
+ gctl_free(req);
+ geom_deletetree(&mesh);
+ exit(EXIT_SUCCESS);
+
+backout:
+ for (i = 0; i < nargs; i++) {
+ s = gctl_get_ascii(req, "arg%d", i);
+ r = gctl_get_handle();
+ gctl_ro_param(r, "class", -1, classp->lg_name);
+ gctl_ro_param(r, "verb", -1, "undo");
+ gctl_ro_param(r, "arg0", -1, s);
+ gctl_issue(r);
+ gctl_free(r);
+ }
+ gctl_free(req);
+ geom_deletetree(&mesh);
+ exit(EXIT_FAILURE);
+}
+
static void *
gpart_bootfile_read(const char *bootfile, ssize_t *size)
{
Modified: projects/sbruno_64cpus/sbin/geom/class/part/gpart.8
==============================================================================
--- projects/sbruno_64cpus/sbin/geom/class/part/gpart.8 Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/sbin/geom/class/part/gpart.8 Sun Nov 21 02:00:54 2010 (r215604)
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 25, 2010
+.Dd November 20, 2010
.Dt GPART 8
.Os
.Sh NAME
@@ -91,6 +91,11 @@ utility:
.Op Fl l Ar label
.Op Fl f Ar flags
.Ar geom
+.\" ==== BACKUP ====
+.Nm
+.Cm backup
+.Op Fl l
+.Ar geom
.\" ==== BOOTCODE ====
.Nm
.Cm bootcode
@@ -141,6 +146,13 @@ utility:
.Op Fl s Ar size
.Op Fl f Ar flags
.Ar geom
+.\" ==== RESTORE ====
+.Nm
+.Cm restore
+.Op Fl F
+.Op Fl f Ar flags
+.Ar provider
+.Op Ar ...
.\" ==== SET ====
.Nm
.Cm set
@@ -208,6 +220,17 @@ See the section entitled
below for a discussion
about its use.
.El
+.\" ==== BACKUP ====
+.It Cm backup
+Dump a partition table to standard output in special format used by
+.Cm restore
+action.
+.Pp
+Additional options include:
+.Bl -tag -width 10n
+.It Fl l
+Dump partition labels for partitioning schemes that support them.
+.El
.\" ==== BOOTCODE ====
.It Cm bootcode
Embed bootstrap code into the partitioning scheme's metadata on the
@@ -401,6 +424,28 @@ See the section entitled
below for a discussion
about its use.
.El
+.\" ==== RESTORE ====
+.It Cm restore
+Restore the partition table from backup previously created by
+.Cm backup
+action and given from standard input. Only partition table
+may be restored. This action does not affect content of partitions.
+This mean that you should copy your data from backup after restoring
+partition table and write bootcode again if it is needed.
+.Pp
+Additional options include:
+.Bl -tag -width 10n
+.It Fl F
+Destroy partition table on the given
+.Ar provider
+before doing restore.
+.It Fl f Ar flags
+Additional operational flags.
+See the section entitled
+.Sx "OPERATIONAL FLAGS"
+below for a discussion
+about its use.
+.El
.\" ==== SET ====
.It Cm set
Set the named attribute on the partition entry.
@@ -770,6 +815,28 @@ After having created all required partit
.Bd -literal -offset indent
/sbin/gpart bootcode -p /boot/boot1 da0
.Ed
+.Pp
+Create backup of partition table from
+.Pa da0
+.Bd -literal -offset indent
+/sbin/gpart backup -l da0 > da0.backup
+.Ed
+.Pp
+Restore partition table from backup to
+.Pa da0
+.Bd -literal -offset indent
+/sbin/gpart restore da0 < /mnt/da0.backup
+.Ed
+.Pp
+Clone partition table from
+.Pa ada0
+to
+.Pa ada1
+and
+.Pa ada2
+.Bd -literal -offset indent
+/sbin/gpart backup ada0 | /sbin/gpart restore -F ada1 ada2
+.Ed
.Sh SEE ALSO
.Xr dd 1 ,
.Xr geom 4 ,
Modified: projects/sbruno_64cpus/sbin/mount/mount.8
==============================================================================
--- projects/sbruno_64cpus/sbin/mount/mount.8 Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/sbin/mount/mount.8 Sun Nov 21 02:00:54 2010 (r215604)
@@ -305,9 +305,6 @@ When you are done with the mounted snaps
umount /mnt
mdconfig -d -u 4
.Ed
-.Pp
-Further details can be found in the file at
-.Pa /usr/src/sys/ufs/ffs/README.snapshot .
.El
.It Cm suiddir
A directory on the mounted file system will respond to the SUID bit
Modified: projects/sbruno_64cpus/share/man/man1/builtin.1
==============================================================================
--- projects/sbruno_64cpus/share/man/man1/builtin.1 Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/share/man/man1/builtin.1 Sun Nov 21 02:00:54 2010 (r215604)
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 9, 2010
+.Dd November 19, 2010
.Dt BUILTIN 1
.Os
.Sh NAME
@@ -99,6 +99,7 @@
.Nm onintr ,
.Nm popd ,
.Nm printenv ,
+.Nm printf ,
.Nm pushd ,
.Nm pwd ,
.Nm read ,
@@ -263,6 +264,7 @@ but are implemented as scripts using a b
.It Ic onintr Ta \&No Ta Yes Ta \&No
.It Ic popd Ta \&No Ta Yes Ta \&No
.It Ic printenv Ta Yes Ta Yes Ta \&No
+.It Ic printf Ta Yes Ta \&No Ta Yes
.It Ic pushd Ta \&No Ta Yes Ta \&No
.It Ic pwd Ta Yes Ta \&No Ta Yes
.It Ic read Ta No** Ta \&No Ta Yes
@@ -313,6 +315,7 @@ but are implemented as scripts using a b
.Xr nice 1 ,
.Xr nohup 1 ,
.Xr printenv 1 ,
+.Xr printf 1 ,
.Xr pwd 1 ,
.Xr sh 1 ,
.Xr test 1 ,
Modified: projects/sbruno_64cpus/share/man/man4/ata.4
==============================================================================
--- projects/sbruno_64cpus/share/man/man4/ata.4 Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/share/man/man4/ata.4 Sun Nov 21 02:00:54 2010 (r215604)
@@ -183,7 +183,7 @@ SIS963, SIS964, SIS965.
.It VIA:
VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686,
VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237,
-VT8237A, VT8237S, VT8251, CX700, VX800, VX855.
+VT8237A, VT8237S, VT8251, CX700, VX800, VX855, VX900.
.El
.Pp
Unknown ATA chipsets are supported in PIO modes, and if the standard
Modified: projects/sbruno_64cpus/sys/amd64/include/specialreg.h
==============================================================================
--- projects/sbruno_64cpus/sys/amd64/include/specialreg.h Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/sys/amd64/include/specialreg.h Sun Nov 21 02:00:54 2010 (r215604)
@@ -206,6 +206,7 @@
#define AMDPM_100MHZ_STEPS 0x00000040
#define AMDPM_HW_PSTATE 0x00000080
#define AMDPM_TSC_INVARIANT 0x00000100
+#define AMDPM_CPB 0x00000200
/*
* AMD extended function 8000_0008h ecx info
@@ -239,6 +240,8 @@
#define MSR_BIOS_SIGN 0x08b
#define MSR_PERFCTR0 0x0c1
#define MSR_PERFCTR1 0x0c2
+#define MSR_MPERF 0x0e7
+#define MSR_APERF 0x0e8
#define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */
#define MSR_MTRRcap 0x0fe
#define MSR_BBL_CR_ADDR 0x116
@@ -503,6 +506,7 @@
#define MSR_PERFCTR2 0xc0010006
#define MSR_PERFCTR3 0xc0010007
#define MSR_SYSCFG 0xc0010010
+#define MSR_HWCR 0xc0010015
#define MSR_IORRBASE0 0xc0010016
#define MSR_IORRMASK0 0xc0010017
#define MSR_IORRBASE1 0xc0010018
Modified: projects/sbruno_64cpus/sys/boot/ofw/libofw/openfirm.c
==============================================================================
--- projects/sbruno_64cpus/sys/boot/ofw/libofw/openfirm.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/sys/boot/ofw/libofw/openfirm.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -77,7 +77,7 @@ void
OF_init(int (*openfirm)(void *))
{
phandle_t options;
- char mode[8];
+ char mode[sizeof("true")];
openfirmware = openfirm;
@@ -93,13 +93,13 @@ OF_init(int (*openfirm)(void *))
if (OF_getprop(chosen, "mmu", &mmu, sizeof(mmu)) == -1)
OF_exit();
- /*
+ /*
* Check if we run in real mode. If so, we do not need to map
* memory later on.
*/
options = OF_finddevice("/options");
- OF_getprop(options, "real-mode?", mode, sizeof(mode));
- if (strncmp(mode, "true", 4) == 0)
+ if (OF_getprop(options, "real-mode?", mode, sizeof(mode)) > 0 &&
+ strcmp(mode, "true") == 0)
real_mode = 1;
}
Modified: projects/sbruno_64cpus/sys/dev/acpica/acpi_hpet.c
==============================================================================
--- projects/sbruno_64cpus/sys/dev/acpica/acpi_hpet.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/sys/dev/acpica/acpi_hpet.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -501,7 +501,7 @@ hpet_attach(device_t dev)
/*
* Neither QEMU nor VirtualBox report supported IRQs correctly.
* The only way to use HPET there is to specify IRQs manually
- * and/or use legacy_route. Legacy_route mode work on both.
+ * and/or use legacy_route. Legacy_route mode works on both.
*/
if (vm_guest)
sc->allowed_irqs = 0x00000000;
@@ -591,7 +591,7 @@ hpet_attach(device_t dev)
bus_write_4(sc->mem_res, HPET_ISR, 0xffffffff);
sc->irq = -1;
sc->intr_rid = -1;
- /* If at least one timer needs legacy IRQ - setup it. */
+ /* If at least one timer needs legacy IRQ - set it up. */
if (sc->useirq) {
j = i = fls(cvectors) - 1;
while (j > 0 && (cvectors & (1 << (j - 1))) != 0)
Modified: projects/sbruno_64cpus/sys/dev/ata/ata-all.c
==============================================================================
--- projects/sbruno_64cpus/sys/dev/ata/ata-all.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/sys/dev/ata/ata-all.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -171,7 +171,12 @@ ata_attach(device_t dev)
ch->user[i].bytecount = 8192;
else
ch->user[i].bytecount = MAXPHYS;
+ ch->user[i].caps = 0;
ch->curr[i] = ch->user[i];
+ if (ch->pm_level > 0)
+ ch->user[i].caps |= CTS_SATA_CAPS_H_PMREQ;
+ if (ch->pm_level > 1)
+ ch->user[i].caps |= CTS_SATA_CAPS_D_PMREQ;
}
#endif
callout_init(&ch->poll_callout, 1);
@@ -1627,6 +1632,8 @@ ataaction(struct cam_sim *sim, union ccb
d->bytecount = min(8192, cts->xport_specific.sata.bytecount);
if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI)
d->atapi = cts->xport_specific.sata.atapi;
+ if (cts->xport_specific.sata.valid & CTS_SATA_VALID_CAPS)
+ d->caps = cts->xport_specific.sata.caps;
} else {
if (cts->xport_specific.ata.valid & CTS_ATA_VALID_MODE) {
if (cts->type == CTS_TYPE_CURRENT_SETTINGS) {
@@ -1672,9 +1679,21 @@ ataaction(struct cam_sim *sim, union ccb
cts->xport_specific.sata.valid |=
CTS_SATA_VALID_REVISION;
}
+ cts->xport_specific.sata.caps =
+ d->caps & CTS_SATA_CAPS_D;
+ if (ch->pm_level) {
+ cts->xport_specific.sata.caps |=
+ CTS_SATA_CAPS_H_PMREQ;
+ }
+ cts->xport_specific.sata.caps &=
+ ch->user[ccb->ccb_h.target_id].caps;
+ cts->xport_specific.sata.valid |=
+ CTS_SATA_VALID_CAPS;
} else {
cts->xport_specific.sata.revision = d->revision;
cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION;
+ cts->xport_specific.sata.caps = d->caps;
+ cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS;
}
cts->xport_specific.sata.atapi = d->atapi;
cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI;
Modified: projects/sbruno_64cpus/sys/dev/ata/ata-all.h
==============================================================================
--- projects/sbruno_64cpus/sys/dev/ata/ata-all.h Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/sys/dev/ata/ata-all.h Sun Nov 21 02:00:54 2010 (r215604)
@@ -535,6 +535,7 @@ struct ata_cam_device {
int mode;
u_int bytecount;
u_int atapi;
+ u_int caps;
};
#endif
Modified: projects/sbruno_64cpus/sys/dev/atkbdc/psm.c
==============================================================================
--- projects/sbruno_64cpus/sys/dev/atkbdc/psm.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/sys/dev/atkbdc/psm.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -1214,12 +1214,12 @@ psmprobe(device_t dev)
* be that this is only the case when the controller DOES have the aux
* port but the port is not wired on the motherboard.) The keyboard
* controllers without the port, such as the original AT, are
- * supporsed to return with an error code or simply time out. In any
+ * supposed to return with an error code or simply time out. In any
* case, we have to continue probing the port even when the controller
* passes this test.
*
* XXX: some controllers erroneously return the error code 1, 2 or 3
- * when it has the perfectly functional aux port. We have to ignore
+ * when it has a perfectly functional aux port. We have to ignore
* this error code. Even if the controller HAS error with the aux
* port, it will be detected later...
* XXX: another incompatible controller returns PSM_ACK (0xfa)...
@@ -1250,7 +1250,7 @@ psmprobe(device_t dev)
if (sc->config & PSM_CONFIG_NORESET) {
/*
* Don't try to reset the pointing device. It may possibly be
- * left in the unknown state, though...
+ * left in an unknown state, though...
*/
} else {
/*
@@ -1277,7 +1277,7 @@ psmprobe(device_t dev)
}
/*
- * both the aux port and the aux device is functioning, see if the
+ * both the aux port and the aux device are functioning, see if the
* device can be enabled. NOTE: when enabled, the device will start
* sending data; we shall immediately disable the device once we know
* the device can be enabled.
Modified: projects/sbruno_64cpus/sys/dev/mii/atphy.c
==============================================================================
--- projects/sbruno_64cpus/sys/dev/mii/atphy.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/sys/dev/mii/atphy.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -317,6 +317,7 @@ atphy_status(struct mii_softc *sc)
static void
atphy_reset(struct mii_softc *sc)
{
+ struct ifmedia_entry *ife = sc->mii_pdata->mii_media.ifm_cur;
struct atphy_softc *asc;
uint32_t reg;
int i;
@@ -339,7 +340,7 @@ atphy_reset(struct mii_softc *sc)
PHY_WRITE(sc, ATPHY_SCR, reg);
/* Workaround F1 bug to reset phy. */
- atphy_setmedia(sc, sc->mii_pdata->mii_media.ifm_cur->ifm_media);
+ atphy_setmedia(sc, ife == NULL ? IFM_AUTO : ife->ifm_media);
for (i = 0; i < 1000; i++) {
DELAY(1);
Modified: projects/sbruno_64cpus/sys/fs/cd9660/cd9660_node.c
==============================================================================
--- projects/sbruno_64cpus/sys/fs/cd9660/cd9660_node.c Sun Nov 21 00:53:27 2010 (r215603)
+++ projects/sbruno_64cpus/sys/fs/cd9660/cd9660_node.c Sun Nov 21 02:00:54 2010 (r215604)
@@ -69,9 +69,6 @@ cd9660_inactive(ap)
struct iso_node *ip = VTOI(vp);
int error = 0;
- if (prtactive && vrefcnt(vp) != 0)
- vprint("cd9660_inactive: pushing active", vp);
-
/*
* If we are done with the inode, reclaim it
* so that it can be reused immediately.
@@ -93,8 +90,6 @@ cd9660_reclaim(ap)
{
struct vnode *vp = ap->a_vp;
- if (prtactive && vrefcnt(vp) != 0)
- vprint("cd9660_reclaim: pushing active", vp);
/*
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list