DragonFly commits List (threaded) for 2005-01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: cvs commit: src/sbin/mount mntopts.h src/sbin/newfs fscopy.c mkfs.c newfs.c
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.
-Matt
Matthew Dillon
<dillon@xxxxxxxxxxxxx>
:cpressey 2005/01/05 19:21:00 PST
:
:DragonFly src repository
:
: Modified files:
: sbin/mount mntopts.h
: sbin/newfs fscopy.c mkfs.c newfs.c
: Log:
: Raise WARNS of newfs to 6:
: - Use static char buffer instead of string constant;
: - Move and add some function prototypes;
: - Don't reuse a scratch variable, use a real pid_t to hold the
: result of a fork();
: - Cast variables as needed (mainly to u_long and u_int32) to avoid
: signed-unsigned comparison warnings;
: - Rename some variables to avoid name clashes;
: - Mark some parameters as unused;
: - Add MOPT_NULL as a struct mntopt constant for terminating a list.
:
: And apply some style(9):
: - Move out some loop invariant code, for clarity;
: - Remove `register' keywords;
: - Make explicit some checks against NULL.
:
: Based-on-patch-by: Peter Schuller
: <peter_dot_schuller_at_infidyne_dot_com>
: Tested-by: typical usage of installer
:
: Revision Changes Path
: 1.4 +3 -0 src/sbin/mount/mntopts.h
: 1.5 +5 -3 src/sbin/newfs/fscopy.c
: 1.10 +59 -48 src/sbin/newfs/mkfs.c
: 1.12 +10 -10 src/sbin/newfs/newfs.c
:
:
:http://www.dragonflybsd.org/cvsweb/src/sbin/mount/mntopts.h.diff?r1=1.3&r2=1.4&f=u
:http://www.dragonflybsd.org/cvsweb/src/sbin/newfs/fscopy.c.diff?r1=1.4&r2=1.5&f=u
:http://www.dragonflybsd.org/cvsweb/src/sbin/newfs/mkfs.c.diff?r1=1.9&r2=1.10&f=u
:http://www.dragonflybsd.org/cvsweb/src/sbin/newfs/newfs.c.diff?r1=1.11&r2=1.12&f=u
:
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]