On 10/09/2018 06:24 AM, Chris Wilson wrote: > The userspace driver does not exist in isolation and occasionally > depends on kernel uapi, and so it is useful in bug reports to include > that information. (radeonsi, r600 and radv already include utsname) > > References: https://bugs.freedesktop.org/show_bug.cgi?id=108282 > --- > src/mesa/drivers/dri/common/utils.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/src/mesa/drivers/dri/common/utils.c > b/src/mesa/drivers/dri/common/utils.c > index 5a66bcf8e05..4d0d654dbfd 100644 > --- a/src/mesa/drivers/dri/common/utils.c > +++ b/src/mesa/drivers/dri/common/utils.c > @@ -34,6 +34,8 @@ > #include <stdlib.h> > #include <stdbool.h> > #include <stdint.h> > +#include <sys/utsname.h> > + > #include "main/macros.h" > #include "main/mtypes.h" > #include "main/cpuinfo.h" > @@ -77,11 +79,15 @@ unsigned > driGetRendererString( char * buffer, const char * hardware_name, > GLuint agp_mode ) > { > + struct utsname uts; > unsigned offset; > char *cpu; > > offset = sprintf( buffer, "Mesa DRI %s", hardware_name ); > > + if (uname(&uts) == 0) > + offset += sprintf(buffer + offset, " [%s]", uts.release);
Is there any kind of a limit on how big uts.release can be? All of the callers pass a fixed-size buffer into the function, and the function has no way to know how big that buffer is. > + > /* Append any AGP-specific information. > */ > switch ( agp_mode ) { > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev