PERFORCE change 221638 for review
Brooks Davis
brooks at FreeBSD.org
Thu Jan 31 16:28:52 UTC 2013
http://p4web.freebsd.org/@@221638?ac=10
Change 221638 by brooks at brooks_zenith on 2013/01/31 16:28:10
IFC @ 221637 (fix missing suid bits in METALOG)
Affected files ...
.. //depot/projects/ctsrd/beribsd/src/contrib/ipfilter/ipsend/44arp.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/libexec/bootpd/rtmsg.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-io.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-options.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-utils.h#3 integrate
.. //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftpd.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sbin/devd/devd.cc#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sbin/devd/devd.hh#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sbin/route/route.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/share/mk/bsd.own.mk#7 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/boot/uboot/common/metadata.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/Makefile#1 branch
.. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/Makefile.test#1 branch
.. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/bsd_busspace.c#1 branch
.. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/bsd_global.h#1 branch
.. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/bsd_kernel.c#1 branch
.. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/bsd_kernel.h#1 branch
.. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/bsd_usbloader_test.c#1 branch
.. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/tools/sysinit.c#1 branch
.. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/tools/sysinit.h#1 branch
.. //depot/projects/ctsrd/beribsd/src/sys/boot/usb/usb_busdma_loader.c#1 branch
.. //depot/projects/ctsrd/beribsd/src/sys/cam/scsi/scsi_all.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_asus_wmi.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_fujitsu.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_hp.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_ibm.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_panasonic.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_sony.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_toshiba.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_acad.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_button.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_cmbat.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_dock.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_ec.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_hpet.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_lid.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_pci.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_pci_link.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_pcib_pci.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_perf.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_resource.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_smbat.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_thermal.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_throttle.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_timer.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/adlink/adlink.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/amdsbwd/amdsbwd.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/amdtemp/amdtemp.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/ath/if_ath_rx.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/auxio/auxio.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/ce/if_ce.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/cfi/cfi_bus_fdt.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/cfi/cfi_bus_ixp4xx.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/coretemp/coretemp.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/cp/if_cp.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/cpufreq/ichss.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/ctau/if_ct.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/cx/if_cx.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/digi/digi_isa.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/digi/digi_pci.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/e1000/if_em.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/e1000/if_igb.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/e1000/if_lem.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/ep/if_ep_eisa.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/ep/if_ep_isa.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/ep/if_ep_mca.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/ep/if_ep_pccard.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/fdc/fdc_acpi.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/iicbus/ad7418.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/iicbus/ds133x.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/iicbus/ds1672.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/iicbus/icee.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/ixgb/if_ixgb.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/ixgbe/ixgbe.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/ixgbe/ixv.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/mfi/mfi_cam.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/mn/if_mn.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/mxge/if_mxge.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/my/if_my.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/nvram2env/nvram2env.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/nxge/if_nxge.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/oce/oce_if.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/sdhci/sdhci_pci.c#2 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/sound/pci/emu10kx-midi.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/sound/pci/emu10kx-pcm.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/sound/pci/emu10kx.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/sound/sbus/cs4231.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/sound/usb/uaudio_pcm.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/usb_controller.c#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/input/uhid.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/input/ukbd.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/input/ums.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/misc/udbp.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/misc/ufm.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/net/if_cdce.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/net/if_cue.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/net/if_ipheth.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/net/if_kue.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/net/if_smsc.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/storage/umass.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/storage/urio.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/storage/ustorage_fs.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/usb_compat_linux.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/vx/if_vx_eisa.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/vx/if_vx_pci.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/vxge/vxge.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/dev/xen/console/console.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/net/if_llatbl.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/net/if_llatbl.h#6 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/netinet/if_ether.h#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/netinet/in.c#5 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/netinet/libalias/alias.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/sys/netinet/libalias/libalias.3#4 integrate
.. //depot/projects/ctsrd/beribsd/src/usr.bin/xinstall/xinstall.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/usr.sbin/arp/arp.8#3 integrate
.. //depot/projects/ctsrd/beribsd/src/usr.sbin/arp/arp.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/usr.sbin/ndp/ndp.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/usr.sbin/ppp/arp.c#3 integrate
.. //depot/projects/ctsrd/beribsd/src/usr.sbin/rarpd/rarpd.c#4 integrate
.. //depot/projects/ctsrd/beribsd/src/usr.sbin/tcpdrop/tcpdrop.8#3 integrate
.. //depot/projects/ctsrd/beribsd/src/usr.sbin/tcpdrop/tcpdrop.c#3 integrate
Differences ...
==== //depot/projects/ctsrd/beribsd/src/contrib/ipfilter/ipsend/44arp.c#3 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: head/contrib/ipfilter/ipsend/44arp.c 186119 2008-12-15 06:10:57Z qingli $ */
+/* $FreeBSD: head/contrib/ipfilter/ipsend/44arp.c 246143 2013-01-31 08:55:21Z glebius $ */
/*
* Based upon 4.4BSD's /usr/sbin/arp
@@ -72,7 +72,7 @@
size_t needed;
char *lim, *buf, *next;
struct rt_msghdr *rtm;
- struct sockaddr_inarp *sin;
+ struct sockaddr_in *sin;
struct sockaddr_dl *sdl;
#ifdef IPSEND
@@ -113,7 +113,7 @@
for (next = buf; next < lim; next += rtm->rtm_msglen)
{
rtm = (struct rt_msghdr *)next;
- sin = (struct sockaddr_inarp *)(rtm + 1);
+ sin = (struct sockaddr_in *)(rtm + 1);
sdl = (struct sockaddr_dl *)(sin + 1);
if (!bcmp(addr, (char *)&sin->sin_addr,
sizeof(struct in_addr)))
==== //depot/projects/ctsrd/beribsd/src/libexec/bootpd/rtmsg.c#3 (text+ko) ====
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/libexec/bootpd/rtmsg.c 216226 2010-12-06 09:39:36Z glebius $");
+__FBSDID("$FreeBSD: head/libexec/bootpd/rtmsg.c 246143 2013-01-31 08:55:21Z glebius $");
#include <sys/param.h>
/*
@@ -106,9 +106,9 @@
}
static struct sockaddr_in so_mask = {8, 0, 0, { 0xffffffff}};
-static struct sockaddr_inarp blank_sin = {sizeof(blank_sin), AF_INET }, sin_m;
+static struct sockaddr_in blank_sin = {sizeof(blank_sin), AF_INET }, sin_m;
static struct sockaddr_dl blank_sdl = {sizeof(blank_sdl), AF_LINK }, sdl_m;
-static int expire_time, flags, export_only, doing_proxy;
+static int expire_time, flags, doing_proxy;
static struct {
struct rt_msghdr m_rtm;
char m_space[512];
@@ -122,7 +122,7 @@
char *eaddr;
int len;
{
- register struct sockaddr_inarp *sin = &sin_m;
+ register struct sockaddr_in *sin = &sin_m;
register struct sockaddr_dl *sdl;
register struct rt_msghdr *rtm = &(m_rtmsg.m_rtm);
u_char *ea;
@@ -137,7 +137,7 @@
ea = (u_char *)LLADDR(&sdl_m);
bcopy(eaddr, ea, len);
sdl_m.sdl_alen = len;
- doing_proxy = flags = export_only = expire_time = 0;
+ doing_proxy = flags = expire_time = 0;
/* make arp entry temporary */
clock_gettime(CLOCK_MONOTONIC, &tp);
@@ -148,7 +148,7 @@
report(LOG_WARNING, "rtmget: %s", strerror(errno));
return (1);
}
- sin = (struct sockaddr_inarp *)(rtm + 1);
+ sin = (struct sockaddr_in *)(rtm + 1);
sdl = (struct sockaddr_dl *)(sin->sin_len + (char *)sin);
if (sin->sin_addr.s_addr == sin_m.sin_addr.s_addr) {
if (sdl->sdl_family == AF_LINK &&
@@ -163,13 +163,6 @@
inet_ntoa(sin->sin_addr));
return (1);
}
- if (sin_m.sin_other & SIN_PROXY) {
- report(LOG_WARNING,
- "set: proxy entry exists for non 802 device\n");
- return(1);
- }
- sin_m.sin_other = SIN_PROXY;
- export_only = 1;
goto tryagain;
}
overwrite:
@@ -209,14 +202,9 @@
rtm->rtm_rmx.rmx_expire = expire_time;
rtm->rtm_inits = RTV_EXPIRE;
rtm->rtm_flags |= (RTF_HOST | RTF_STATIC | RTF_LLDATA);
- sin_m.sin_other = 0;
if (doing_proxy) {
- if (export_only)
- sin_m.sin_other = SIN_PROXY;
- else {
- rtm->rtm_addrs |= RTA_NETMASK;
- rtm->rtm_flags &= ~RTF_HOST;
- }
+ rtm->rtm_addrs |= RTA_NETMASK;
+ rtm->rtm_flags &= ~RTF_HOST;
}
/* FALLTHROUGH */
case RTM_GET:
==== //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-io.c#5 (text+ko) ====
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-io.c 246106 2013-01-30 01:36:04Z sbruno $");
+__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-io.c 246139 2013-01-31 00:02:36Z marius $");
#include <sys/stat.h>
#include <sys/types.h>
@@ -106,13 +106,13 @@
for (i = 0; i < 12 ; i++) {
DROPPACKETn("send_packet", 0);
- if (sendto(peer, pkt, size, 0,
- (struct sockaddr *)&peer_sock, peer_sock.ss_len)
- == size) {
+ if (sendto(peer, pkt, size, 0, (struct sockaddr *)&peer_sock,
+ peer_sock.ss_len) == size) {
if (i)
tftp_log(LOG_ERR,
"%s block %d, attempt %d successful",
- block, i);
+ packettype(ntohs(((struct tftphdr *)
+ (pkt))->th_opcode)), block, i);
return (0);
}
tftp_log(LOG_ERR,
==== //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-options.c#3 (text+ko) ====
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-options.c 213099 2010-09-24 10:40:17Z marius $");
+__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-options.c 246139 2013-01-31 00:02:36Z marius $");
#include <sys/socket.h>
#include <sys/types.h>
@@ -99,16 +99,17 @@
int
option_timeout(int peer)
{
+ int to;
if (options[OPT_TIMEOUT].o_request == NULL)
return (0);
- int to = atoi(options[OPT_TIMEOUT].o_request);
+ to = atoi(options[OPT_TIMEOUT].o_request);
if (to < TIMEOUT_MIN || to > TIMEOUT_MAX) {
tftp_log(acting_as_client ? LOG_ERR : LOG_WARNING,
"Received bad value for timeout. "
- "Should be between %d and %d, received %s",
- TIMEOUT_MIN, TIMEOUT_MAX);
+ "Should be between %d and %d, received %d",
+ TIMEOUT_MIN, TIMEOUT_MAX, to);
send_error(peer, EBADOP);
if (acting_as_client)
return (1);
@@ -195,14 +196,14 @@
tftp_log(LOG_ERR,
"Invalid blocksize (%d bytes), "
"net.inet.udp.maxdgram sysctl limits it to "
- "%d bytes.\n", size, maxdgram);
+ "%ld bytes.\n", size, maxdgram);
send_error(peer, EBADOP);
return (1);
} else {
tftp_log(LOG_WARNING,
"Invalid blocksize (%d bytes), "
"net.inet.udp.maxdgram sysctl limits it to "
- "%d bytes.\n", size, maxdgram);
+ "%ld bytes.\n", size, maxdgram);
size = maxdgram;
/* No reason to return */
}
@@ -257,7 +258,7 @@
}
tftp_log(LOG_INFO,
"Invalid blocksize2 (%d bytes), net.inet.udp.maxdgram "
- "sysctl limits it to %d bytes.\n", size, maxdgram);
+ "sysctl limits it to %ld bytes.\n", size, maxdgram);
size = sizes[i];
/* No need to return */
}
==== //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftp-utils.h#3 (text+ko) ====
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-utils.h 229780 2012-01-07 16:09:54Z uqs $");
+__FBSDID("$FreeBSD: head/libexec/tftpd/tftp-utils.h 246139 2013-01-31 00:02:36Z marius $");
/*
*/
@@ -106,7 +106,7 @@
extern int tftp_logtostdout;
void tftp_openlog(const char *ident, int logopt, int facility);
void tftp_closelog(void);
-void tftp_log(int priority, const char *message, ...);
+void tftp_log(int priority, const char *message, ...) __printflike(2, 3);
/*
* Performance figures
==== //depot/projects/ctsrd/beribsd/src/libexec/tftpd/tftpd.c#3 (text+ko) ====
@@ -43,7 +43,7 @@
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/libexec/tftpd/tftpd.c 241848 2012-10-22 03:07:05Z eadler $");
+__FBSDID("$FreeBSD: head/libexec/tftpd/tftpd.c 246139 2013-01-31 00:02:36Z marius $");
/*
* Trivial file transfer protocol server.
@@ -65,6 +65,7 @@
#include <fcntl.h>
#include <netdb.h>
#include <pwd.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -799,8 +800,8 @@
tftp_send(peer, &block, &ts);
read_close();
if (debug&DEBUG_SIMPLE)
- tftp_log(LOG_INFO, "Sent %d bytes in %d seconds",
- ts.amount, time(NULL) - now);
+ tftp_log(LOG_INFO, "Sent %jd bytes in %jd seconds",
+ (intmax_t)ts.amount, (intmax_t)time(NULL) - now);
}
static void
@@ -832,8 +833,8 @@
f = now2.tv_sec - now1.tv_sec +
(now2.tv_usec - now1.tv_usec) / 100000.0;
tftp_log(LOG_INFO,
- "Download of %d bytes in %d blocks completed after %0.1f seconds\n",
- ts.amount, block, f);
+ "Download of %jd bytes in %d blocks completed after %0.1f seconds\n",
+ (intmax_t)ts.amount, block, f);
}
return;
==== //depot/projects/ctsrd/beribsd/src/sbin/devd/devd.cc#6 (text+ko) ====
@@ -63,7 +63,7 @@
// - devd.conf needs more details on the supported statements.
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sbin/devd/devd.cc 246121 2013-01-30 15:21:18Z ian $");
+__FBSDID("$FreeBSD: head/sbin/devd/devd.cc 246134 2013-01-30 23:37:35Z ian $");
#include <sys/param.h>
#include <sys/socket.h>
@@ -137,7 +137,7 @@
event_proc::event_proc() : _prio(-1)
{
- // nothing
+ _epsvec.reserve(4);
}
event_proc::~event_proc()
@@ -241,25 +241,18 @@
bool
action::do_action(config &c)
{
- string s = c.expand_string(_cmd);
+ string s = c.expand_string(_cmd.c_str());
if (Dflag)
fprintf(stderr, "Executing '%s'\n", s.c_str());
my_system(s.c_str());
return (true);
}
-match::match(config &c, const char *var, const char *re)
- : _var(var), _re("^")
+match::match(config &c, const char *var, const char *re) :
+ _inv(re[0] == '!'),
+ _var(var),
+ _re(c.expand_string(_inv ? re + 1 : re, "^", "$"))
{
- if (!c.expand_string(string(re)).empty() &&
- c.expand_string(string(re)).at(0) == '!') {
- _re.append(c.expand_string(string(re)).substr(1));
- _inv = 1;
- } else {
- _re.append(c.expand_string(string(re)));
- _inv = 0;
- }
- _re.append("$");
regcomp(&_regex, _re.c_str(), REG_EXTENDED | REG_NOSUB | REG_ICASE);
}
@@ -624,24 +617,37 @@
do {
buffer.append(src++, 1);
} while (is_id_char(*src));
- buffer.append("", 1);
dst.append(get_variable(buffer.c_str()));
}
const string
-config::expand_string(const string &s)
+config::expand_string(const char *src, const char *prepend, const char *append)
{
- const char *src;
+ const char *var_at;
string dst;
- src = s.c_str();
- while (*src) {
- if (*src == '$')
- expand_one(src, dst);
- else
- dst.append(src++, 1);
+ /*
+ * 128 bytes is enough for 2427 of 2438 expansions that happen
+ * while parsing config files, as tested on 2013-01-30.
+ */
+ dst.reserve(128);
+
+ if (prepend != NULL)
+ dst = prepend;
+
+ for (;;) {
+ var_at = strchr(src, '$');
+ if (var_at == NULL) {
+ dst.append(src);
+ break;
+ }
+ dst.append(src, var_at - src);
+ src = var_at;
+ expand_one(src, dst);
}
- dst.append("", 1);
+
+ if (append != NULL)
+ dst.append(append);
return (dst);
}
==== //depot/projects/ctsrd/beribsd/src/sbin/devd/devd.hh#3 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sbin/devd/devd.hh 243932 2012-12-06 01:25:21Z eadler $
+ * $FreeBSD: head/sbin/devd/devd.hh 246134 2013-01-30 23:37:35Z ian $
*/
#ifndef DEVD_HH
@@ -90,9 +90,9 @@
virtual bool do_match(config &);
virtual bool do_action(config &) { return true; }
private:
+ bool _inv;
std::string _var;
std::string _re;
- bool _inv;
regex_t _regex;
};
@@ -162,7 +162,8 @@
void pop_var_table();
void set_variable(const char *var, const char *val);
const std::string &get_variable(const std::string &var);
- const std::string expand_string(const std::string &var);
+ const std::string expand_string(const char * var,
+ const char * prepend = NULL, const char * append = NULL);
char *set_vars(char *);
void find_and_execute(char);
protected:
==== //depot/projects/ctsrd/beribsd/src/sbin/route/route.c#4 (text+ko) ====
@@ -40,7 +40,7 @@
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sbin/route/route.c 245168 2013-01-08 17:24:43Z hrs $");
+__FBSDID("$FreeBSD: head/sbin/route/route.c 246143 2013-01-31 08:55:21Z glebius $");
#include <sys/param.h>
#include <sys/file.h>
@@ -86,7 +86,6 @@
#endif
struct sockaddr_at sat;
struct sockaddr_dl sdl;
- struct sockaddr_inarp sinarp;
struct sockaddr_storage ss; /* added to avoid memory overrun */
} so_dst, so_gate, so_mask, so_genmask, so_ifa, so_ifp;
@@ -923,10 +922,8 @@
flags |= RTF_HOST;
if ((nrflags & F_INTERFACE) == 0)
flags |= RTF_GATEWAY;
- if (nrflags & F_PROXY) {
- so_dst.sinarp.sin_other = SIN_PROXY;
+ if (nrflags & F_PROXY)
flags |= RTF_ANNOUNCE;
- }
if (dest == NULL)
dest = "";
if (gateway == NULL)
==== //depot/projects/ctsrd/beribsd/src/share/mk/bsd.own.mk#7 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: head/share/mk/bsd.own.mk 246074 2013-01-29 17:03:18Z gabor $
+# $FreeBSD: head/share/mk/bsd.own.mk 246131 2013-01-30 19:51:16Z dim $
#
# The include file <bsd.own.mk> set common variables for owner,
# group, mode, and directories. Defaults are in brackets.
@@ -481,10 +481,6 @@
MK_CTF:= no
.endif
-.if ${MK_CLANG} == "no"
-MK_CLANG_EXTRAS:= no
-.endif
-
.if ${MK_CRYPT} == "no"
MK_OPENSSL:= no
MK_OPENSSH:= no
@@ -527,6 +523,7 @@
.endif
.if ${MK_CLANG} == "no"
+MK_CLANG_EXTRAS:= no
MK_CLANG_IS_CC:= no
.endif
==== //depot/projects/ctsrd/beribsd/src/sys/boot/uboot/common/metadata.c#4 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/boot/uboot/common/metadata.c 243693 2012-11-30 03:15:50Z gonzo $");
+__FBSDID("$FreeBSD: head/sys/boot/uboot/common/metadata.c 246135 2013-01-30 23:49:36Z ian $");
#include <stand.h>
#include <sys/param.h>
@@ -369,12 +369,15 @@
/* Convert addresses to the final VA */
*modulep -= __elfN(relocation_offset);
- for (i = 0; i < sizeof mdt / sizeof mdt[0]; i++) {
- md = file_findmetadata(kfp, mdt[i]);
- if (md) {
- bcopy(md->md_data, &vaddr, sizeof vaddr);
- vaddr -= __elfN(relocation_offset);
- bcopy(&vaddr, md->md_data, sizeof vaddr);
+ /* Do relocation fixup on metadata of each module. */
+ for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) {
+ for (i = 0; i < sizeof mdt / sizeof mdt[0]; i++) {
+ md = file_findmetadata(xp, mdt[i]);
+ if (md) {
+ bcopy(md->md_data, &vaddr, sizeof vaddr);
+ vaddr -= __elfN(relocation_offset);
+ bcopy(&vaddr, md->md_data, sizeof vaddr);
+ }
}
}
==== //depot/projects/ctsrd/beribsd/src/sys/cam/scsi/scsi_all.c#4 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_all.c 245647 2013-01-19 03:19:39Z kan $");
+__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_all.c 246146 2013-01-31 14:07:24Z smh $");
#include <sys/param.h>
#include <sys/types.h>
@@ -3139,7 +3139,7 @@
*cdb_string = '\0';
for (i = 0; i < cdb_len; i++)
snprintf(cdb_string + strlen(cdb_string),
- len - strlen(cdb_string), "%x ", cdb_ptr[i]);
+ len - strlen(cdb_string), "%02hhx ", cdb_ptr[i]);
return(cdb_string);
}
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_asus_wmi.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_asus_wmi.c 237981 2012-07-02 08:31:29Z mav $");
+__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_asus_wmi.c 246128 2013-01-30 18:01:20Z sbz $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -304,7 +304,8 @@
DEVMETHOD(device_probe, acpi_asus_wmi_probe),
DEVMETHOD(device_attach, acpi_asus_wmi_attach),
DEVMETHOD(device_detach, acpi_asus_wmi_detach),
- {0, 0}
+
+ DEVMETHOD_END
};
static driver_t acpi_asus_wmi_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_fujitsu.c#3 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_fujitsu.c 216376 2010-12-11 10:55:18Z avg $");
+__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_fujitsu.c 246128 2013-01-30 18:01:20Z sbz $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -154,7 +154,8 @@
DEVMETHOD(device_detach, acpi_fujitsu_detach),
DEVMETHOD(device_suspend, acpi_fujitsu_suspend),
DEVMETHOD(device_resume, acpi_fujitsu_resume),
- {0, 0}
+
+ DEVMETHOD_END
};
static driver_t acpi_fujitsu_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_hp.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_hp.c 212457 2010-09-11 08:09:14Z avg $");
+__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_hp.c 246128 2013-01-30 18:01:20Z sbz $");
/*
* Driver for extra ACPI-controlled features found on HP laptops
@@ -324,7 +324,8 @@
DEVMETHOD(device_probe, acpi_hp_probe),
DEVMETHOD(device_attach, acpi_hp_attach),
DEVMETHOD(device_detach, acpi_hp_detach),
- {0, 0}
+
+ DEVMETHOD_END
};
static driver_t acpi_hp_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_ibm.c#4 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_ibm.c 242305 2012-10-29 10:22:00Z bapt $");
+__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_ibm.c 246128 2013-01-30 18:01:20Z sbz $");
/*
* Driver for extra ACPI-controlled gadgets found on IBM ThinkPad laptops.
@@ -303,7 +303,7 @@
DEVMETHOD(device_detach, acpi_ibm_detach),
DEVMETHOD(device_resume, acpi_ibm_resume),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t acpi_ibm_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_panasonic.c#3 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_panasonic.c 202771 2010-01-21 21:14:28Z jkim $");
+__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_panasonic.c 246128 2013-01-30 18:01:20Z sbz $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -118,7 +118,7 @@
DEVMETHOD(device_detach, acpi_panasonic_detach),
DEVMETHOD(device_shutdown, acpi_panasonic_shutdown),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t acpi_panasonic_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_sony.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_sony.c 203622 2010-02-07 18:36:30Z gavin $");
+__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_sony.c 246128 2013-01-30 18:01:20Z sbz $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -95,7 +95,7 @@
DEVMETHOD(device_attach, acpi_sony_attach),
DEVMETHOD(device_detach, acpi_sony_detach),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t acpi_sony_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpi_support/acpi_toshiba.c#3 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_toshiba.c 193530 2009-06-05 18:44:36Z jkim $");
+__FBSDID("$FreeBSD: head/sys/dev/acpi_support/acpi_toshiba.c 246128 2013-01-30 18:01:20Z sbz $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -172,7 +172,7 @@
DEVMETHOD(device_attach, acpi_toshiba_attach),
DEVMETHOD(device_detach, acpi_toshiba_detach),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t acpi_toshiba_driver = {
@@ -190,7 +190,7 @@
DEVMETHOD(device_probe, acpi_toshiba_video_probe),
DEVMETHOD(device_attach, acpi_toshiba_video_attach),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t acpi_toshiba_video_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi.c#5 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi.c 245582 2013-01-17 23:56:43Z jkim $");
+__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi.c 246128 2013-01-30 18:01:20Z sbz $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -217,7 +217,7 @@
/* ISA emulation */
DEVMETHOD(isa_pnp_probe, acpi_isa_pnp_probe),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t acpi_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_acad.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_acad.c 197649 2009-09-30 17:07:49Z jhb $");
+__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_acad.c 246128 2013-01-30 18:01:20Z sbz $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -74,7 +74,7 @@
DEVMETHOD(device_probe, acpi_acad_probe),
DEVMETHOD(device_attach, acpi_acad_attach),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t acpi_acad_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_button.c#3 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_button.c 216471 2010-12-15 23:48:45Z jkim $");
+__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_button.c 246128 2013-01-30 18:01:20Z sbz $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -79,8 +79,7 @@
DEVMETHOD(device_suspend, acpi_button_suspend),
DEVMETHOD(device_shutdown, acpi_button_suspend),
DEVMETHOD(device_resume, acpi_button_resume),
-
- {0, 0}
+ DEVMETHOD_END
};
static driver_t acpi_button_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_cmbat.c#3 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_cmbat.c 227293 2011-11-07 06:44:47Z ed $");
+__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_cmbat.c 246128 2013-01-30 18:01:20Z sbz $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -99,7 +99,7 @@
DEVMETHOD(acpi_batt_get_info, acpi_cmbat_bif),
DEVMETHOD(acpi_batt_get_status, acpi_cmbat_bst),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t acpi_cmbat_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_dock.c#3 (text) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sys/dev/acpica/acpi_dock.c 209064 2010-06-11 19:53:42Z jkim $
+ * $FreeBSD: head/sys/dev/acpica/acpi_dock.c 246128 2013-01-30 18:01:20Z sbz $
*/
#include "opt_acpi.h"
@@ -521,7 +521,7 @@
DEVMETHOD(device_probe, acpi_dock_probe),
DEVMETHOD(device_attach, acpi_dock_attach),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t acpi_dock_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_ec.c#5 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_ec.c 236424 2012-06-01 21:33:33Z jkim $");
+__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_ec.c 246128 2013-01-30 18:01:20Z sbz $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -253,7 +253,7 @@
DEVMETHOD(acpi_ec_read, acpi_ec_read_method),
DEVMETHOD(acpi_ec_write, acpi_ec_write_method),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t acpi_ec_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_hpet.c#6 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_hpet.c 240286 2012-09-09 20:00:00Z mav $");
+__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_hpet.c 246128 2013-01-30 18:01:20Z sbz $");
#include "opt_acpi.h"
#if defined(__amd64__) || defined(__ia64__)
@@ -849,7 +849,7 @@
DEVMETHOD(bus_remap_intr, hpet_remap_intr),
#endif
- {0, 0}
+ DEVMETHOD_END
};
static driver_t hpet_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_lid.c#3 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_lid.c 209746 2010-07-06 20:57:28Z jkim $");
+__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_lid.c 246128 2013-01-30 18:01:20Z sbz $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -69,7 +69,7 @@
DEVMETHOD(device_suspend, acpi_lid_suspend),
DEVMETHOD(device_resume, acpi_lid_resume),
- {0, 0}
+ DEVMETHOD_END
};
static driver_t acpi_lid_driver = {
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_pci.c#4 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_pci.c 232403 2012-03-02 20:38:04Z jhb $");
+__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_pci.c 246128 2013-01-30 18:01:20Z sbz $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -94,7 +94,7 @@
/* PCI interface */
DEVMETHOD(pci_set_powerstate, acpi_pci_set_powerstate_method),
- { 0, 0 }
+ DEVMETHOD_END
};
static devclass_t pci_devclass;
==== //depot/projects/ctsrd/beribsd/src/sys/dev/acpica/acpi_pci_link.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_pci_link.c 227293 2011-11-07 06:44:47Z ed $");
+__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_pci_link.c 246128 2013-01-30 18:01:20Z sbz $");
#include "opt_acpi.h"
#include <sys/param.h>
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list