From owner-svn-src-all@freebsd.org Fri Apr 5 14:51:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C16B1579600; Fri, 5 Apr 2019 14:51:06 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD1E494ED9; Fri, 5 Apr 2019 14:51:05 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x35Ep2Rk039562; Fri, 5 Apr 2019 07:51:02 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x35Ep2ov039561; Fri, 5 Apr 2019 07:51:02 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201904051451.x35Ep2ov039561@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345900 - head/sbin/fsck_msdosfs In-Reply-To: <20190406014249.N4174@besplex.bde.org> To: Bruce Evans Date: Fri, 5 Apr 2019 07:51:02 -0700 (PDT) CC: Ed Maste , "Rodney W. Grimes" , Xin LI , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: AD1E494ED9 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Apr 2019 14:51:06 -0000 > On Fri, 5 Apr 2019, Ed Maste wrote: > > > On Fri, 5 Apr 2019 at 00:49, Rodney W. Grimes wrote: > >> > > > >>> +static const u_char dot_name[] = { > >>> + '.', ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ' }; > >>> +static const u_char dotdot_name[] = { > >>> + '.', '.',' ',' ',' ',' ',' ',' ',' ',' ',' ' }; > >>> + > >> > >> Does it make since to encode these as hex or octal constants, > >> one can not tell that those are different values in an easy > >> manner. They all look like '.' in the diff, and probably > >> in most editors. > > No, but it makes sense to write them as string constants. They are just > the strings "." and ".." padded with spaces to length 11, except they > are not actually strings since they are not NUL terminated. 11 is for > 8+3 msdos short file names. These are not NUL terminated either, but > it should be easy to ignore the extra NUL given by the string constants. There is a review up, and that is exactly what has been done, dot_names[11] = ". " > > They are all either '.' or ' ', the commas are just list separators. > > IMO spaces after the commas would make it slightly easier to see. > > The single quotes looking like commas indeed makes this hard to read. Almost headache creating :-). > Bruce -- Rod Grimes rgrimes@freebsd.org