Re: [PATCH i-g-t v2] tests/meta_test: Add a meta test for sanity checks of CI systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19.04.2017 13:13, Marta Lofstedt wrote:
> +
> +__attribute__((format(printf, 1, 2)))
> +static void kmsg(const char *format, ...)
> +#define KERN_EMER	"<0>"
> +#define KERN_ALERT	"<1>"
> +#define KERN_CRIT	"<2>"
> +#define KERN_ERR	"<3>"
> +#define KERN_WARNING	"<4>"
> +#define KERN_NOTICE	"<5>"
> +#define KERN_INFO	"<6>"
> +#define KERN_DEBUG	"<7>"
> +{
> +	va_list ap;
> +	FILE *file;
> +
> +	file = fopen("/dev/kmsg", "w");
> +	if (file == NULL)
> +		return;
> +
> +	va_start(ap, format);
> +	vfprintf(file, format, ap);
> +	va_end(ap);
> +	fclose(file);
> +}
> +

igt_core.c already implements kmsg(). Is there a reason why not to
export and re-use that instead?

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux