PERFORCE change 54201 for review
Marcel Moolenaar
marcel at FreeBSD.org
Sat Jun 5 05:58:05 GMT 2004
http://perforce.freebsd.org/chv.cgi?CH=54201
Change 54201 by marcel at marcel_nfs on 2004/06/04 22:56:50
IFC @54199
Affected files ...
.. //depot/projects/gdb/UPDATING#13 integrate
.. //depot/projects/gdb/bin/cp/utils.c#3 integrate
.. //depot/projects/gdb/bin/df/df.c#9 integrate
.. //depot/projects/gdb/lib/libarchive/archive_read.c#8 integrate
.. //depot/projects/gdb/lib/libarchive/archive_read_extract.c#13 integrate
.. //depot/projects/gdb/lib/libarchive/archive_read_support_format_tar.c#13 integrate
.. //depot/projects/gdb/lib/libdisk/write_alpha_disk.c#2 integrate
.. //depot/projects/gdb/lib/libdisk/write_amd64_disk.c#2 integrate
.. //depot/projects/gdb/lib/libdisk/write_i386_disk.c#3 integrate
.. //depot/projects/gdb/lib/libdisk/write_pc98_disk.c#3 integrate
.. //depot/projects/gdb/share/man/man3/Makefile#3 integrate
.. //depot/projects/gdb/share/man/man4/screen.4#2 integrate
.. //depot/projects/gdb/share/man/man5/libmap.conf.5#4 integrate
.. //depot/projects/gdb/share/man/man5/periodic.conf.5#3 integrate
.. //depot/projects/gdb/sys/alpha/alpha/promcons.c#4 integrate
.. //depot/projects/gdb/sys/alpha/linux/linux_proto.h#5 integrate
.. //depot/projects/gdb/sys/alpha/linux/linux_syscall.h#5 integrate
.. //depot/projects/gdb/sys/alpha/linux/linux_sysent.c#5 integrate
.. //depot/projects/gdb/sys/alpha/linux/syscalls.master#5 integrate
.. //depot/projects/gdb/sys/alpha/tlsb/zs_tlsb.c#6 integrate
.. //depot/projects/gdb/sys/amd64/amd64/fpu.c#4 integrate
.. //depot/projects/gdb/sys/compat/ndis/kern_ndis.c#14 integrate
.. //depot/projects/gdb/sys/compat/ndis/subr_ndis.c#11 integrate
.. //depot/projects/gdb/sys/compat/pecoff/imgact_pecoff.c#2 integrate
.. //depot/projects/gdb/sys/dev/acpica/acpi_cpu.c#8 integrate
.. //depot/projects/gdb/sys/dev/ciss/cissreg.h#6 integrate
.. //depot/projects/gdb/sys/dev/cx/if_cx.c#6 integrate
.. //depot/projects/gdb/sys/dev/cy/cy.c#5 integrate
.. //depot/projects/gdb/sys/dev/dcons/dcons.c#8 integrate
.. //depot/projects/gdb/sys/dev/digi/digi.c#5 integrate
.. //depot/projects/gdb/sys/dev/em/if_em.c#7 integrate
.. //depot/projects/gdb/sys/dev/if_ndis/if_ndis.c#18 integrate
.. //depot/projects/gdb/sys/dev/if_ndis/if_ndisvar.h#5 integrate
.. //depot/projects/gdb/sys/dev/nmdm/nmdm.c#7 integrate
.. //depot/projects/gdb/sys/dev/ofw/ofw_console.c#5 integrate
.. //depot/projects/gdb/sys/dev/rc/rc.c#6 integrate
.. //depot/projects/gdb/sys/dev/rp/rp.c#4 integrate
.. //depot/projects/gdb/sys/dev/sab/sab.c#7 integrate
.. //depot/projects/gdb/sys/dev/si/si.c#4 integrate
.. //depot/projects/gdb/sys/dev/sio/sio.c#12 integrate
.. //depot/projects/gdb/sys/dev/sound/pci/emu10k1.c#5 integrate
.. //depot/projects/gdb/sys/dev/sx/sx.c#3 integrate
.. //depot/projects/gdb/sys/dev/syscons/syscons.c#9 integrate
.. //depot/projects/gdb/sys/dev/syscons/sysmouse.c#4 integrate
.. //depot/projects/gdb/sys/dev/uart/uart_tty.c#4 integrate
.. //depot/projects/gdb/sys/dev/usb/ubser.c#4 integrate
.. //depot/projects/gdb/sys/dev/usb/ucom.c#5 integrate
.. //depot/projects/gdb/sys/dev/usb/umass.c#5 integrate
.. //depot/projects/gdb/sys/dev/usb/usbdevs#11 integrate
.. //depot/projects/gdb/sys/dev/usb/usbdevs.h#11 integrate
.. //depot/projects/gdb/sys/dev/usb/usbdevs_data.h#11 integrate
.. //depot/projects/gdb/sys/dev/zs/zs.c#6 integrate
.. //depot/projects/gdb/sys/i386/isa/pcvt/pcvt_drv.c#5 integrate
.. //depot/projects/gdb/sys/i386/isa/pcvt/pcvt_ext.c#3 integrate
.. //depot/projects/gdb/sys/i386/isa/pcvt/pcvt_hdr.h#5 integrate
.. //depot/projects/gdb/sys/i386/isa/pcvt/pcvt_sup.c#2 integrate
.. //depot/projects/gdb/sys/i386/isa/pcvt/pcvt_vtf.c#2 integrate
.. //depot/projects/gdb/sys/i386/linux/linux_sysvec.c#2 integrate
.. //depot/projects/gdb/sys/ia64/ia64/ssc.c#4 integrate
.. //depot/projects/gdb/sys/kern/imgact_aout.c#3 integrate
.. //depot/projects/gdb/sys/kern/imgact_elf.c#9 integrate
.. //depot/projects/gdb/sys/kern/subr_bus.c#8 integrate
.. //depot/projects/gdb/sys/kern/tty.c#6 integrate
.. //depot/projects/gdb/sys/kern/tty_pty.c#6 integrate
.. //depot/projects/gdb/sys/kern/uipc_socket2.c#8 integrate
.. //depot/projects/gdb/sys/kern/uipc_usrreq.c#6 integrate
.. //depot/projects/gdb/sys/kern/vfs_syscalls.c#10 integrate
.. //depot/projects/gdb/sys/kern/vfs_vnops.c#7 integrate
.. //depot/projects/gdb/sys/pc98/pc98/scgdcrndr.c#2 integrate
.. //depot/projects/gdb/sys/pc98/pc98/scterm-sck.c#2 integrate
.. //depot/projects/gdb/sys/pc98/pc98/sio.c#10 integrate
.. //depot/projects/gdb/sys/sparc64/pci/psycho.c#5 integrate
.. //depot/projects/gdb/sys/sparc64/sbus/sbus.c#4 integrate
.. //depot/projects/gdb/sys/sparc64/sparc64/eeprom_ebus.c#4 integrate
.. //depot/projects/gdb/sys/sparc64/sparc64/eeprom_fhc.c#4 integrate
.. //depot/projects/gdb/sys/sparc64/sparc64/eeprom_sbus.c#4 integrate
.. //depot/projects/gdb/sys/sparc64/sparc64/nexus.c#4 integrate
.. //depot/projects/gdb/sys/sys/bus.h#4 integrate
.. //depot/projects/gdb/sys/sys/conf.h#6 integrate
.. //depot/projects/gdb/sys/sys/linedisc.h#1 branch
.. //depot/projects/gdb/sys/sys/param.h#12 integrate
.. //depot/projects/gdb/sys/sys/socketvar.h#5 integrate
.. //depot/projects/gdb/sys/sys/tty.h#4 integrate
.. //depot/projects/gdb/sys/sys/vnode.h#5 integrate
.. //depot/projects/gdb/usr.bin/calendar/Makefile#2 integrate
.. //depot/projects/gdb/usr.sbin/acpi/acpiconf/acpiconf.8#3 integrate
.. //depot/projects/gdb/usr.sbin/acpi/acpidump/acpidump.8#2 integrate
.. //depot/projects/gdb/usr.sbin/adduser/adduser.8#4 integrate
.. //depot/projects/gdb/usr.sbin/bluetooth/bcmfw/bcmfw.8#2 integrate
.. //depot/projects/gdb/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8#3 integrate
.. //depot/projects/gdb/usr.sbin/boot0cfg/boot0cfg.8#2 integrate
.. //depot/projects/gdb/usr.sbin/cron/crontab/crontab.1#3 integrate
.. //depot/projects/gdb/usr.sbin/cron/crontab/crontab.5#2 integrate
.. //depot/projects/gdb/usr.sbin/faithd/faithd.8#2 integrate
.. //depot/projects/gdb/usr.sbin/fdcontrol/fdcontrol.8#3 integrate
.. //depot/projects/gdb/usr.sbin/fwcontrol/fwcontrol.8#2 integrate
.. //depot/projects/gdb/usr.sbin/gstat/gstat.8#3 integrate
.. //depot/projects/gdb/usr.sbin/gstat/gstat.c#6 integrate
.. //depot/projects/gdb/usr.sbin/mountd/mountd.8#3 integrate
.. //depot/projects/gdb/usr.sbin/mtree/mtree.8#2 integrate
.. //depot/projects/gdb/usr.sbin/mtree/mtree.c#2 integrate
.. //depot/projects/gdb/usr.sbin/ndp/ndp.8#2 integrate
.. //depot/projects/gdb/usr.sbin/wicontrol/wicontrol.8#2 integrate
Differences ...
==== //depot/projects/gdb/UPDATING#13 (text+ko) ====
@@ -17,6 +17,11 @@
developers choose to disable these features on build machines
to maximize performance.
+20040601:
+ The MIDI drivers have been removed. Until the new module-friendly
+ ones are merged, remove or comment out midi and seq from your
+ kernel configuration.
+
20040423:
Due to a new option in ipfw (versrcreach) the ipfw(8) command
needs to be recompiled. Normal accept/reject rules without
@@ -1602,4 +1607,4 @@
Contact Warner Losh if you have any questions about your use of
this document.
-$FreeBSD: src/UPDATING,v 1.307 2004/04/23 14:33:30 andre Exp $
+$FreeBSD: src/UPDATING,v 1.308 2004/06/04 15:24:12 tanimura Exp $
==== //depot/projects/gdb/bin/cp/utils.c#3 (text+ko) ====
@@ -33,7 +33,7 @@
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/cp/utils.c,v 1.43 2004/04/06 20:06:44 markm Exp $");
+__FBSDID("$FreeBSD: src/bin/cp/utils.c,v 1.44 2004/06/05 02:32:21 tjr Exp $");
#include <sys/param.h>
#include <sys/stat.h>
@@ -88,6 +88,7 @@
if (nflag) {
if (vflag)
printf("%s not overwritten\n", to.p_path);
+ (void)close(from_fd);
return (0);
} else if (iflag) {
(void)fprintf(stderr, "overwrite %s? %s",
==== //depot/projects/gdb/bin/df/df.c#9 (text+ko) ====
@@ -44,7 +44,7 @@
#endif /* not lint */
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/df/df.c,v 1.61 2004/05/24 22:21:49 pjd Exp $");
+__FBSDID("$FreeBSD: src/bin/df/df.c,v 1.62 2004/06/04 09:30:51 das Exp $");
#include <sys/param.h>
#include <sys/stat.h>
@@ -81,6 +81,7 @@
static char *makenetvfslist(void);
static void prthuman(const struct statfs *, int64_t);
static void prthumanval(int64_t);
+static intmax_t fsbtoblk(int64_t, uint64_t, u_long);
static void prtstat(struct statfs *, struct maxwidths *);
static size_t regetmntinfo(struct statfs **, long, const char **);
static void update_maxwidths(struct maxwidths *, const struct statfs *);
@@ -345,10 +346,15 @@
* Convert statfs returned file system size into BLOCKSIZE units.
* Attempts to avoid overflow for large file systems.
*/
-#define fsbtoblk(num, fsbs, bs) \
- (((fsbs) != 0 && (fsbs) < (bs)) ? \
- (num) / (intmax_t)((bs) / (fsbs)) : \
- (num) * (intmax_t)((fsbs) / (bs)))
+static intmax_t
+fsbtoblk(int64_t num, uint64_t fsbs, u_long bs)
+{
+
+ if (fsbs != 0 && fsbs < bs)
+ return (num / (intmax_t)(bs / fsbs));
+ else
+ return (num * (intmax_t)(fsbs / bs));
+}
/*
* Print out status about a file system.
@@ -392,11 +398,10 @@
prthuman(sfsp, used);
} else {
(void)printf(" %*jd %*jd %*jd",
- mwp->total, (intmax_t)fsbtoblk(sfsp->f_blocks,
+ mwp->total, fsbtoblk(sfsp->f_blocks,
sfsp->f_bsize, blocksize),
- mwp->used, (intmax_t)fsbtoblk(used, sfsp->f_bsize,
- blocksize),
- mwp->avail, (intmax_t)fsbtoblk(sfsp->f_bavail,
+ mwp->used, fsbtoblk(used, sfsp->f_bsize, blocksize),
+ mwp->avail, fsbtoblk(sfsp->f_bavail,
sfsp->f_bsize, blocksize));
}
(void)printf(" %5.0f%%",
==== //depot/projects/gdb/lib/libarchive/archive_read.c#8 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read.c,v 1.9 2004/06/04 01:36:10 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read.c,v 1.10 2004/06/04 23:25:20 kientzle Exp $");
#include <err.h>
#include <errno.h>
@@ -263,6 +263,8 @@
}
*entryp = entry;
+ a->read_data_output_offset = 0;
+ a->read_data_remaining = 0;
return (ret);
}
@@ -336,6 +338,9 @@
* buffer, filling any gaps with zero bytes. Clients using this
* API can be completely ignorant of sparse-file issues; sparse files
* will simply be padded with nulls.
+ *
+ * DO NOT intermingle calls to this function and archive_read_data_block
+ * to read a single entry body.
*/
ssize_t
archive_read_data(struct archive *a, void *buff, size_t s)
==== //depot/projects/gdb/lib/libarchive/archive_read_extract.c#13 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_extract.c,v 1.14 2004/06/03 23:29:47 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_extract.c,v 1.16 2004/06/05 05:34:45 kientzle Exp $");
#include <sys/stat.h>
#include <sys/types.h>
@@ -423,7 +423,7 @@
}
if (archive_read_extract_dir_create(a, archive_entry_pathname(entry),
- mode, flags)) {
+ writable_mode, flags)) {
/* Unable to create directory; just use the existing dir. */
return (ARCHIVE_WARN);
}
@@ -502,6 +502,18 @@
mkdirpath(a, name);
if (mkdir(name, mode) == 0)
return (ARCHIVE_OK);
+ /*
+ * Yes, people really do type "tar -cf - foo/." for
+ * reasons that I cannot fathom. When they do, the
+ * dir "foo" gets created in mkdirpath() and the
+ * mkdir("foo/.") just above still fails. So, I've
+ * added yet another check here to catch this
+ * particular case.
+ *
+ * There must be a better way ...
+ */
+ if (stat(name, &st) == 0 && S_ISDIR(st.st_mode))
+ return (ARCHIVE_OK);
} else {
/* Stat failed? */
archive_set_error(a, errno, "Can't test directory");
==== //depot/projects/gdb/lib/libarchive/archive_read_support_format_tar.c#13 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.15 2004/06/02 08:14:43 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.17 2004/06/04 23:24:21 kientzle Exp $");
#include <sys/stat.h>
#include <errno.h>
@@ -201,8 +201,19 @@
/* Now let's look at the actual header and see if it matches. */
bytes_read = (a->compression_read_ahead)(a, &h, 512);
- if (bytes_read < 512)
+ if (bytes_read < 0)
+ return (ARCHIVE_FATAL);
+ if (bytes_read == 0 && bid > 0) {
+ /* An archive without a proper end-of-archive marker. */
+ /* Hold our nose and bid 1 anyway. */
+ return (1);
+ }
+ if (bytes_read < 512) {
+ if (bid > 0)
+ archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Truncated tar archive");
return (ARCHIVE_FATAL);
+ }
/* If it's an end-of-archive mark, we can handle it. */
if ((*(const char *)h) == 0 && archive_block_is_null(h))
@@ -325,13 +336,21 @@
/* Read 512-byte header record */
bytes = (a->compression_read_ahead)(a, &h, 512);
if (bytes < 512) {
- /* TODO: Set error values */
- return (-1);
+ /*
+ * If we're here, it's becase the _bid function accepted
+ * this file. So just call a short read end-of-archive
+ * and be done with it.
+ */
+ return (ARCHIVE_EOF);
}
(a->compression_read_consume)(a, 512);
/* Check for end-of-archive mark. */
if (((*(const char *)h)==0) && archive_block_is_null(h)) {
+ /* Try to consume a second all-null record, as well. */
+ bytes = (a->compression_read_ahead)(a, &h, 512);
+ if (bytes > 0)
+ (a->compression_read_consume)(a, bytes);
archive_set_error(a, 0, NULL);
return (ARCHIVE_EOF);
}
@@ -561,30 +580,37 @@
read_body_to_string(struct archive *a, struct tar *tar,
struct archive_string *as, const void *h)
{
+ off_t size, padded_size;
+ ssize_t bytes_read, bytes_to_copy;
const struct archive_entry_header_ustar *header;
- off_t size;
- unsigned oldstate;
- int err, err2;
+ const void *src;
+ char *dest;
+ (void)tar; /* UNUSED */
header = h;
size = tar_atol(header->size, sizeof(header->size));
- /* Temporarily fudge internal state for read_data call. */
- oldstate = a->state;
- a->state = ARCHIVE_STATE_DATA;
-
/* Read the body into the string. */
- tar->entry_bytes_remaining = size;
- tar->entry_padding = 0x1ff & -size;
archive_string_ensure(as, size+1);
- err = archive_read_data_into_buffer(a, as->s, size);
- as->s[size] = 0; /* Null terminate name! */
- err2 = archive_read_data_skip(a); /* Resync for next header. */
-
- /* Restore the state. */
- a->state = oldstate;
-
- return (err_combine(err, err2));
+ padded_size = (size + 511) & ~ 511;
+ dest = as->s;
+ while (padded_size > 0) {
+ bytes_read = (a->compression_read_ahead)(a, &src, padded_size);
+ if (bytes_read < 0)
+ return (ARCHIVE_FATAL);
+ if (bytes_read > padded_size)
+ bytes_read = padded_size;
+ (a->compression_read_consume)(a, bytes_read);
+ bytes_to_copy = bytes_read;
+ if ((off_t)bytes_to_copy > size)
+ bytes_to_copy = (ssize_t)size;
+ memcpy(dest, src, bytes_to_copy);
+ dest += bytes_to_copy;
+ size -= bytes_to_copy;
+ padded_size -= bytes_read;
+ }
+ *dest = '\0';
+ return (ARCHIVE_OK);
}
/*
==== //depot/projects/gdb/lib/libdisk/write_alpha_disk.c#2 (text+ko) ====
@@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libdisk/write_alpha_disk.c,v 1.11 2003/04/04 16:59:39 phk Exp $");
+__FBSDID("$FreeBSD: src/lib/libdisk/write_alpha_disk.c,v 1.12 2004/06/04 11:49:11 brian Exp $");
#include <stdio.h>
#include <stdlib.h>
@@ -51,7 +51,10 @@
}
for (i = 0; i < BBSIZE/512; i++) {
- p = read_block(fd, i + c1->offset, 512);
+ if (!(p = read_block(fd, i + c1->offset, 512))) {
+ close (fd);
+ return (1);
+ }
memcpy(buf + 512 * i, p, 512);
free(p);
}
==== //depot/projects/gdb/lib/libdisk/write_amd64_disk.c#2 (text+ko) ====
@@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libdisk/write_amd64_disk.c,v 1.7 2003/04/04 16:35:13 phk Exp $");
+__FBSDID("$FreeBSD: src/lib/libdisk/write_amd64_disk.c,v 1.8 2004/06/04 11:49:11 brian Exp $");
#include <stdio.h>
#include <stdlib.h>
@@ -35,7 +35,8 @@
u_char buf[BBSIZE];
for (i = 0; i < BBSIZE/512; i++) {
- p = read_block(fd, i + c1->offset, 512);
+ if (!(p = read_block(fd, i + c1->offset, 512)))
+ return (1);
memcpy(buf + 512 * i, p, 512);
free(p);
}
@@ -101,7 +102,10 @@
return 1;
memset(s, 0, sizeof s);
- mbr = read_block(fd, 0, d1->sector_size);
+ if (!(mbr = read_block(fd, 0, d1->sector_size))) {
+ close (fd);
+ return (1);
+ }
dp = (struct dos_partition *)(mbr + DOSPARTOFF);
memcpy(work, dp, sizeof work);
dp = work;
@@ -178,7 +182,10 @@
if (dp[i].dp_typ == 0xa5)
dp[i].dp_flag = 0x80;
- mbr = read_block(fd, 0, d1->sector_size);
+ if (!(mbr = read_block(fd, 0, d1->sector_size))) {
+ close (fd);
+ return (1);
+ }
if (d1->bootmgr) {
memcpy(mbr, d1->bootmgr, DOSPARTOFF);
Cfg_Boot_Mgr(mbr, need_edd);
==== //depot/projects/gdb/lib/libdisk/write_i386_disk.c#3 (text+ko) ====
@@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libdisk/write_i386_disk.c,v 1.8 2004/03/30 01:39:00 kuriyama Exp $");
+__FBSDID("$FreeBSD: src/lib/libdisk/write_i386_disk.c,v 1.9 2004/06/04 11:49:11 brian Exp $");
#include <stdio.h>
#include <stdlib.h>
@@ -35,7 +35,8 @@
u_char buf[BBSIZE];
for (i = 0; i < BBSIZE/512; i++) {
- p = read_block(fd, i + c1->offset, 512);
+ if (!(p = read_block(fd, i + c1->offset, 512)))
+ return (1);
memcpy(buf + 512 * i, p, 512);
free(p);
}
@@ -101,7 +102,10 @@
return 1;
memset(s, 0, sizeof s);
- mbrblk = read_block(fd, 0, d1->sector_size);
+ if (!(mbrblk = read_block(fd, 0, d1->sector_size))) {
+ close (fd);
+ return (1);
+ }
dp = (struct dos_partition *)(mbrblk + DOSPARTOFF);
memcpy(work, dp, sizeof work);
dp = work;
@@ -178,7 +182,10 @@
if (dp[i].dp_typ == 0xa5)
dp[i].dp_flag = 0x80;
- mbrblk = read_block(fd, 0, d1->sector_size);
+ if (!(mbrblk = read_block(fd, 0, d1->sector_size))) {
+ close (fd);
+ return (1);
+ }
if (d1->bootmgr) {
memcpy(mbrblk, d1->bootmgr, DOSPARTOFF);
Cfg_Boot_Mgr(mbrblk, need_edd);
==== //depot/projects/gdb/lib/libdisk/write_pc98_disk.c#3 (text+ko) ====
@@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libdisk/write_pc98_disk.c,v 1.10 2004/03/30 12:22:31 nyan Exp $");
+__FBSDID("$FreeBSD: src/lib/libdisk/write_pc98_disk.c,v 1.11 2004/06/04 11:49:11 brian Exp $");
#include <stdio.h>
#include <stdlib.h>
@@ -37,7 +37,8 @@
u_char buf[BBSIZE];
for (i = 0; i < BBSIZE / 512; i++) {
- p = read_block(fd, i + c1->offset, 512);
+ if (!(p = read_block(fd, i + c1->offset, 512)))
+ return (1);
memcpy(buf + 512 * i, p, 512);
free(p);
}
@@ -87,7 +88,10 @@
}
memset(s, 0, sizeof s);
- mbrblk = read_block(fd, 1, d1->sector_size);
+ if (!(mbrblk = read_block(fd, 1, d1->sector_size))) {
+ close (fd);
+ return (1);
+ }
dp = (struct pc98_partition *)(mbrblk + DOSPARTOFF);
memcpy(work, dp, sizeof work);
dp = work;
@@ -151,7 +155,10 @@
if (d1->bootipl)
write_block(fd, 0, d1->bootipl, d1->sector_size);
- mbrblk = read_block(fd, 1, d1->sector_size);
+ if (!(mbrblk = read_block(fd, 1, d1->sector_size))) {
+ close (fd);
+ return (1);
+ }
memcpy(mbrblk + DOSPARTOFF, dp, sizeof *dp * NDOSPART);
/* XXX - for entire FreeBSD(98) */
for (c1 = d1->chunks->part; c1; c1 = c1->next)
==== //depot/projects/gdb/share/man/man3/Makefile#3 (text+ko) ====
@@ -1,5 +1,5 @@
# @(#)Makefile 8.2 (Berkeley) 12/13/93
-# $FreeBSD: src/share/man/man3/Makefile,v 1.30 2004/02/19 13:51:52 mtm Exp $
+# $FreeBSD: src/share/man/man3/Makefile,v 1.31 2004/06/04 10:14:55 pjd Exp $
MAN= assert.3 \
bitstring.3 \
@@ -38,6 +38,7 @@
queue.3 LIST_ENTRY.3 \
queue.3 LIST_FIRST.3 \
queue.3 LIST_FOREACH.3 \
+ queue.3 LIST_FOREACH_SAFE.3 \
queue.3 LIST_HEAD.3 \
queue.3 LIST_HEAD_INITIALIZER.3 \
queue.3 LIST_INIT.3 \
@@ -50,6 +51,7 @@
queue.3 SLIST_ENTRY.3 \
queue.3 SLIST_FIRST.3 \
queue.3 SLIST_FOREACH.3 \
+ queue.3 SLIST_FOREACH_SAFE.3 \
queue.3 SLIST_HEAD.3 \
queue.3 SLIST_HEAD_INITIALIZER.3 \
queue.3 SLIST_INIT.3 \
@@ -63,6 +65,7 @@
queue.3 STAILQ_ENTRY.3 \
queue.3 STAILQ_FIRST.3 \
queue.3 STAILQ_FOREACH.3 \
+ queue.3 STAILQ_FOREACH_SAFE.3 \
queue.3 STAILQ_HEAD.3 \
queue.3 STAILQ_HEAD_INITIALIZER.3 \
queue.3 STAILQ_INIT.3 \
@@ -79,6 +82,8 @@
queue.3 TAILQ_FIRST.3 \
queue.3 TAILQ_FOREACH.3 \
queue.3 TAILQ_FOREACH_REVERSE.3 \
+ queue.3 TAILQ_FOREACH_REVERSE_SAFE.3 \
+ queue.3 TAILQ_FOREACH_SAFE.3 \
queue.3 TAILQ_HEAD.3 \
queue.3 TAILQ_HEAD_INITIALIZER.3 \
queue.3 TAILQ_INIT.3 \
==== //depot/projects/gdb/share/man/man4/screen.4#2 (text+ko) ====
@@ -1,5 +1,5 @@
.\"
-.\" $FreeBSD: src/share/man/man4/screen.4,v 1.26 2001/10/01 13:47:40 ru Exp $
+.\" $FreeBSD: src/share/man/man4/screen.4,v 1.27 2004/06/04 15:20:12 roam Exp $
.\"
.Dd October 6, 2000
.Dt SCREEN 4
@@ -56,7 +56,7 @@
The console understands a subset of the ANSI x3.64 character
sequences.
For compatibility with the old pccons, the PC3 character
-sequences is also supported.
+sequences are also supported.
.Pp
.Bd -literal
ANSI Seq Function Termcap entry
==== //depot/projects/gdb/share/man/man5/libmap.conf.5#4 (text+ko) ====
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man5/libmap.conf.5,v 1.6 2004/05/24 01:24:13 mdodd Exp $
+.\" $FreeBSD: src/share/man/man5/libmap.conf.5,v 1.7 2004/06/05 02:47:08 ceri Exp $
.\"
.Dd January 31, 2004
.Dt LIBMAP.CONF 5
@@ -55,7 +55,7 @@
.Pa /usr/bin/foo
will not match a constraint for
.Pa /usr/bin/./foo
-and vise-versa.
+and vice-versa.
This is the default constraint type.
.It Basename
A constraint with no path is matched against the basename of the
==== //depot/projects/gdb/share/man/man5/periodic.conf.5#3 (text+ko) ====
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man5/periodic.conf.5,v 1.48 2004/05/30 20:32:00 brian Exp $
+.\" $FreeBSD: src/share/man/man5/periodic.conf.5,v 1.49 2004/06/05 03:01:20 ceri Exp $
.\"
.Dd June 22, 2000
.Dt PERIODIC.CONF 5
@@ -456,7 +456,7 @@
.Dq YES
if you want to ignore
.Xr amd 8
-mounts when comparing against yesterdays file system mounts in the
+mounts when comparing against yesterday's file system mounts in the
.Va daily_status_security_chkmounts_enable
check.
.It Va daily_status_security_chkuid0_enable
@@ -672,7 +672,7 @@
.Va pkg_version
variable is set to
.Dq portversion ,
-it will also be neccessary to arrange that the correct INDEX file is specified
+it will also be necessary to arrange that the correct INDEX file is specified
using environment variables and that
.Dq pkg_version_index
is cleared in
==== //depot/projects/gdb/sys/alpha/alpha/promcons.c#4 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/promcons.c,v 1.37 2004/06/01 13:49:25 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/promcons.c,v 1.38 2004/06/04 16:02:48 phk Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -124,7 +124,7 @@
splx(s);
- error = (*linesw[tp->t_line].l_open)(dev, tp);
+ error = ttyld_open(tp, dev);
if (error == 0 && setuptimeout) {
polltime = hz / PROM_POLL_HZ;
@@ -148,7 +148,7 @@
return ENXIO;
untimeout(promtimeout, tp, promtimeouthandle);
- (*linesw[tp->t_line].l_close)(tp, flag);
+ ttyld_close(tp, flag);
ttyclose(tp);
return 0;
}
@@ -211,7 +211,7 @@
while ((c = promcncheckc(NULL)) != -1) {
if (tp->t_state & TS_ISOPEN)
- (*linesw[tp->t_line].l_rint)(c, tp);
+ ttyld_rint(tp, c);
}
promtimeouthandle = timeout(promtimeout, tp, polltime);
}
==== //depot/projects/gdb/sys/alpha/linux/linux_proto.h#5 (text+ko) ====
@@ -2,8 +2,8 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/alpha/linux/linux_proto.h,v 1.17 2004/03/29 02:19:43 bms Exp $
- * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.56 2004/03/15 22:43:48 jhb Exp
+ * $FreeBSD: src/sys/alpha/linux/linux_proto.h,v 1.18 2004/06/04 13:52:51 jhb Exp $
+ * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.58 2004/06/04 13:52:23 jhb Exp
*/
#ifndef _LINUX_SYSPROTO_H_
==== //depot/projects/gdb/sys/alpha/linux/linux_syscall.h#5 (text+ko) ====
@@ -2,8 +2,8 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/alpha/linux/linux_syscall.h,v 1.15 2004/03/29 02:19:43 bms Exp $
- * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.56 2004/03/15 22:43:48 jhb Exp
+ * $FreeBSD: src/sys/alpha/linux/linux_syscall.h,v 1.16 2004/06/04 13:52:51 jhb Exp $
+ * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.58 2004/06/04 13:52:23 jhb Exp
*/
#define LINUX_SYS_exit 1
==== //depot/projects/gdb/sys/alpha/linux/linux_sysent.c#5 (text+ko) ====
@@ -2,8 +2,8 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/alpha/linux/linux_sysent.c,v 1.15 2004/03/29 02:19:43 bms Exp $
- * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.56 2004/03/15 22:43:48 jhb Exp
+ * $FreeBSD: src/sys/alpha/linux/linux_sysent.c,v 1.16 2004/06/04 13:52:51 jhb Exp $
+ * created from FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.58 2004/06/04 13:52:23 jhb Exp
*/
#include "opt_compat.h"
@@ -382,7 +382,7 @@
{ SYF_MPSAFE | AS(linux_setitimer_args), (sy_call_t *)linux_setitimer }, /* 362 = linux_setitimer */
{ AS(linux_utimes_args), (sy_call_t *)linux_utimes }, /* 363 = linux_utimes */
{ SYF_MPSAFE | AS(getrusage_args), (sy_call_t *)getrusage }, /* 364 = getrusage */
- { AS(linux_wait4_args), (sy_call_t *)linux_wait4 }, /* 365 = linux_wait4 */
+ { SYF_MPSAFE | AS(linux_wait4_args), (sy_call_t *)linux_wait4 }, /* 365 = linux_wait4 */
{ 0, (sy_call_t *)linux_adjtimex }, /* 366 = linux_adjtimex */
{ AS(linux_getcwd_args), (sy_call_t *)linux_getcwd }, /* 367 = linux_getcwd */
{ 0, (sy_call_t *)linux_capget }, /* 368 = linux_capget */
==== //depot/projects/gdb/sys/alpha/linux/syscalls.master#5 (text+ko) ====
@@ -1,4 +1,4 @@
- $FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.57 2004/03/29 02:19:43 bms Exp $
+ $FreeBSD: src/sys/alpha/linux/syscalls.master,v 1.58 2004/06/04 13:52:23 jhb Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
; System call name/number master file (or rather, slave, from LINUX).
@@ -445,7 +445,7 @@
struct l_itimerval *oitv); }
363 STD { int linux_utimes(char *fname, struct l_timeval *times); }
364 MNOPROTO { int getrusage(int who, struct rusage *rusage); }
-365 STD { int linux_wait4(l_pid_t pid, l_uint *status, l_int options, \
+365 MSTD { int linux_wait4(l_pid_t pid, l_uint *status, l_int options, \
struct l_rusage *rusage); }
366 STD { int linux_adjtimex(void); }
367 STD { int linux_getcwd(char *buf, l_ulong bufsize); }
==== //depot/projects/gdb/sys/alpha/tlsb/zs_tlsb.c#6 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/tlsb/zs_tlsb.c,v 1.43 2004/06/01 13:49:26 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/tlsb/zs_tlsb.c,v 1.44 2004/06/04 16:02:48 phk Exp $");
#include "opt_ddb.h"
@@ -292,7 +292,7 @@
splx(s);
- error = (*linesw[tp->t_line].l_open)(dev, tp);
+ error = ttyld_open(tp, dev);
if (error == 0 && setuptimeout) {
zspolltime = hz / 50;
@@ -319,7 +319,7 @@
s = spltty();
untimeout(zs_poll_intr, sc, sc->zst);
- (*linesw[tp->t_line].l_close)(tp, flag);
+ ttyld_close(tp, flag);
ttyclose(tp);
splx(s);
@@ -503,7 +503,7 @@
kdb_enter("manual escape to debugger");
#endif
if (tp && (tp->t_state & TS_ISOPEN))
- (*linesw[tp->t_line].l_rint)(c, tp);
+ ttyld_rint(tp, c);
DELAY(5);
}
}
@@ -518,7 +518,7 @@
kdb_enter("manual escape to debugger");
#endif
if (tp && (tp->t_state & TS_ISOPEN))
- (*linesw[tp->t_line].l_rint)(c, tp);
+ ttyld_rint(tp, c);
DELAY(5);
}
}
==== //depot/projects/gdb/sys/amd64/amd64/fpu.c#4 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/fpu.c,v 1.149 2004/04/05 21:25:51 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/fpu.c,v 1.150 2004/06/05 03:13:39 das Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -73,6 +73,7 @@
#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=m" (*(addr)))
#define fxrstor(addr) __asm("fxrstor %0" : : "m" (*(addr)))
#define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr)))
+#define ldmxcsr(r) __asm __volatile("ldmxcsr %0" : : "m" (r))
#define start_emulating() __asm("smsw %%ax; orb %0,%%al; lmsw %%ax" \
: : "n" (CR0_TS) : "ax")
#define stop_emulating() __asm("clts")
@@ -111,6 +112,7 @@
fpuinit(void)
{
register_t savecrit;
+ u_int mxcsr;
u_short control;
savecrit = intr_disable();
@@ -119,6 +121,8 @@
fninit();
control = __INITIAL_FPUCW__;
fldcw(&control);
+ mxcsr = __INITIAL_MXCSR__;
+ ldmxcsr(mxcsr);
fxsave(&fpu_cleanstate);
start_emulating();
fpu_cleanstate_ready = 1;
==== //depot/projects/gdb/sys/compat/ndis/kern_ndis.c#14 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.54 2004/06/01 23:24:17 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.55 2004/06/04 22:24:46 des Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -611,6 +611,7 @@
TAILQ_INIT(&sc->ndis_cfglist_head);
+#if __FreeBSD_version < 502113
/* Create the sysctl tree. */
sc->ndis_tree = SYSCTL_ADD_NODE(&sc->ndis_ctx,
@@ -618,6 +619,7 @@
device_get_nameunit(sc->ndis_dev), CTLFLAG_RD, 0,
device_get_desc(sc->ndis_dev));
+#endif
/* Add the driver-specific registry keys. */
vals = sc->ndis_regvals;
@@ -628,8 +630,13 @@
vals++;
continue;
}
+#if __FreeBSD_version < 502113
SYSCTL_ADD_STRING(&sc->ndis_ctx,
SYSCTL_CHILDREN(sc->ndis_tree),
+#else
+ SYSCTL_ADD_STRING(device_get_sysctl_ctx(sc->ndis_dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(sc->ndis_dev)),
+#endif
OID_AUTO, vals->nc_cfgkey,
CTLFLAG_RW, vals->nc_val,
sizeof(vals->nc_val),
@@ -698,7 +705,12 @@
TAILQ_INSERT_TAIL(&sc->ndis_cfglist_head, cfg, link);
+#if __FreeBSD_version < 502113
SYSCTL_ADD_STRING(&sc->ndis_ctx, SYSCTL_CHILDREN(sc->ndis_tree),
+#else
+ SYSCTL_ADD_STRING(device_get_sysctl_ctx(sc->ndis_dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(sc->ndis_dev)),
+#endif
OID_AUTO, cfg->ndis_cfg.nc_cfgkey, flag,
cfg->ndis_cfg.nc_val, sizeof(cfg->ndis_cfg.nc_val),
cfg->ndis_cfg.nc_cfgdesc);
==== //depot/projects/gdb/sys/compat/ndis/subr_ndis.c#11 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.58 2004/05/29 22:34:08 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.60 2004/06/04 22:24:46 des Exp $");
/*
* This file implements a translation layer between the BSD networking
@@ -130,7 +130,7 @@
struct sysctl_oid *, ndis_parm_type, ndis_config_parm **);
static ndis_status ndis_decode_parm(ndis_miniport_block *,
ndis_config_parm *, char *);
-static int my_strcasecmp(const char *, const char *, int);
+static int my_strcasecmp(const char *, const char *);
__stdcall static void ndis_read_cfg(ndis_status *, ndis_config_parm **,
ndis_handle, ndis_unicode_string *, ndis_parm_type);
__stdcall static void ndis_write_cfg(ndis_status *, ndis_handle,
@@ -557,19 +557,27 @@
}
static int
-my_strcasecmp(s1, s2, len)
+my_strcasecmp(s1, s2)
const char *s1;
const char *s2;
- int len;
{
- int i;
+ char a, b;
+
+ /*
+ * In the kernel, toupper() is a macro. Have to be careful
+ * not to use pointer arithmetic when passing it arguments.
+ */
- for (i = 0; i < len; i++) {
- if (toupper(s1[i]) != toupper(s2[i]))
- return(1);
- }
+ while(1) {
+ a = *s1;
+ b = *s2++;
+ if (toupper(a) != toupper(b))
+ break;
+ if (*s1++ == 0)
+ return(0);
+ }
- return(0);
+ return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1));
}
__stdcall static void
@@ -605,10 +613,13 @@
* See if registry key is already in a list of known keys
* included with the driver.
*/
+#if __FreeBSD_version < 502113
TAILQ_FOREACH(e, &sc->ndis_ctx, link) {
+#else
+ TAILQ_FOREACH(e, device_get_sysctl_ctx(sc->ndis_dev), link) {
+#endif
oidp = e->entry;
- if (my_strcasecmp(oidp->oid_name,
- keystr, strlen(keystr)) == 0) {
+ if (my_strcasecmp(oidp->oid_name, keystr) == 0) {
if (strcmp((char *)oidp->oid_arg1, "UNSET") == 0) {
free(keystr, M_DEVBUF);
*status = NDIS_STATUS_FAILURE;
@@ -702,10 +713,13 @@
/* See if the key already exists. */
+#if __FreeBSD_version < 502113
TAILQ_FOREACH(e, &sc->ndis_ctx, link) {
+#else
+ TAILQ_FOREACH(e, device_get_sysctl_ctx(sc->ndis_dev), link) {
+#endif
oidp = e->entry;
- if (my_strcasecmp(oidp->oid_name,
- keystr, strlen(keystr)) == 0) {
+ if (my_strcasecmp(oidp->oid_name, keystr) == 0) {
/* Found it, set the value. */
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list