CVSROOT: /cvs Module name: src Changes by: k...@cvs.openbsd.org 2016/01/26 16:41:48
Modified files: sbin/pdisk : io.c io.h pdisk.c Log message: Rework and simplify string argument parsing. All string arguments are at most DPISTRLEN (32) characters so there is no need for fancy dynamic growing strings. Use a DPISTRLEN long buffer and bail if it fills up. Rename get_string() to get_dpistr() and get_string_argument() to get_dpstr_argument() to emphasize they will return strings that fit in DPISTRLEN. Rework & simplify a pair of their consumers - do_rename_partition() and do_change_type() - to be more obviously identitical to each other bar the displayed verbiage.