lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 25 Nov 2013 16:29:09 -0300
From:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Mike Galbraith <efault@....de>,
	Stephane Eranian <eranian@...gle.com>,
	David Ahern <dsahern@...il.com>,
	Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [PATCH 1/3] perf tools: Add perf_data_file__write interface

Em Fri, Nov 22, 2013 at 03:24:26PM +0100, Jiri Olsa escreveu:
>  }
> +
> +ssize_t perf_data_file__write(struct perf_data_file *file,
> +			      void *buf, size_t size)
> +{
> +	ssize_t total = size;
> +
> +	while (size) {
> +		ssize_t ret = write(file->fd, buf, size);
> +
> +		if (ret < 0) {
> +			pr_err("failed to write perf data, error: %m\n");
> +			return -1;
> +		}
> +
> +		size -= ret;
> +		buf  += ret;
> +	}
> +
> +	return total;

So this is the functional equivalent of "readn", so please move it to
just after "readn" and make this just a simple wrapper.

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ