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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 08 May 2008 09:42:03 +0200
From:	Peter Oberparleiter <peter.oberparleiter@...ibm.com>
To:	Alexey Dobriyan <adobriyan@...il.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	ltp-list@...ts.sourceforge.net, ltp-coverage@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [RFC PATCH 4/6] seq_file: add function to write binary data

Alexey Dobriyan wrote:
> On Thu, May 08, 2008 at 12:17:57AM +0400, Alexey Dobriyan wrote:
>> > > +		memcpy(m->buf + m->count, s, len);
>> > > +		m->count += len;
>> > > +		return 0;
>> > > +	}
>> > > +	m->count = m->size;
>> > > +	return -1;
>> > > +}
>> > > +EXPORT_SYMBOL(seq_write);
>> 
>> I'd call function seq_memcpy() though.
> 
> Or even seq_blob().

Hm, in my opinion seq_write() would fit more into the already existing
naming scheme of seq_file interface functions. The beauty of the idea
behind seq_file is that a user can just pretend to write to the buffer
that is read by a userspace application without having to worry about
full buffers, partial reads or seeks. In this context, the read becomes
a write and function names such as seq_printf(), seq_putc(), seq_puts()
or the suggested seq_write() seem to best fit this idea.


Regards,
  Peter
--
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