Re: [PATCH libdrm 05/10] xf86drm: introduce a get_real_pci_path() helper

2018-06-28 Thread Emil Velikov
Hi Eric, On 28 June 2018 at 11:21, Eric Engestrom wrote: >> @@ -2992,16 +2992,37 @@ static int drmParseSubsystemType(int maj, int min) >> #endif >> } >> >> +static char * >> +get_real_pci_path(int maj, int min) >> +{ >> +char path[PATH_MAX + 1]; >> +char *real_path = malloc(PATH_MAX);

Re: [PATCH libdrm 05/10] xf86drm: introduce a get_real_pci_path() helper

2018-06-28 Thread Robert Foss
Feel free to add my r-b to this patch. On 2018-06-25 19:36, Emil Velikov wrote: From: Emil Velikov Introduce a helper which gets the real sysfs path for the given pci device. In other words, instead opening the /sys/dev/char/*/device symlink, we opt for the actual /sys/devices/pci*/*/ It fol

Re: [PATCH libdrm 05/10] xf86drm: introduce a get_real_pci_path() helper

2018-06-28 Thread Eric Engestrom
On Thursday, 2018-06-28 11:21:26 +0100, Eric Engestrom wrote: > On Monday, 2018-06-25 17:39:14 +, Emil Velikov wrote: > > From: Emil Velikov > > > > Introduce a helper which gets the real sysfs path for the given pci > > device. > > > > In other words, instead opening the /sys/dev/char/*/dev

Re: [PATCH libdrm 05/10] xf86drm: introduce a get_real_pci_path() helper

2018-06-28 Thread Eric Engestrom
On Monday, 2018-06-25 17:39:14 +, Emil Velikov wrote: > From: Emil Velikov > > Introduce a helper which gets the real sysfs path for the given pci > device. > > In other words, instead opening the /sys/dev/char/*/device symlink, we > opt for the actual /sys/devices/pci*/*/ > > It folds thre

[PATCH libdrm 05/10] xf86drm: introduce a get_real_pci_path() helper

2018-06-25 Thread Emil Velikov
From: Emil Velikov Introduce a helper which gets the real sysfs path for the given pci device. In other words, instead opening the /sys/dev/char/*/device symlink, we opt for the actual /sys/devices/pci*/*/ It folds three (nearly identical) snprintf's and paves the way of adding extra devices (s