svn commit: r343302 - head/sys/sys
Author: kib Date: Tue Jan 22 12:56:49 2019 New Revision: 343302 URL: https://svnweb.freebsd.org/changeset/base/343302 Log: Remove unused *_sysinit_flags() declarations. Submitted by: Sebastian Huber MFC after:3 days Modified: head/sys/sys/rmlock.h head/sys/sys/rwlock.h Modified: head/sys/sys/rmlock.h == --- head/sys/sys/rmlock.h Tue Jan 22 04:36:19 2019(r343301) +++ head/sys/sys/rmlock.h Tue Jan 22 12:56:49 2019(r343302) @@ -54,7 +54,6 @@ void rm_init_flags(struct rmlock *rm, const char *name void rm_destroy(struct rmlock *rm); intrm_wowned(const struct rmlock *rm); void rm_sysinit(void *arg); -void rm_sysinit_flags(void *arg); void _rm_wlock_debug(struct rmlock *rm, const char *file, int line); void _rm_wunlock_debug(struct rmlock *rm, const char *file, int line); Modified: head/sys/sys/rwlock.h == --- head/sys/sys/rwlock.h Tue Jan 22 04:36:19 2019(r343301) +++ head/sys/sys/rwlock.h Tue Jan 22 12:56:49 2019(r343302) @@ -130,7 +130,6 @@ void _rw_init_flags(volatile uintptr_t *c, const char *name, int opts); void _rw_destroy(volatile uintptr_t *c); void rw_sysinit(void *arg); -void rw_sysinit_flags(void *arg); int_rw_wowned(const volatile uintptr_t *c); void _rw_wlock_cookie(volatile uintptr_t *c, const char *file, int line); int__rw_try_wlock_int(struct rwlock *rw LOCK_FILE_LINE_ARG_DEF); ___ 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: r343303 - head/usr.sbin/kbdmap
Author: se Date: Tue Jan 22 13:11:15 2019 New Revision: 343303 URL: https://svnweb.freebsd.org/changeset/base/343303 Log: Silence a CI warning regarding the use of strcpy(). While this is a false positive (a sufficiently large buffer has been allocated in the line above), the use of strdup() simplifies and clarifies the code. MFC after:2 weeks Modified: head/usr.sbin/kbdmap/kbdmap.c Modified: head/usr.sbin/kbdmap/kbdmap.c == --- head/usr.sbin/kbdmap/kbdmap.c Tue Jan 22 12:56:49 2019 (r343302) +++ head/usr.sbin/kbdmap/kbdmap.c Tue Jan 22 13:11:15 2019 (r343303) @@ -241,8 +241,7 @@ get_font(void) if (strcmp(buf, "NO")) { if (fnt) free(fnt); - fnt = (char *) malloc(strlen(buf) + 1); - strcpy(fnt, buf); + fnt = strdup(buf); } } } ___ 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: r343305 - head/sys/net
Author: brooks Date: Tue Jan 22 17:39:26 2019 New Revision: 343305 URL: https://svnweb.freebsd.org/changeset/base/343305 Log: Rework CASE_IOC_IFGROUPREQ() to require a case before the macro. This is more compatible with formatting tools and looks more normal. Reported by: jhb (on a different review) Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D18442 Modified: head/sys/net/if.c Modified: head/sys/net/if.c == --- head/sys/net/if.c Tue Jan 22 17:34:53 2019(r343304) +++ head/sys/net/if.c Tue Jan 22 17:39:26 2019(r343305) @@ -168,14 +168,14 @@ struct ifmediareq32 { #defineSIOCGIFXMEDIA32 _IOC_NEWTYPE(SIOCGIFXMEDIA, struct ifmediareq32) #define_CASE_IOC_IFGROUPREQ_32(cmd)\ -case _IOC_NEWTYPE((cmd), struct ifgroupreq32): +_IOC_NEWTYPE((cmd), struct ifgroupreq32): case #else /* !COMPAT_FREEBSD32 */ #define _CASE_IOC_IFGROUPREQ_32(cmd) #endif /* !COMPAT_FREEBSD32 */ #define CASE_IOC_IFGROUPREQ(cmd) \ _CASE_IOC_IFGROUPREQ_32(cmd) \ -case (cmd) +(cmd) union ifreq_union { struct ifreqifr; @@ -2894,7 +2894,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, error = if_gethwaddr(ifp, ifr); break; - CASE_IOC_IFGROUPREQ(SIOCAIFGROUP): + case CASE_IOC_IFGROUPREQ(SIOCAIFGROUP): error = priv_check(td, PRIV_NET_ADDIFGROUP); if (error) return (error); @@ -2903,12 +2903,12 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, return (error); break; - CASE_IOC_IFGROUPREQ(SIOCGIFGROUP): + case CASE_IOC_IFGROUPREQ(SIOCGIFGROUP): if ((error = if_getgroup((struct ifgroupreq *)data, ifp))) return (error); break; - CASE_IOC_IFGROUPREQ(SIOCDIFGROUP): + case CASE_IOC_IFGROUPREQ(SIOCDIFGROUP): error = priv_check(td, PRIV_NET_DELIFGROUP); if (error) return (error); @@ -3063,7 +3063,7 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, s error = if_clone_list((struct if_clonereq *)data); goto out_noref; - CASE_IOC_IFGROUPREQ(SIOCGIFGMEMB): + case CASE_IOC_IFGROUPREQ(SIOCGIFGMEMB): error = if_getgroupmembers((struct ifgroupreq *)data); goto out_noref; ___ 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: r343305 - head/sys/net
On Tue, 2019-01-22 at 17:39 +, Brooks Davis wrote: > Author: brooks > Date: Tue Jan 22 17:39:26 2019 > New Revision: 343305 > URL: https://svnweb.freebsd.org/changeset/base/343305 > > Log: > Rework CASE_IOC_IFGROUPREQ() to require a case before the macro. > > This is more compatible with formatting tools and looks more > normal. > > Reported by:jhb (on a different review) > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D18442 > > Modified: > head/sys/net/if.c > > Modified: head/sys/net/if.c > = > = > --- head/sys/net/if.c Tue Jan 22 17:34:53 2019(r343304) > +++ head/sys/net/if.c Tue Jan 22 17:39:26 2019(r343305) > @@ -168,14 +168,14 @@ struct ifmediareq32 { > #define SIOCGIFXMEDIA32 _IOC_NEWTYPE(SIOCGIFXMEDIA, struct > ifmediareq32) > > #define _CASE_IOC_IFGROUPREQ_32(cmd) > \ > -case _IOC_NEWTYPE((cmd), struct ifgroupreq32): > +_IOC_NEWTYPE((cmd), struct ifgroupreq32): case That 'case' at the end of the line doesn't look right. -- Ian ___ 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: r343305 - head/sys/net
On Tue, Jan 22, 2019 at 10:45:16AM -0700, Ian Lepore wrote: > On Tue, 2019-01-22 at 17:39 +, Brooks Davis wrote: > > Author: brooks > > Date: Tue Jan 22 17:39:26 2019 > > New Revision: 343305 > > URL: https://svnweb.freebsd.org/changeset/base/343305 > > > > Log: > > Rework CASE_IOC_IFGROUPREQ() to require a case before the macro. > > > > This is more compatible with formatting tools and looks more > > normal. > > > > Reported by: jhb (on a different review) > > Sponsored by: DARPA, AFRL > > Differential Revision:https://reviews.freebsd.org/D18442 > > > > Modified: > > head/sys/net/if.c > > > > Modified: head/sys/net/if.c > > = > > = > > --- head/sys/net/if.c Tue Jan 22 17:34:53 2019(r343304) > > +++ head/sys/net/if.c Tue Jan 22 17:39:26 2019(r343305) > > @@ -168,14 +168,14 @@ struct ifmediareq32 { > > #defineSIOCGIFXMEDIA32 _IOC_NEWTYPE(SIOCGIFXMEDIA, struct > > ifmediareq32) > > > > #define_CASE_IOC_IFGROUPREQ_32(cmd) > > \ > > -case _IOC_NEWTYPE((cmd), struct ifgroupreq32): > > +_IOC_NEWTYPE((cmd), struct ifgroupreq32): case > > That 'case' at the end of the line doesn't look right. With the change, CASE_IOC_IFGROUPREQ(cmd) yields case 32: case : which seems to be the intent. ___ 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: r343305 - head/sys/net
On Tue, Jan 22, 2019 at 01:12:57PM -0500, Mark Johnston wrote: > On Tue, Jan 22, 2019 at 10:45:16AM -0700, Ian Lepore wrote: > > On Tue, 2019-01-22 at 17:39 +, Brooks Davis wrote: > > > Author: brooks > > > Date: Tue Jan 22 17:39:26 2019 > > > New Revision: 343305 > > > URL: https://svnweb.freebsd.org/changeset/base/343305 > > > > > > Log: > > > Rework CASE_IOC_IFGROUPREQ() to require a case before the macro. > > > > > > This is more compatible with formatting tools and looks more > > > normal. > > > > > > Reported by:jhb (on a different review) > > > Sponsored by: DARPA, AFRL > > > Differential Revision: https://reviews.freebsd.org/D18442 > > > > > > Modified: > > > head/sys/net/if.c > > > > > > Modified: head/sys/net/if.c > > > = > > > = > > > --- head/sys/net/if.c Tue Jan 22 17:34:53 2019(r343304) > > > +++ head/sys/net/if.c Tue Jan 22 17:39:26 2019(r343305) > > > @@ -168,14 +168,14 @@ struct ifmediareq32 { > > > #define SIOCGIFXMEDIA32 _IOC_NEWTYPE(SIOCGIFXMEDIA, struct > > > ifmediareq32) > > > > > > #define _CASE_IOC_IFGROUPREQ_32(cmd) > > > \ > > > -case _IOC_NEWTYPE((cmd), struct ifgroupreq32): > > > +_IOC_NEWTYPE((cmd), struct ifgroupreq32): case > > > > That 'case' at the end of the line doesn't look right. > > With the change, CASE_IOC_IFGROUPREQ(cmd) yields > > case 32: case : > > which seems to be the intent. This is the intent. This macro avoids a pile of #ifdef macros in the actual code (and makes more sense in my upstream branch where I have another set of ioctl values). -- Brooks signature.asc Description: PGP signature
svn commit: r343327 - head/sys/dev/sound/pci/hda
Author: wulf Date: Tue Jan 22 22:39:46 2019 New Revision: 343327 URL: https://svnweb.freebsd.org/changeset/base/343327 Log: Add quirk to enable mic and headphones redirection on HP Spectre laptops. Tested on HP AF006UR. MFC after:2 weeks Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c head/sys/dev/sound/pci/hda/hdac.h Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c == --- head/sys/dev/sound/pci/hda/hdaa_patches.c Tue Jan 22 21:52:07 2019 (r343326) +++ head/sys/dev/sound/pci/hda/hdaa_patches.c Tue Jan 22 22:39:46 2019 (r343327) @@ -410,6 +410,18 @@ hdac_pin_patch(struct hdaa_widget *w) patch = "as=1 seq=15"; break; } + } else if (id == HDA_CODEC_ALC295 && subid == HP_AF006UR_SUBVENDOR) { + switch (nid) { + case 18: + patch = "as=2"; + break; + case 25: + patch = "as=2 seq=15"; + break; + case 33: + patch = "as=1 seq=15"; + break; + } } else if (id == HDA_CODEC_ALC298 && subid == DELL_XPS9560_SUBVENDOR) { switch (nid) { case 24: Modified: head/sys/dev/sound/pci/hda/hdac.h == --- head/sys/dev/sound/pci/hda/hdac.h Tue Jan 22 21:52:07 2019 (r343326) +++ head/sys/dev/sound/pci/hda/hdac.h Tue Jan 22 22:39:46 2019 (r343327) @@ -188,6 +188,7 @@ #define HP_DV5000_SUBVENDORHDA_MODEL_CONSTRUCT(HP, 0x30a5) #define HP_DC7700S_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2801) #define HP_DC7700_SUBVENDORHDA_MODEL_CONSTRUCT(HP, 0x2802) +#define HP_AF006UR_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x83a2) #define HP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x) /* What is wrong with XN 2563 anyway? (Got the picture ?) */ #define HP_NX6325_SUBVENDORX 0x103c30b0 ___ 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: r343335 - head/lib/libbe
Author: kevans Date: Wed Jan 23 02:09:15 2019 New Revision: 343335 URL: https://svnweb.freebsd.org/changeset/base/343335 Log: libbe(3): simplify import, allow replication streams Previously, we directly used libzfs_core's lzc_receive to import to a temporary snapshot, then cloned the snapshot and setup the properties. This failed when attempting to import replication streams with questionable error. libzfs's zfs_receive is a much better fit here, so we now use it instead with the destination dataset and let libzfs take care of the dirty details. be_import is greatly simplified as a result. Reported by: Marie Helene Kvello-Aune MFC after:1 week Modified: head/lib/libbe/be.c Modified: head/lib/libbe/be.c == --- head/lib/libbe/be.c Wed Jan 23 01:23:45 2019(r343334) +++ head/lib/libbe/be.c Wed Jan 23 02:09:15 2019(r343335) @@ -649,32 +649,14 @@ int be_import(libbe_handle_t *lbh, const char *bootenv, int fd) { char buf[BE_MAXPATHLEN]; - time_t rawtime; nvlist_t *props; zfs_handle_t *zfs; - int err, len; - char nbuf[24]; + recvflags_t flags = { .nomount = 1 }; + int err; - /* -* We don't need this to be incredibly random, just unique enough that -* it won't conflict with an existing dataset name. Chopping time -* down to 32 bits is probably good enough for this. -*/ - snprintf(nbuf, 24, "tmp%u", - (uint32_t)(time(NULL) & 0x)); - if ((err = be_root_concat(lbh, nbuf, buf)) != 0) - /* -* Technically this is our problem, but we try to use short -* enough names that we won't run into problems except in -* worst-case BE root approaching MAXPATHLEN. -*/ - return (set_error(lbh, BE_ERR_PATHLEN)); + be_root_concat(lbh, bootenv, buf); - time(&rawtime); - len = strlen(buf); - strftime(buf + len, sizeof(buf) - len, "@%F-%T", localtime(&rawtime)); - - if ((err = lzc_receive(buf, NULL, NULL, false, fd)) != 0) { + if ((err = zfs_receive(lbh->lzh, buf, NULL, &flags, fd, NULL)) != 0) { switch (err) { case EINVAL: return (set_error(lbh, BE_ERR_NOORIGIN)); @@ -687,39 +669,22 @@ be_import(libbe_handle_t *lbh, const char *bootenv, in } } - if ((zfs = zfs_open(lbh->lzh, buf, ZFS_TYPE_SNAPSHOT)) == NULL) + if ((zfs = zfs_open(lbh->lzh, buf, ZFS_TYPE_FILESYSTEM)) == NULL) return (set_error(lbh, BE_ERR_ZFSOPEN)); nvlist_alloc(&props, NV_UNIQUE_NAME, KM_SLEEP); nvlist_add_string(props, "canmount", "noauto"); nvlist_add_string(props, "mountpoint", "/"); - be_root_concat(lbh, bootenv, buf); - - err = zfs_clone(zfs, buf, props); - zfs_close(zfs); + err = zfs_prop_set_list(zfs, props); nvlist_free(props); - if (err != 0) - return (set_error(lbh, BE_ERR_UNKNOWN)); - - /* -* Finally, we open up the dataset we just cloned the snapshot so that -* we may promote it. This is necessary in order to clean up the ghost -* snapshot that doesn't need to be seen after the operation is -* complete. -*/ - if ((zfs = zfs_open(lbh->lzh, buf, ZFS_TYPE_DATASET)) == NULL) - return (set_error(lbh, BE_ERR_ZFSOPEN)); - - err = zfs_promote(zfs); zfs_close(zfs); if (err != 0) return (set_error(lbh, BE_ERR_UNKNOWN)); - /* Clean up the temporary snapshot */ - return (be_destroy(lbh, nbuf, 0)); + return (0); } #if SOON ___ 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: r343338 - head/usr.bin/systat
Author: gonzo Date: Wed Jan 23 02:46:35 2019 New Revision: 343338 URL: https://svnweb.freebsd.org/changeset/base/343338 Log: Fix systat's :only command parser for the multiple arguments case According to systat(1) :only option is supposed to accept multiple drives but the parser for its arguments stops after first entry. Fix the parser logic to accept multiple drives. PR: 59220 Reported by: Andy Farkas MFC after:1 week Modified: head/usr.bin/systat/devs.c Modified: head/usr.bin/systat/devs.c == --- head/usr.bin/systat/devs.c Wed Jan 23 02:43:49 2019(r343337) +++ head/usr.bin/systat/devs.c Wed Jan 23 02:46:35 2019(r343338) @@ -288,7 +288,7 @@ dsselect(const char *args, devstat_select_mode select_ ; if (*cp) *cp++ = '\0'; - if (cp - args == 0) + if (cp - tmpstr1 == 0) break; for (i = 0; i < num_devices; i++) { asprintf(&buffer, "%s%d", dev_select[i].device_name, @@ -312,7 +312,7 @@ dsselect(const char *args, devstat_select_mode select_ } if (i >= num_devices) error("%s: unknown drive", args); - args = cp; + tmpstr1 = cp; } free(tmpstr); ___ 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"