Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-8] src/sbin/raidctl



Module Name:    src
Committed By:   martin
Date:           Mon Sep 10 17:56:00 UTC 2018

Modified Files:
        src/sbin/raidctl [netbsd-8]: raidctl.8 rf_configure.c rf_configure.h

Log Message:
Pull up following revision(s) (requested by nakayama in ticket #1019):

        sbin/raidctl/rf_configure.h: revision 1.2
        sbin/raidctl/rf_configure.c: revision 1.27
        sbin/raidctl/rf_configure.c: revision 1.28
        sbin/raidctl/rf_configure.c: revision 1.29
        sbin/raidctl/raidctl.8: revision 1.73
        sbin/raidctl/rf_configure.c: revision 1.30
        sbin/raidctl/rf_configure.c: revision 1.31
        sbin/raidctl/rf_configure.c: revision 1.32

support NAME=<wedge name> syntax for disks and spares

 -

stop using magic constants
wrap long lines
use warn{,x}
make static
knf

 -

White space and comment formatting.   NFC.

 -

With char bug[SIZE]  using sizeof(bug[0]) is kind of boring, use
sizeof(bug) instead...

 -

Avoid needless pointer calisthenics: &foo[0] -> foo

 -

Several more cleanups:
1. Don't force use of "for" when "while" works better.
2. No need to check c != '\0' when we also check (c == ' ' || c == '\t')
3. Use the size of the buffer we're using, rather than a different one
   (not really a concern, they're the same size)
4. Don't use fscanf() to read file data, use fgets() & sscanf().
5. After using a pointer as a char *, validate alignment before switching
   to int * (can only fail if kernel #define gets set stupidly)   Or #6...
6. Validate sparemap file name isn't too long for assigned space.
7. recognise that strlen() returns size_t - don't shove it into an int.
8. On out of mem, be more clear which allocation failed in warning msg.

ATF tests all pass.   But I don't think they use sparemap files.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.71.8.1 src/sbin/raidctl/raidctl.8
cvs rdiff -u -r1.26 -r1.26.8.1 src/sbin/raidctl/rf_configure.c
cvs rdiff -u -r1.1 -r1.1.92.1 src/sbin/raidctl/rf_configure.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index