Re: [RFC PATCH v8 07/13] trace-cmd: Add VM kernel tracing over vsockets transport

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

 



On Fri, 22 Feb 2019 20:05:33 +0200
Slavomir Kaslev <kaslevs@xxxxxxxxxx> wrote:

> +static void read_qemu_guests(void)
> +{
> +	static bool initialized;
> +	struct dirent *entry;
> +	char path[PATH_MAX];
> +	DIR *dir;
> +
> +	if (initialized)
> +		return;
> +
> +	initialized = true;
> +	dir = opendir("/proc");
> +	if (!dir)
> +		die("opendir");

I would at least say:

		die("Can not open /proc");

That way, the user has of the error, as a message of just "File or
directory does not exist: opendir", isn't very helpful.

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux