Re: svn commit: r209221 - head/bin/sh
On 06/17/10 14:55, Jilles Tjoelker wrote: On Thu, Jun 17, 2010 at 12:36:51PM -0700, Doug Barton wrote: On 06/17/10 03:03, Andrey Chernov wrote: Jilles Tjoelkerjil...@freebsd.org writes: Log: sh: Add filename completion. FWIW, what I actually do is set the shell for both root and my unprivileged user to sh, compile bash static, and put a copy of the static shell in /root. Then my .profile tests for the existence of bash and execs it if available. Hmm, I see no problems with setting the shell of my unprivileged user to something dynamically linked in /usr/local/bin. I use the same profile/bashrc/etc. for my local users, root, remote users, etc. Starting with sh and only exec'ing bash if it's viable has solved the occasional problem of something going screwy that prevents bash from running (and thereby preventing me from logging in remotely). It also helps when I'm in single user mode. Yes, many other shells complete command names at appropriate places in the line. However, at this time, it doesn't really fit in my idea of what sh(1) should be. If I'm understanding the other comments and various other feedback correctly, at this point I think it would be worthwhile for you to post your plans to -arch and let people comment before proceeding with more changes. Listing all possible command names is a fair bit of functionality not present yet (sh only caches command pathnames that have been used, it does not readdir all of $PATH like tcsh does). This is a perfect example of why I'm concerned about adding incompletely implemented features of an interactive shell to our sh. I'd prefer that there be a separation, but if you do post your plans to -arch I'd like to hear what others have to say as well. I've been very supportive of Jilles work up to this point, and I think he's done a great job of making our sh functional and compliant as a scripting shell. However in my mind adding completion (and his suggested inclusion of the kill builtin) tips the balance from good system shell to more of an interactive shell, and that makes me wonder if this is the right direction to go in. If we want a good interactive bourne-based shell in the base I'd rather have the discussion about which one to import, rather than trying to have our sh catch up with the last 15 years of development in this area. -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover!http://SupersetSolutions.com/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209328 - head/sys/dev/acpica
Author: mav Date: Sat Jun 19 08:36:12 2010 New Revision: 209328 URL: http://svn.freebsd.org/changeset/base/209328 Log: While we indeed can't precisely measure time spent in C1, we can consider measured interval as upper bound. It should be more precise then just assuming hz/2. For idle CPU it should be quite precise, for busy - not worse then before. Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c == --- head/sys/dev/acpica/acpi_cpu.c Sat Jun 19 05:35:47 2010 (r209327) +++ head/sys/dev/acpica/acpi_cpu.c Sat Jun 19 08:36:12 2010 (r209328) @@ -928,12 +928,16 @@ acpi_cpu_idle() /* * Execute HLT (or equivalent) and wait for an interrupt. We can't - * calculate the time spent in C1 since the place we wake up is an - * ISR. Assume we slept half of quantum and return. + * precisely calculate the time spent in C1 since the place we wake up + * is an ISR. Assume we slept no more then half of quantum. */ if (cx_next-type == ACPI_STATE_C1) { - sc-cpu_prev_sleep = (sc-cpu_prev_sleep * 3 + 50 / hz) / 4; + AcpiHwRead(start_time, AcpiGbl_FADT.XPmTimerBlock); acpi_cpu_c1(); + AcpiHwRead(end_time, AcpiGbl_FADT.XPmTimerBlock); +end_time = acpi_TimerDelta(end_time, start_time); + sc-cpu_prev_sleep = (sc-cpu_prev_sleep * 3 + + min(PM_USEC(end_time), 50)) / 4; return; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209329 - head/sys/dev/agp
Author: brian Date: Sat Jun 19 08:42:29 2010 New Revision: 209329 URL: http://svn.freebsd.org/changeset/base/209329 Log: Add a missing linefeed PR: 147337 Submitted by: cyberleo at cyberleo dot net MFC after:1 week Modified: head/sys/dev/agp/agp_nvidia.c Modified: head/sys/dev/agp/agp_nvidia.c == --- head/sys/dev/agp/agp_nvidia.c Sat Jun 19 08:36:12 2010 (r209328) +++ head/sys/dev/agp/agp_nvidia.c Sat Jun 19 08:42:29 2010 (r209329) @@ -282,7 +282,7 @@ agp_nvidia_get_aperture(device_t dev) case 14: return (64 * 1024 * 1024); break; case 15: return (32 * 1024 * 1024); break; default: - device_printf(dev, Invalid aperture setting 0x%x, + device_printf(dev, Invalid aperture setting 0x%x\n, pci_read_config(dev, AGP_NVIDIA_0_APSIZE, 1)); return 0; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209330 - head/sys/dev/acpica
Author: mav Date: Sat Jun 19 08:46:17 2010 New Revision: 209330 URL: http://svn.freebsd.org/changeset/base/209330 Log: Oops! Add / hz missed in r209328. Assume interrupt rate hz/2, not 1/2. Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c == --- head/sys/dev/acpica/acpi_cpu.c Sat Jun 19 08:42:29 2010 (r209329) +++ head/sys/dev/acpica/acpi_cpu.c Sat Jun 19 08:46:17 2010 (r209330) @@ -937,7 +937,7 @@ acpi_cpu_idle() AcpiHwRead(end_time, AcpiGbl_FADT.XPmTimerBlock); end_time = acpi_TimerDelta(end_time, start_time); sc-cpu_prev_sleep = (sc-cpu_prev_sleep * 3 + - min(PM_USEC(end_time), 50)) / 4; + min(PM_USEC(end_time), 50 / hz)) / 4; return; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209331 - in head: etc tools/tools/tinybsd/conf/default tools/tools/tinybsd/conf/vpn
Author: brian Date: Sat Jun 19 09:21:34 2010 New Revision: 209331 URL: http://svn.freebsd.org/changeset/base/209331 Log: Remove vestiges of 'slip'. PR: 145648 Submitted by: alexbestms at wwu dot de and spam at rm-rf dot kiev dot ua MFC after:1 week Modified: head/etc/login.conf head/tools/tools/tinybsd/conf/default/TINYBSD head/tools/tools/tinybsd/conf/vpn/TINYBSD Modified: head/etc/login.conf == --- head/etc/login.conf Sat Jun 19 08:46:17 2010(r209330) +++ head/etc/login.conf Sat Jun 19 09:21:34 2010(r209331) @@ -228,7 +228,7 @@ russian|Russian Users Accounts:\ # # ## -## The dialer class should be used for a dialup PPP/SLIP accounts +## The dialer class should be used for a dialup PPP account ## Welcome messages/news suppressed ## #dialer:\ @@ -247,7 +247,7 @@ russian|Russian Users Accounts:\ # # ## -## Site full-time 24/7 PPP/SLIP connections +## Site full-time 24/7 PPP connection ## - no time accounting, restricted to access via dialin lines ## #site:\ @@ -306,11 +306,6 @@ russian|Russian Users Accounts:\ # :tc=subscriber: # # -#subslip|SLIP Subscriber Accounts:\ -# :tc=dialer:\ -# :tc=subscriber: -# -# #subshell|Shell Subscriber Accounts:\ # :tc=subscriber: # Modified: head/tools/tools/tinybsd/conf/default/TINYBSD == --- head/tools/tools/tinybsd/conf/default/TINYBSD Sat Jun 19 08:46:17 2010(r209330) +++ head/tools/tools/tinybsd/conf/default/TINYBSD Sat Jun 19 09:21:34 2010(r209331) @@ -143,7 +143,6 @@ device wi # WaveLAN/Intersil/Symbol 80 device loop# Network loopback device random # Entropy device device ether # Ethernet support -#devicesl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) Modified: head/tools/tools/tinybsd/conf/vpn/TINYBSD == --- head/tools/tools/tinybsd/conf/vpn/TINYBSD Sat Jun 19 08:46:17 2010 (r209330) +++ head/tools/tools/tinybsd/conf/vpn/TINYBSD Sat Jun 19 09:21:34 2010 (r209331) @@ -133,7 +133,6 @@ device xe # Xircom pccard Ethernet device loop# Network loopback device random # Entropy device device ether # Ethernet support -#devicesl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209332 - head/release/scripts
Author: brian Date: Sat Jun 19 09:33:11 2010 New Revision: 209332 URL: http://svn.freebsd.org/changeset/base/209332 Log: Remove an unnecessary cat. PR: 145447 Submitted by: u at netbeisser dot de MFC after:1 week Modified: head/release/scripts/ports-install.sh Modified: head/release/scripts/ports-install.sh == --- head/release/scripts/ports-install.sh Sat Jun 19 09:21:34 2010 (r209331) +++ head/release/scripts/ports-install.sh Sat Jun 19 09:33:11 2010 (r209332) @@ -8,5 +8,5 @@ if [ `id -u` != 0 ]; then exit 1 fi echo Extracting ports tarball into ${DESTDIR}/usr -cat ports.tgz | tar --unlink -xpzf - -C ${DESTDIR}/usr +tar --unlink -xpzf ports.tgz -C ${DESTDIR}/usr exit 0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r209158 - in head/contrib/wpa: hostapd hostapd/doc src/common src/crypto src/drivers src/eap_common src/eap_peer src/eap_server src/eapol_supp src/hlr_auc_gw src/l2_packet src/radius s
On 19 Jun 2010, at 03:54, Lawrence Stewart wrote: Hi Rui, On 06/15/10 01:37, Rui Paulo wrote: Author: rpaulo Date: Mon Jun 14 15:37:48 2010 New Revision: 209158 URL: http://svn.freebsd.org/changeset/base/209158 Log: MFV hostapd wpa_supplicant 0.6.10. Added: [snip] head/contrib/wpa/hostapd/radiotap.h - copied unchanged from r209140, vendor/wpa/dist/hostapd/radiotap.h [snip] head/contrib/wpa/src/drivers/radiotap.h - copied unchanged from r209140, vendor/wpa/dist/src/drivers/radiotap.h There seems to be a minor issue with at least the above two files. Something went wrong with the keyword expansion and these two files have been committed with $FreeBSD$ expanded. Perhaps you didn't use the subversion-freebsd client to do some of the work? I believe the following diff should fix the issue I'm seeing. http://people.freebsd.org/~lstewart/patches/misc/wpa_keyword.diff What is the problem, exactly? Regards, -- Rui Paulo ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209337 - head/bin/sh
Author: jilles Date: Sat Jun 19 10:33:04 2010 New Revision: 209337 URL: http://svn.freebsd.org/changeset/base/209337 Log: sh: Fix compilation with -DNO_HISTORY. The LINENO code uses snprintf() and relied on myhistedit.h to pull in the necessary stdio.h. Compiling with -DNO_HISTORY disables all editing and history support and allows linking without -ledit -ltermcap. This may be useful for embedded systems. MFC after:2 weeks Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c == --- head/bin/sh/parser.cSat Jun 19 10:23:23 2010(r209336) +++ head/bin/sh/parser.cSat Jun 19 10:33:04 2010(r209337) @@ -40,6 +40,7 @@ __FBSDID($FreeBSD$); #include stdlib.h #include unistd.h +#include stdio.h #include shell.h #include parser.h ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209338 - head/sys/mips/atheros
Author: adrian Date: Sat Jun 19 12:12:39 2010 New Revision: 209338 URL: http://svn.freebsd.org/changeset/base/209338 Log: Extend the AR71XX watchdog debugging and data. * Add some per-device sysctl entries which record the watchdog state - whether it is armed; whether the last reboot was due to the watchdog. * Add a per-device sysctl debug flag to enable logging watchdog arming/ disarming. Reviewed by: gonzo@ Modified: head/sys/mips/atheros/ar71xx_wdog.c Modified: head/sys/mips/atheros/ar71xx_wdog.c == --- head/sys/mips/atheros/ar71xx_wdog.c Sat Jun 19 10:33:04 2010 (r209337) +++ head/sys/mips/atheros/ar71xx_wdog.c Sat Jun 19 12:12:39 2010 (r209338) @@ -38,12 +38,15 @@ __FBSDID($FreeBSD$); #include sys/bus.h #include sys/kernel.h #include sys/module.h +#include sys/sysctl.h #include mips/atheros/ar71xxreg.h struct ar71xx_wdog_softc { device_t dev; int armed; + int reboot_from_watchdog; + int debug; }; static void @@ -53,9 +56,13 @@ ar71xx_wdog_watchdog_fn(void *private, u uint64_t timer_val; cmd = WD_INTERVAL; + if (sc-debug) + device_printf(sc-dev, ar71xx_wdog_watchdog_fn: cmd: %x\n, cmd); if (cmd 0) { timer_val = (uint64_t)(1ULL cmd) * ar71xx_ahb_freq() / 10; + if (sc-debug) + device_printf(sc-dev, ar71xx_wdog_watchdog_fn: programming timer: %jx\n, (uintmax_t) timer_val); /* * Load timer with large enough value to prevent spurious * reset @@ -69,6 +76,8 @@ ar71xx_wdog_watchdog_fn(void *private, u sc-armed = 1; *error = 0; } else { + if (sc-debug) + device_printf(sc-dev, ar71xx_wdog_watchdog_fn: disarming\n); if (sc-armed) { ATH_WRITE_REG(AR71XX_RST_WDOG_CONTROL, RST_WDOG_ACTION_NOACTION); @@ -85,19 +94,47 @@ ar71xx_wdog_probe(device_t dev) return (0); } +static void +ar71xx_wdog_sysctl(device_t dev) +{ + struct ar71xx_wdog_softc *sc = device_get_softc(dev); + +struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc-dev); +struct sysctl_oid *tree = device_get_sysctl_tree(sc-dev); + +SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, +debug, CTLFLAG_RW, sc-debug, 0, +enable watchdog debugging); +SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, +armed, CTLFLAG_RD, sc-armed, 0, +whether the watchdog is armed); +SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, +reboot_from_watchdog, CTLFLAG_RD, sc-reboot_from_watchdog, 0, +whether the system rebooted from the watchdog); +} + + static int ar71xx_wdog_attach(device_t dev) { struct ar71xx_wdog_softc *sc = device_get_softc(dev); - if (ATH_READ_REG(AR71XX_RST_WDOG_CONTROL) RST_WDOG_LAST) + /* Initialise */ + sc-reboot_from_watchdog = 0; + sc-armed = 0; + sc-debug = 0; + + if (ATH_READ_REG(AR71XX_RST_WDOG_CONTROL) RST_WDOG_LAST) { device_printf (dev, Previous reset was due to watchdog timeout\n); + sc-reboot_from_watchdog = 1; + } ATH_WRITE_REG(AR71XX_RST_WDOG_CONTROL, RST_WDOG_ACTION_NOACTION); sc-dev = dev; EVENTHANDLER_REGISTER(watchdog_list, ar71xx_wdog_watchdog_fn, sc, 0); + ar71xx_wdog_sysctl(dev); return (0); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209339 - head/sys/x86/cpufreq
Author: mav Date: Sat Jun 19 13:09:42 2010 New Revision: 209339 URL: http://svn.freebsd.org/changeset/base/209339 Log: Core i5, same as previously Core2Duo, found to not set P-state for single core lower then set on other cores. Do not try to test P-states on attach on SMP systems. It is hopeless now and will just pollute verbose logs. If needed, check still can be forced via loader tunable. Modified: head/sys/x86/cpufreq/est.c Modified: head/sys/x86/cpufreq/est.c == --- head/sys/x86/cpufreq/est.c Sat Jun 19 12:12:39 2010(r209338) +++ head/sys/x86/cpufreq/est.c Sat Jun 19 13:09:42 2010(r209339) @@ -1123,16 +1123,12 @@ est_acpi_info(device_t dev, freq_info ** * Confirm id16 value is correct. */ if (sets[i].freq 0) { - error = est_set_id16(dev, sets[i].spec[0], 1); - if (error != 0 strict) { + error = est_set_id16(dev, sets[i].spec[0], strict); + if (error != 0) { if (bootverbose) device_printf(dev, Invalid freq %u, ignored.\n, sets[i].freq); continue; - } else if (error != 0 bootverbose) { - device_printf(dev, Can't check freq %u, - it may be invalid\n, - sets[i].freq); } table[j].freq = sets[i].freq; table[j].volts = sets[i].volts; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209340 - head/sys/dev/hptiop
Author: mav Date: Sat Jun 19 13:41:17 2010 New Revision: 209340 URL: http://svn.freebsd.org/changeset/base/209340 Log: Report transport type in XPT_PATH_INQ. PR: i386/147929 MFC after:3 days Modified: head/sys/dev/hptiop/hptiop.c Modified: head/sys/dev/hptiop/hptiop.c == --- head/sys/dev/hptiop/hptiop.cSat Jun 19 13:09:42 2010 (r209339) +++ head/sys/dev/hptiop/hptiop.cSat Jun 19 13:41:17 2010 (r209340) @@ -1823,6 +1823,10 @@ scsi_done: strncpy(cpi-sim_vid, FreeBSD, SIM_IDLEN); strncpy(cpi-hba_vid, HPT , HBA_IDLEN); strncpy(cpi-dev_name, cam_sim_name(sim), DEV_IDLEN); + cpi-transport = XPORT_SPI; + cpi-transport_version = 2; + cpi-protocol = PROTO_SCSI; + cpi-protocol_version = SCSI_REV_2; cpi-ccb_h.status = CAM_REQ_CMP; break; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209341 - head/sys/dev/hptmv
Author: mav Date: Sat Jun 19 13:42:14 2010 New Revision: 209341 URL: http://svn.freebsd.org/changeset/base/209341 Log: Report transport type in XPT_PATH_INQ. MFC after:3 days Modified: head/sys/dev/hptmv/entry.c Modified: head/sys/dev/hptmv/entry.c == --- head/sys/dev/hptmv/entry.c Sat Jun 19 13:41:17 2010(r209340) +++ head/sys/dev/hptmv/entry.c Sat Jun 19 13:42:14 2010(r209341) @@ -2414,6 +2414,10 @@ hpt_action(struct cam_sim *sim, union cc strncpy(cpi-hba_vid, HPT , HBA_IDLEN); strncpy(cpi-dev_name, cam_sim_name(sim), DEV_IDLEN); cpi-unit_number = cam_sim_unit(sim); + cpi-transport = XPORT_SPI; + cpi-transport_version = 2; + cpi-protocol = PROTO_SCSI; + cpi-protocol_version = SCSI_REV_2; cpi-ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); break; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209342 - head/usr.bin/ypwhich
Author: gavin Date: Sat Jun 19 16:24:55 2010 New Revision: 209342 URL: http://svn.freebsd.org/changeset/base/209342 Log: Variable 'getmap' is unused. Found by: clang static analyzer Modified: head/usr.bin/ypwhich/ypwhich.c Modified: head/usr.bin/ypwhich/ypwhich.c == --- head/usr.bin/ypwhich/ypwhich.c Sat Jun 19 13:42:14 2010 (r209341) +++ head/usr.bin/ypwhich/ypwhich.c Sat Jun 19 16:24:55 2010 (r209342) @@ -143,11 +143,11 @@ main(int argc, char *argv[]) struct ypmaplist *ypml, *y; struct hostent *hent; struct sockaddr_in lsin; - int notrans, mode, getmap; + int notrans, mode; int c, r; u_int i; - getmap = notrans = mode = 0; + notrans = mode = 0; while ((c = getopt(argc, argv, xd:mt)) != -1) switch (c) { case 'x': ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209343 - head/usr.sbin/cpucontrol
Author: gavin Date: Sat Jun 19 16:29:23 2010 New Revision: 209343 URL: http://svn.freebsd.org/changeset/base/209343 Log: Remove dead assignments, we overwrite the variable almost immediately. Found by: clang static analyzer Modified: head/usr.sbin/cpucontrol/amd.c head/usr.sbin/cpucontrol/intel.c Modified: head/usr.sbin/cpucontrol/amd.c == --- head/usr.sbin/cpucontrol/amd.c Sat Jun 19 16:24:55 2010 (r209342) +++ head/usr.sbin/cpucontrol/amd.c Sat Jun 19 16:29:23 2010 (r209343) @@ -92,9 +92,7 @@ amd_update(const char *dev, const char * assert(dev); fd = -1; - devfd = -1; fw_image = MAP_FAILED; - error = 0; devfd = open(dev, O_RDWR); if (devfd 0) { WARN(0, could not open %s for writing, dev); Modified: head/usr.sbin/cpucontrol/intel.c == --- head/usr.sbin/cpucontrol/intel.cSat Jun 19 16:24:55 2010 (r209342) +++ head/usr.sbin/cpucontrol/intel.cSat Jun 19 16:29:23 2010 (r209343) @@ -104,7 +104,6 @@ intel_update(const char *dev, const char assert(dev); fd = -1; - devfd = -1; fw_image = MAP_FAILED; ext_table = NULL; ext_header = NULL; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209344 - head/usr.sbin/timed/timed
Author: gavin Date: Sat Jun 19 17:04:01 2010 New Revision: 209344 URL: http://svn.freebsd.org/changeset/base/209344 Log: Initialise the trials variable to zero earlier in case we unexpectedly error out early. Found by: clang static analyzer Modified: head/usr.sbin/timed/timed/measure.c Modified: head/usr.sbin/timed/timed/measure.c == --- head/usr.sbin/timed/timed/measure.c Sat Jun 19 16:29:23 2010 (r209343) +++ head/usr.sbin/timed/timed/measure.c Sat Jun 19 17:04:01 2010 (r209344) @@ -86,6 +86,7 @@ measure(maxmsec, wmsec, hname, addr, pri min_idelta = min_odelta = 0x7fff; measure_status = HOSTDOWN; measure_delta = HOSTDOWN; + trials = 0; errno = 0; /* open raw socket used to measure time differences */ @@ -138,7 +139,6 @@ measure(maxmsec, wmsec, hname, addr, pri mstotvround(twait, wmsec); rcvcount = 0; - trials = 0; while (rcvcount MSGS) { (void)gettimeofday(tcur, 0); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r209158 - in head/contrib/wpa: hostapd hostapd/doc src/common src/crypto src/drivers src/eap_common src/eap_peer src/eap_server src/eapol_supp src/hlr_auc_gw src/l2_packet src/radius s
On 06/19/10 19:56, Rui Paulo wrote: On 19 Jun 2010, at 03:54, Lawrence Stewart wrote: Hi Rui, On 06/15/10 01:37, Rui Paulo wrote: Author: rpaulo Date: Mon Jun 14 15:37:48 2010 New Revision: 209158 URL: http://svn.freebsd.org/changeset/base/209158 Log: MFV hostapd wpa_supplicant 0.6.10. Added: [snip] head/contrib/wpa/hostapd/radiotap.h - copied unchanged from r209140, vendor/wpa/dist/hostapd/radiotap.h [snip] head/contrib/wpa/src/drivers/radiotap.h - copied unchanged from r209140, vendor/wpa/dist/src/drivers/radiotap.h There seems to be a minor issue with at least the above two files. Something went wrong with the keyword expansion and these two files have been committed with $FreeBSD$ expanded. Perhaps you didn't use the subversion-freebsd client to do some of the work? I believe the following diff should fix the issue I'm seeing. http://people.freebsd.org/~lstewart/patches/misc/wpa_keyword.diff What is the problem, exactly? Looking into this a bit more, I believe the problem is that you don't have your svn client autoprops set up correctly, and the files you committed don't have the svn:keywords FreeBSD=%H property set on them, so you committed the files with the expanded keyword instead of committing the keyword itself. The reason it's these 2 files is that they're the only ones with $FreeBSD:...$ in them, the others don't have the keyword. I'm not sure how the expanded keyword got into those two though... Take a look at: http://people.freebsd.org/~lstewart/misc/bsdcan2010/config in order to get a decent autoprops config going in your ~/.subversion/config file. You'll also want to manually go through and add the appropriate props to the files you committed. There is a python script distributed with svn that will retrospectively apply autoprops for you. cd /usr/ports/devel/subversion-freebsd/ ; make patch cp work/subversion-1.6.11/contrib/client-side/svn_apply_autoprops.py somewhere/useful You can then use that script to apply the props to the files - it'll save you time and pain. This showed up as a problem in my private Hg repo because when I diff head against my dev branch, I'm seeing the $FreeBSD: ...$ line showing up as a diff when it shouldn't be there if the keywords were correct in the svn repo. Cheers, Lawrence ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209349 - stable/8/lib/libc/stdio
Author: uqs Date: Sat Jun 19 18:38:03 2010 New Revision: 209349 URL: http://svn.freebsd.org/changeset/base/209349 Log: MFH r200600: Clarify what's meant by NUL for getline.3 PR: docs/141125 Submitted by: Jeremy Huddleston jerem...@apple.com Modified: stable/8/lib/libc/stdio/getline.3 Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/stdio/getline.3 == --- stable/8/lib/libc/stdio/getline.3 Sat Jun 19 18:13:31 2010 (r209348) +++ stable/8/lib/libc/stdio/getline.3 Sat Jun 19 18:38:03 2010 (r209349) @@ -78,7 +78,8 @@ and .Fn getline functions return the number of characters written, excluding the terminating -.Dv NUL . +.Dv NUL +character. The value \-1 is returned if an error occurs, or if end-of-file is reached. .Sh EXAMPLES The following code fragment reads lines from a file and ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209350 - head/sbin/geom/class/sched
Author: uqs Date: Sat Jun 19 18:52:37 2010 New Revision: 209350 URL: http://svn.freebsd.org/changeset/base/209350 Log: mdoc nitpicking for gsched.8 - remove stray argument [1] - remove stray whitespace - use canonical wording for the HISTORY section PR: docs/147119 [1] Submitted by: Alexander Best alexbes...@wwu.de [1] MFC after:1 week Modified: head/sbin/geom/class/sched/gsched.8 Modified: head/sbin/geom/class/sched/gsched.8 == --- head/sbin/geom/class/sched/gsched.8 Sat Jun 19 18:38:03 2010 (r209349) +++ head/sbin/geom/class/sched/gsched.8 Sat Jun 19 18:52:37 2010 (r209350) @@ -94,10 +94,9 @@ on an already existing provider. .Pp A subsequent 'destroy' will remove the newly created geom and hook the provider back to the original geom. -.Ar algorithm .It Cm configure Configure existing scheduling provider. It supports the same options -as the +as the .Nm create command. .It Cm destroy @@ -157,7 +156,8 @@ geom sched destroy -v ad0.sched. .Sh HISTORY The .Nm -utility appeared in April 2010. +utility first appeared in +.Fx 9.0 . .Sh AUTHORS .An Fabio Checconi Aq fa...@freebsd.org .An Luigi Rizzo Aq lu...@freebsd.org ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r209158 - in head/contrib/wpa: hostapd hostapd/doc src/common src/crypto src/drivers src/eap_common src/eap_peer src/eap_server src/eapol_supp src/hlr_auc_gw src/l2_packet src/radius s
Lawrence, I don't see the point in enabling svn:keywords in vendor code. It's actually a good thing that radiotap.h doesn't get expanded. Regards, -- Rui Paulo ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209358 - head/cddl/contrib/opensolaris/lib/libdtrace/common
Author: marcel Date: Sun Jun 20 00:34:06 2010 New Revision: 209358 URL: http://svn.freebsd.org/changeset/base/209358 Log: Unbreak platforms with char unsigned by default. Oddly enough, GCC isn't satisfied with a simple cast to int in the check against EOF, so the fix is a bit involved by actually having to go through a temporary variable. Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l == --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l Sat Jun 19 22:13:40 2010(r209357) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l Sun Jun 20 00:34:06 2010(r209358) @@ -67,8 +67,12 @@ * for all subsequent invocations, which is the effect desired. */ #undef unput -#define unput(c) \ - if (c != EOF) yyunput( c, yytext_ptr ) +#define unput(c) \ + do {\ + int _c = c; \ + if (_c != EOF) \ + yyunput(_c, yytext_ptr);\ + } while(0) #endif static int id_or_type(const char *); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r209358 - head/cddl/contrib/opensolaris/lib/libdtrace/common
On Sun, 20 Jun 2010 00:34:06 + (UTC) Marcel Moolenaar mar...@freebsd.org wrote: Author: marcel Date: Sun Jun 20 00:34:06 2010 New Revision: 209358 URL: http://svn.freebsd.org/changeset/base/209358 Log: Unbreak platforms with char unsigned by default. Oddly enough, GCC isn't satisfied with a simple cast to int in the check against EOF, so the fix is a bit involved by actually having to go through a temporary variable. Thanks. Strangely enough I only got Garret's email alerting me of this breakage 5 min ago and your timely help is much appreciated. -- Alexander Kabaev signature.asc Description: PGP signature
Re: svn commit: r209158 - in head/contrib/wpa: hostapd hostapd/doc src/common src/crypto src/drivers src/eap_common src/eap_peer src/eap_server src/eapol_supp src/hlr_auc_gw src/l2_packet src/radius s
On 06/20/10 05:22, Rui Paulo wrote: Lawrence, I don't see the point in enabling svn:keywords in vendor code. It's actually a good thing that radiotap.h doesn't get expanded. Rui, please accept my apologies. I *actually* understand the problem now as opposed to that lame 3am attempt earlier this morning. I was confused why vendor code would have $FreeBSD$ in it at all (thinking it was somehow a special case) which is why I thought you needed to set the keywords on the two radiotap.h files. I realise now that it's perfectly legit as it is and is that way because Sam pushed that code with the expanded keyword upstream and now we're importing it back in. The real problem is that Hg doesn't know about the svn autoprops during the conversion and my Hg keyword expansion config for $FreeBSD$ doesn't know to ignore $FreeBSD$ in contrib/*. Mea culpa and very sorry for lowering the SNR. Cheers, Lawrence ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209359 - head/usr.sbin/sysinstall
Author: randi Date: Sun Jun 20 04:14:49 2010 New Revision: 209359 URL: http://svn.freebsd.org/changeset/base/209359 Log: Clean up item_add and remove -fno-strict-aliasing from CFLAGS. Note that the aux value in libdialog is really an opaque pointer, but libdialog stores it as a long for historical reasons. Approved by: cperciva (mentor) Modified: head/usr.sbin/sysinstall/Makefile head/usr.sbin/sysinstall/index.c head/usr.sbin/sysinstall/misc.c head/usr.sbin/sysinstall/sysinstall.h Modified: head/usr.sbin/sysinstall/Makefile == --- head/usr.sbin/sysinstall/Makefile Sun Jun 20 00:34:06 2010 (r209358) +++ head/usr.sbin/sysinstall/Makefile Sun Jun 20 04:14:49 2010 (r209359) @@ -14,7 +14,7 @@ SRCS= anonFTP.c cdrom.c command.c config system.c tcpip.c termcap.c ttys.c ufs.c usb.c user.c \ variable.c ${_wizard} keymap.h countries.h -CFLAGS+= -DUSE_GZIP=1 -fno-strict-aliasing +CFLAGS+= -DUSE_GZIP=1 .if ${MACHINE} == pc98 CFLAGS+= -DPC98 .endif Modified: head/usr.sbin/sysinstall/index.c == --- head/usr.sbin/sysinstall/index.cSun Jun 20 00:34:06 2010 (r209358) +++ head/usr.sbin/sysinstall/index.cSun Jun 20 04:14:49 2010 (r209359) @@ -650,8 +650,8 @@ index_menu(PkgNodePtr root, PkgNodePtr t SAFE_STRCPY(buf, kp-desc); if (strlen(buf) (_MAX_DESC - maxname)) buf[_MAX_DESC - maxname] = '\0'; - nitems = item_add(nitems, kp-name, (char *)buf, pkg_checked, - pkg_fire, pkg_selected, kp, (int *)(lists), + nitems = item_add(nitems, kp-name, buf, pkg_checked, + pkg_fire, pkg_selected, kp, lists, curr, max); ++n; kp = kp-next; Modified: head/usr.sbin/sysinstall/misc.c == --- head/usr.sbin/sysinstall/misc.c Sun Jun 20 00:34:06 2010 (r209358) +++ head/usr.sbin/sysinstall/misc.c Sun Jun 20 04:14:49 2010 (r209359) @@ -238,7 +238,7 @@ item_add(dialogMenuItem *list, char *pro int (*checked)(dialogMenuItem *self), int (*fire)(dialogMenuItem *self), void (*selected)(dialogMenuItem *self, int is_selected), -void *data, int *aux, int *curr, int *max) +void *data, void *aux, int *curr, int *max) { dialogMenuItem *d; Modified: head/usr.sbin/sysinstall/sysinstall.h == --- head/usr.sbin/sysinstall/sysinstall.h Sun Jun 20 00:34:06 2010 (r209358) +++ head/usr.sbin/sysinstall/sysinstall.h Sun Jun 20 04:14:49 2010 (r209359) @@ -755,7 +755,7 @@ extern dialogMenuItem *item_add(dialogMe int (*checked)(dialogMenuItem *self), int (*fire)(dialogMenuItem *self), void (*selected)(dialogMenuItem *self, int is_selected), - void *data, int *aux, int *curr, int *max); + void *data, void *aux, int *curr, int *max); extern voiditems_free(dialogMenuItem *list, int *curr, int *max); extern int Mkdir(char *); extern int Mkdir_command(char *key, void *data); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org