cvs commit: src/sbin/mount mntopts.h src/sbin/newfs fscopy.c mkfs.c newfs.c

Chris Pressey cpressey at catseye.mine.nu
Fri Jan 7 11:35:02 PST 2005


On Fri, 7 Jan 2005 11:24:58 -0800 (PST)
Matthew Dillon <dillon at xxxxxxxxxxxxxxxxxxxx> wrote:

>     Good work Chris, but I have one minor nit and that is this 
>     empty_string[] business.  At least for fscopy.c what really
>     needs to be done there is that the code needs to be cleaned
>     up and NULL assigned in the 0-length case instead of "".
>     The one or two write()'s that write node->fs_Bytes should then
>     check to see if node->fs_Bytes != 0 before doing the write.
> 
>     The only reason the code works at all is that it nevers frees
>     node->fs_Data except during the allocation phase if something
>     errors out during allocation.
> 
>     In this case the empty_string is a bit too much of a hack to
>     get around the const/non-const issue.

OK, I'll give it another go-round.

-Chris





More information about the Commits mailing list