[parted-devel] parted port to FreeBSD
Viktor Vasilev
viktor.vasilev at stud.tu-darmstadt.de
Wed Apr 26 00:13:11 UTC 2006
Hello,
Robert Millan and I are working on a port of GNU parted to FreeBSD and
Debian GNU/kFreeBSD. A patch against trunk is attached, also available from
http://0xdeadc0de.net/v/parted/parted-trunk-p4.diff
It was tested on FreeBSD 5.4 and 6.0, and also Debian GNU/kFreeBSD 5.x. I
hope to give the test suite a run this weekend.
Here is some commentary to the changes:
- configure with --disable-dynamic-loading --disable-nls. The latter because
of missing wide char functions (wcscasecmp, wcsncasecmp and wcsdup).
- disable sigaction, since parts of ui.c contain linux-specific code.
- conditional include of wchar.h in strlist.h, the same way it's done in
table.c.
- implement strnlen in table.c, as this function is missing on FreeBSD.
- a weird screen corruption bug in table.c:table_render_row():
Breakpoint 1, table_render_row (t=0x806a890, rownum=1, ncols=7,
s=0xbfbfeb24) at table.c:186
186 wchar_t** row = t->rows[rownum];
(gdb) watch *s
Hardware watchpoint 2: *s
(gdb) n
187 int len = 1, i;
...
199 *s = realloc (*s, newsize);
(gdb)
Hardware watchpoint 2: *s
Old value = 0x80565a0 "Number Start End Size Type File system
Flags \n"
New value = 0x805fe80 "Number Start End Size
Tyf1À°\1779E\004\177\003\213E\004)E\004f\001\005Ç\004\020"
The ptr arg to realloc has obviously changed. I don't know what the propper
fix is.
- Some of the code in freebsd.c comes from various FreeBSD utils. Maybe it
should be rewritten so it can be GPL'ed?
If you have any comments and suggestions I'll be happy to hear them.
Cheers,
Vik
--
PGP Key: 0xE09DC8D8/6799 4011 EBDE 6412 05A1 090C DBDF 5887 E09D C8D8
Signed/encrypted mail welcome!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parted-trunk-p4.diff.gz
Type: application/x-gzip
Size: 8467 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20060426/62a0085b/parted-trunk-p4.diff-0001.bin
More information about the parted-devel
mailing list