svn commit: r322101 - head/bin/chmod/tests
Author: ngie Date: Sat Aug 5 16:58:02 2017 New Revision: 322101 URL: https://svnweb.freebsd.org/changeset/base/322101 Log: Don't check result of chflags in f_flag_cleanup() This will prevent false positives from occurring if the test is run on ZFS since ZFS doesn't support fflags throbbing like UFS. PR: 221189 MFC after:4 days MFC with: r321949 Modified: head/bin/chmod/tests/chmod_test.sh Modified: head/bin/chmod/tests/chmod_test.sh == --- head/bin/chmod/tests/chmod_test.sh Sat Aug 5 16:55:07 2017 (r322100) +++ head/bin/chmod/tests/chmod_test.sh Sat Aug 5 16:58:02 2017 (r322101) @@ -115,7 +115,7 @@ f_flag_body() f_flag_cleanup() { - atf_check chflags 0 foo + chflags 0 foo || : } atf_test_case h_flag ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r322109 - in head/sys/arm64: arm64 include
Author: andrew Date: Sat Aug 5 20:57:34 2017 New Revision: 322109 URL: https://svnweb.freebsd.org/changeset/base/322109 Log: Mark each cpu in the appropriate cpuset_domain set. This allows devices to handle cases where they can only run on a single domain. To allow all devices access to this set we need to move reading the domain earlier in the boot as it was previously handled in the CPU driver, however this is too late for the GICv3 ITS driver. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/mp_machdep.c head/sys/arm64/include/param.h Modified: head/sys/arm64/arm64/mp_machdep.c == --- head/sys/arm64/arm64/mp_machdep.c Sat Aug 5 19:57:45 2017 (r322108) +++ head/sys/arm64/arm64/mp_machdep.c Sat Aug 5 20:57:34 2017 (r322109) @@ -198,10 +198,6 @@ arm64_cpu_attach(device_t dev) /* Set the device to start it later */ cpu_list[cpuid] = dev; - /* Try to read the numa node of this cpu */ - OF_getencprop(ofw_bus_get_node(dev), "numa-node-id", - &__pcpu[cpuid].pc_domain, sizeof(__pcpu[cpuid].pc_domain)); - return (0); } @@ -535,6 +531,7 @@ static boolean_t cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) { uint64_t target_cpu; + int domain; target_cpu = reg[0]; if (addr_size == 2) { @@ -542,7 +539,17 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size target_cpu |= reg[1]; } - return (start_cpu(id, target_cpu) ? TRUE : FALSE); + if (!start_cpu(id, target_cpu)) + return (FALSE); + + /* Try to read the numa node of this cpu */ + if (OF_getencprop(node, "numa-node-id", , sizeof(domain)) > 0) { + __pcpu[id].pc_domain = domain; + if (domain < MAXMEMDOM) + CPU_SET(id, _domain[domain]); + } + + return (TRUE); } #endif Modified: head/sys/arm64/include/param.h == --- head/sys/arm64/include/param.h Sat Aug 5 19:57:45 2017 (r322108) +++ head/sys/arm64/include/param.h Sat Aug 5 20:57:34 2017 (r322109) @@ -60,7 +60,7 @@ #endif /* SMP || KLD_MODULE */ #ifndef MAXMEMDOM -#defineMAXMEMDOM 1 +#defineMAXMEMDOM 2 #endif #defineALIGNBYTES _ALIGNBYTES ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r322108 - head/usr.bin/calendar/calendars
Author: avos Date: Sat Aug 5 19:57:45 2017 New Revision: 322108 URL: https://svnweb.freebsd.org/changeset/base/322108 Log: Add myself to the calendar.freebsd. Reported by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd == --- head/usr.bin/calendar/calendars/calendar.freebsdSat Aug 5 17:11:40 2017(r322107) +++ head/usr.bin/calendar/calendars/calendar.freebsdSat Aug 5 19:57:45 2017(r322108) @@ -154,6 +154,7 @@ 04/22 Jakub Klamaborn in Blachownia, Silesia, Poland, 1989 04/25 Richard Gallamore born in Kissimmee, Florida, United States, 1987 04/26 Rene Ladan born in Geldrop, the Netherlands, 1980 +04/28 Andriy Voskoboinyk born in Bila Tserkva, Ukraine, 1992 04/29 Adam Weinberger born in Berkeley, California, United States, 1980 04/29 Eric Anholt born in Portland, Oregon, United States, 1983 05/01 Randall Stewart born in Spokane, Washington, United States, 1959 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r321920 - head/sys/sys
On Sat, Aug 05, 2017 at 12:26:03PM +1000, Bruce Evans wrote: > > +#defineminor(x)((int)(x)) > > Another nice simplification. Strictly, it should be (int)(dev_t)(x) since > the pseudo-prototype says that the arg is converted to dev_t, but yesterday > I couldn't see any differences even for exotic x and exotic arches. > > Today I can see some difference for exotic x and perverse implementations. > E.g., x with extra bits in a large signed integer type to invoke > implementation-defined behaviour, and a perverse implementation that > truncates to 0 for direct conversion to int but does the right thing > for indirect conversion). But we depend on the implementation doing > the right thing for other casts to int. > > Also, if dev_t == uintptr_t, it is valid for the caller to keep dev_t's > in void *'s internally but not to pass void * to minor() or major() > according to the prototype. However, casting in the macros breaks the > warning for this. I think pure macros should not cast their args or > pretend to have prototypes, but require callers to pass args of supported > types. The old dev_t macros were closer to this -- they have expressions > like ((x) << 8) which will fail if x is not an integral type or give > wrong results ix x has extra bits. So you are arguing to keep the & 0x operation ? I think this is not needed, since your note about cast being equivalent holds for all supported architectures and I do not see anywhere a contract for the operations to work on non-dev_t. So are you fine with the posted patch to sys/types.h ? ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r322077 - head/share/man/man3
Author: kib Date: Sat Aug 5 07:52:15 2017 New Revision: 322077 URL: https://svnweb.freebsd.org/changeset/base/322077 Log: Provide more detailed specification for major(), minor() and makedev(). Remove some statements which are no longer correct after ino64, and clarify other. The rewording is not in fact specific to ino64 and improvements are useful on the stable branches. Noted and reviewed by:bde Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/share/man/man3/makedev.3 Modified: head/share/man/man3/makedev.3 == --- head/share/man/man3/makedev.3 Sat Aug 5 06:56:46 2017 (r322076) +++ head/share/man/man3/makedev.3 Sat Aug 5 07:52:15 2017 (r322077) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 28, 2008 +.Dd August 3, 2017 .Dt MAKEDEV 3 .Os .Sh NAME @@ -43,7 +43,7 @@ .Sh DESCRIPTION The .Fn makedev -macro allows a unique device number to be generated based on its +macro returns a device number created from the provided .Fa major and .Fa minor @@ -52,13 +52,26 @@ The .Fn major and .Fn minor -macros can be used to obtain the original numbers from the device number +macros return the original numbers from the device number .Fa dev . +In other words, for a value +.Va dev +of the type +.Vt dev_t , +and values +.Va ma , mi +of the type +.Vt int , +the assertions +.Dl dev == makedev(major(dev), minor(dev)) +.Dl ma == major(makedev(ma, mi)) +.Dl mi == minor(makedev(ma, mi)) +are valid. .Pp In previous implementations of .Fx all block and character devices were uniquely identified by a pair of -major and minor numbers. +stable major and minor numbers. The major number referred to a certain device class (e.g. disks, TTYs) while the minor number identified an instance within the device class. Later versions of @@ -66,7 +79,8 @@ Later versions of automatically generate a unique device number for each character device visible in .Pa /dev/ . -These numbers are not divided in device classes. +These numbers are not divided in device classes and are not guaranteed +to be stable upon reboot or driver reload. .Pp On .Fx @@ -78,11 +92,9 @@ conventional way. .Sh RETURN VALUES The .Fn major -macro returns a device major number that has a value between 0 and 255. -The +and .Fn minor -macro returns a device minor number whose value can span the complete -range of an +macros return numbers whose value can span the complete range of an .Vt int . .Sh SEE ALSO .Xr mknod 2 , ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r322097 - head/usr.sbin/tzsetup
Author: marius Date: Sat Aug 5 12:59:03 2017 New Revision: 322097 URL: https://svnweb.freebsd.org/changeset/base/322097 Log: - Move creation and unlinking of /etc/wall_cmos_clock from the handling of the initial UTC dialog to install_zoneinfo() so that file gets the necessary treatment also when that dialog is skipped via "-s", when selecting UTC from the time zone menu or on the command-line instead etc. - Make the initial UTC dialog actually work by giving the relevant files the necessary treatment and then exit when choosing "Yes" there instead of moving on to the time zone menu regardless. - Since r301131, /etc/localtime is also installed when selecting UTC in interactive configurations (which previously meant only via the time zone menu, though). Thus, the code added in r230298 which treats a NULL zone file name as UTC and removes /etc/localtime in that case can go again. - Consistently refer to "could not delete" (as chosen by the oldest such code in here) when unlink(2) fails instead of a to mixture of "delete" and "unlink" in error messages. Modified: head/usr.sbin/tzsetup/tzsetup.c Modified: head/usr.sbin/tzsetup/tzsetup.c == --- head/usr.sbin/tzsetup/tzsetup.c Sat Aug 5 12:54:07 2017 (r322096) +++ head/usr.sbin/tzsetup/tzsetup.c Sat Aug 5 12:59:03 2017 (r322097) @@ -107,7 +107,7 @@ xdialog_count_rows(const char *p) rows++; } - return rows ? rows : 1; + return (rows ? rows : 1); } static int @@ -124,7 +124,7 @@ xdialog_count_columns(const char *p) len = strlen(p); max_len = MAX(max_len, len); - return max_len; + return (max_len); } static int @@ -164,7 +164,8 @@ xdialog_menu(const char *title, const char *cprompt, i tag_x = MAX(tag_x, l + k + 2); } } - width = MAX(xdialog_count_columns(cprompt), title != NULL ? xdialog_count_columns(title) : 0); + width = MAX(xdialog_count_columns(cprompt), title != NULL ? + xdialog_count_columns(title) : 0); width = MAX(width, tag_x + 4) + 4; } width = MAX(width, 24); @@ -199,7 +200,7 @@ again: free(listitems); dlg_restore_vars(_vars); - return result; + return (result); } static int usedialog = 1; @@ -269,7 +270,7 @@ continent_country_menu(dialogMenuItem *continent) int rv; if (strcmp(continent->title, "UTC") == 0) - return set_zone_utc(); + return (set_zone_utc()); /* Short cut -- if there's only one country, don't post a menu. */ if (contp->nitems == 1) @@ -642,7 +643,7 @@ set_zone_menu(dialogMenuItem *dmi) static int set_zone_utc(void) { - if (!confirm_zone(NULL)) + if (!confirm_zone("UTC")) return (DITEM_FAILURE | DITEM_RECREATE); return (install_zoneinfo("UTC")); @@ -656,7 +657,7 @@ confirm_zone(const char *filename) struct tm *tm; int rv; - setenv("TZ", filename == NULL ? "" : filename, 1); + setenv("TZ", filename, 1); tzset(); tm = localtime(); @@ -714,11 +715,8 @@ install_zoneinfo_file(const char *zoneinfo_file) #ifdef VERBOSE snprintf(title, sizeof(title), "Info"); - if (zoneinfo_file == NULL) + if (copymode) snprintf(prompt, sizeof(prompt), - "Removing %s", path_localtime); - else if (copymode) - snprintf(prompt, sizeof(prompt), "Copying %s to %s", zoneinfo_file, path_localtime); else snprintf(prompt, sizeof(prompt), @@ -733,49 +731,6 @@ install_zoneinfo_file(const char *zoneinfo_file) #endif if (reallydoit) { - if (zoneinfo_file == NULL) { - if (unlink(path_localtime) < 0 && errno != ENOENT) { - snprintf(title, sizeof(title), "Error"); - snprintf(prompt, sizeof(prompt), -"Could not delete %s: %s", path_localtime, -strerror(errno)); -#ifdef HAVE_DIALOG - if (usedialog) - dialog_msgbox(title, prompt, 8, 72, 1); - else -#endif - fprintf(stderr, "%s\n", prompt); - - return (DITEM_FAILURE | DITEM_RECREATE); - } - if (unlink(path_db) < 0 && errno != ENOENT) { - snprintf(title, sizeof(title), "Error"); - snprintf(prompt, sizeof(prompt), -"Could not delete %s: %s",
Re: svn commit: r322029 - in head: usr.bin usr.sbin
On Fri, Aug 04, 2017 at 04:50:32PM +0200, Jeremie Le Hen wrote: > On Fri, Aug 4, 2017 at 12:42 AM, Ngie Cooper (yaneurabeya) >wrote: > > > >> On Aug 3, 2017, at 14:30, Jeremie Le Hen wrote: > >> > >> Author: jlh > >> Date: Thu Aug 3 21:30:12 2017 > >> New Revision: 322029 > >> URL: https://svnweb.freebsd.org/changeset/base/322029 > >> > >> Log: > >> rwho/ruptime/rwhod shouldn't be gated by RCMDS. > > > > The why in this commit and the next you made (r322031) would have > > been incredibly helpful. If bugzilla disappears I only have the commit > > history tracking the what. > > I agree, I realized this only afterwards. I don't know how to fix this > though. Reverting the change and reapplying it with a meaningful message will produce the best result. -- Brooks ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r322075 - head/contrib/ipfilter/tools
Author: cy Date: Sat Aug 5 06:46:06 2017 New Revision: 322075 URL: https://svnweb.freebsd.org/changeset/base/322075 Log: loadpoolfile() implements a -R (NORESOLVE) option which is not listed in usage(). This commit trues up usage() with loadpoolfile(). Modified: head/contrib/ipfilter/tools/ippool.c Modified: head/contrib/ipfilter/tools/ippool.c == --- head/contrib/ipfilter/tools/ippool.cSat Aug 5 05:20:03 2017 (r322074) +++ head/contrib/ipfilter/tools/ippool.cSat Aug 5 06:46:06 2017 (r322075) @@ -77,7 +77,7 @@ usage(prog) fprintf(stderr, "Usage:\t%s\n", prog); fprintf(stderr, "\t-a [-dnv] -m [-o ] [-t type] [-T ttl] -i [/netmask]\n"); fprintf(stderr, "\t-A [-dnv] [-m ] [-o ] [-S ] [-t ]\n"); - fprintf(stderr, "\t-f [-dnuv]\n"); + fprintf(stderr, "\t-f [-dnuvR]\n"); fprintf(stderr, "\t-F [-dv] [-o ] [-t ]\n"); fprintf(stderr, "\t-l [-dv] [-m ] [-t ] [-o ] [-M ] [-N ]\n"); fprintf(stderr, "\t-r [-dnv] [-m ] [-o ] [-t type] -i [/netmask]\n"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r322076 - in head/sys: amd64/amd64 i386/i386 x86/include x86/x86
Author: jkim Date: Sat Aug 5 06:56:46 2017 New Revision: 322076 URL: https://svnweb.freebsd.org/changeset/base/322076 Log: Detect hypervisors early. We used to set lower hz on hypervisors by default but it was broken since r273800 (and r278522, its MFC to stable/10) because identify_cpu() is called too late, i.e., after init_param1(). MFC after:3 days Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c head/sys/x86/include/x86_var.h head/sys/x86/x86/identcpu.c Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Sat Aug 5 06:46:06 2017 (r322075) +++ head/sys/amd64/amd64/machdep.c Sat Aug 5 06:56:46 2017 (r322076) @@ -1537,6 +1537,8 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) kmdp = init_ops.parse_preload_data(modulep); + identify_hypervisor(); + /* Init basic tunables, hz etc */ init_param1(); Modified: head/sys/i386/i386/machdep.c == --- head/sys/i386/i386/machdep.cSat Aug 5 06:46:06 2017 (r322075) +++ head/sys/i386/i386/machdep.cSat Aug 5 06:56:46 2017 (r322076) @@ -2185,6 +2185,8 @@ init386(int first) else init_static_kenv(NULL, 0); + identify_hypervisor(); + /* Init basic tunables, hz etc */ init_param1(); Modified: head/sys/x86/include/x86_var.h == --- head/sys/x86/include/x86_var.h Sat Aug 5 06:46:06 2017 (r322075) +++ head/sys/x86/include/x86_var.h Sat Aug 5 06:56:46 2017 (r322076) @@ -116,6 +116,7 @@ voidcpu_setregs(void); void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); void identify_cpu(void); +void identify_hypervisor(void); void initializecpu(void); void initializecpucache(void); bool fix_cpuid(void); Modified: head/sys/x86/x86/identcpu.c == --- head/sys/x86/x86/identcpu.c Sat Aug 5 06:46:06 2017(r322075) +++ head/sys/x86/x86/identcpu.c Sat Aug 5 06:56:46 2017(r322076) @@ -1252,7 +1252,7 @@ static const char *const vm_pnames[] = { NULL }; -static void +void identify_hypervisor(void) { u_int regs[4]; @@ -1403,7 +1403,6 @@ identify_cpu(void) cpu_feature2 = regs[2]; #endif - identify_hypervisor(); cpu_vendor_id = find_cpu_vendor_id(); if (fix_cpuid()) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r322093 - head/usr.bin/calendar/calendars
Author: cmt (ports committer) Date: Sat Aug 5 10:03:47 2017 New Revision: 322093 URL: https://svnweb.freebsd.org/changeset/base/322093 Log: add myself to calendar.freebsd Reported by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd == --- head/usr.bin/calendar/calendars/calendar.freebsdSat Aug 5 09:48:58 2017(r322092) +++ head/usr.bin/calendar/calendars/calendar.freebsdSat Aug 5 10:03:47 2017(r322093) @@ -74,6 +74,7 @@ 02/15 Hiren Panchasaraborn in Ahmedabad, Gujarat, India, 1984 02/16 Justin Hibbits born in Toledo, Ohio, United States, 1983 02/16 Tobias Christian Berner born in Bern, Switzerland, 1985 +02/18 Christoph Moench-Tegeder born in Hannover, Niedersachsen, Germany, 1980 02/19 Murray Stokely born in Jacksonville, Florida, United States, 1979 02/20 Anders Nordby born in Oslo, Norway, 1976 02/21 Alexey Zelkin born in Simferopol, Ukraine, 1978 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"