Re: svn commit: r323692 - in head/sys/compat: linsysfs linux

2017-09-18 Thread Ryan Libby
On Sun, Sep 17, 2017 at 4:40 PM, Conrad Meyer wrote: > Author: cem > Date: Sun Sep 17 23:40:16 2017 > New Revision: 323692 > URL: https://svnweb.freebsd.org/changeset/base/323692 > > Log: > linsysfs(5): Add support for recent libdrm > > Expose more information about PCI devices (and GPUs in pa

Re: svn commit: r323692 - in head/sys/compat: linsysfs linux

2017-09-18 Thread Conrad Meyer
This was not introduced in this change. On Mon, Sep 18, 2017 at 8:05 AM, Hans Petter Selasky wrote: > On 09/18/17 01:40, Conrad Meyer wrote: >> >> device_get_children(dev, &children, &nchildren); >> for (i = 0; i < nchildren; i++) { >> if (children[i]) >> -

Re: svn commit: r323692 - in head/sys/compat: linsysfs linux

2017-09-18 Thread Hans Petter Selasky
On 09/18/17 17:09, Conrad Meyer wrote: Seems unhelpful here, as the maximum length of "226:%d" is shorter than the buffer. It makes code-review easier. --HPS ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-s

Re: svn commit: r323692 - in head/sys/compat: linsysfs linux

2017-09-18 Thread Hans Petter Selasky
On 09/18/17 01:40, Conrad Meyer wrote: + + dinfo = device_get_ivars(parent); + if (dinfo != NULL && dinfo->cfg.baseclass == PCIC_DISPLAY) { + devclass = device_get_devclass(dev); + if (devclass != NULL) +

Re: svn commit: r323692 - in head/sys/compat: linsysfs linux

2017-09-18 Thread Conrad Meyer
Seems unhelpful here, as the maximum length of "226:%d" is shorter than the buffer. On Mon, Sep 18, 2017 at 3:38 AM, Hans Petter Selasky wrote: > On 09/18/17 01:40, Conrad Meyer wrote: >> >> + sprintf(chardevname, "226:%d", >> + devi

Re: svn commit: r323692 - in head/sys/compat: linsysfs linux

2017-09-18 Thread Hans Petter Selasky
On 09/18/17 01:40, Conrad Meyer wrote: device_get_children(dev, &children, &nchildren); for (i = 0; i < nchildren; i++) { if (children[i]) - linsysfs_run_bus(children[i], dir, scsi, new_path, prefix); + linsysfs_run_bus(

Re: svn commit: r323692 - in head/sys/compat: linsysfs linux

2017-09-18 Thread Hans Petter Selasky
On 09/18/17 01:40, Conrad Meyer wrote: + sprintf(chardevname, "226:%d", + device_get_unit(dev)); Hi, Try to use snprintf(). Define the chardevname size as a macro, or just allocate it on the stack if it is < 32 bytes. --HPS ___

svn commit: r323692 - in head/sys/compat: linsysfs linux

2017-09-17 Thread Conrad Meyer
Author: cem Date: Sun Sep 17 23:40:16 2017 New Revision: 323692 URL: https://svnweb.freebsd.org/changeset/base/323692 Log: linsysfs(5): Add support for recent libdrm Expose more information about PCI devices (and GPUs in particular) via linsysfs to libdrm. This allows unmodified mode