[parted-devel] porting to FreeBSD

Debarshi 'Rishi' Ray debarshi.ray at gmail.com
Tue Mar 6 20:06:12 CET 2007


> I have created a new version of the FreeBSD patch.

I just tried to build it on a GNU/Linux system, and encountered a
build error. This is due to the use of memcpy in parted/table.c
without '#include <string.h>'.

Although 'memcpy' may be faster it can not handle overlapping source
and destination memory areas, which is transparently handled by
'memmove'. Thus often 'memmove' is preferred over 'memcpy'. If there
is no particular reason for using 'memcpy', I think we should use
'memmove'. Being safe is more important than being fast. :-)

Happy hacking,
Debarshi
-- 
GPG key ID: 63D4A5A7
Key server: pgp.mit.edu



More information about the parted-devel mailing list