From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Mon, 4 Feb 2013 16:18:01 +0100 Subject: [U-Boot] common/cmd_disk.c doesn't actually define any "commands" In-Reply-To: <20130204100420.36086kek4ftusc0s@crashcourse.ca> References: <20130204075343.1565460p912ggt44@crashcourse.ca> <20130204152641.72e869ca@lilith> <20130204100420.36086kek4ftusc0s@crashcourse.ca> Message-ID: <20130204161801.55fbf372@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Robert, On Mon, 04 Feb 2013 10:04:20 -0500, "Robert P. J. Day" wrote: > Quoting Albert ARIBAUD : > > > Hi Robert, > > > > On Mon, 04 Feb 2013 07:53:43 -0500, "Robert P. J. Day" > > wrote: > > > >> another observation from my weekend perusal of all of the > >> common/cmd_*.c files is that, despite its "cmd_" filename prefix, the > >> source file cmd_disk.c doesn't define any actual u-boot commands. > >> according to what i see as u-boot filename naming conventions, it > >> shouldn't be named "cmd_*", should it? > > > > That's arguable: apparently it provides common_diskboot() which > > implements commands for cmd_ide, cmd_scsi, cmd_usb which use it for > > implementing their do_diskboot, du_scsiboot, do_usbboot commands > > respectively. It's purely related to cmd_*. > > just to be clear, i have no strong opinion on this either way, but > my understanding is that source files with the name of "common/cmd_*.c" > typically define at least one u-boot "command" with the U_BOOT_CMD macro. > as far as i can tell, cmd_disk.c is the only counterexample of that. > > it may be true that that file provides utility routines for other > actual "commmand" files, but so do many others. for example, cmd_fdt.c > defines the behaviour of the actual "fdt" command, while fdt-related > utility routines are in fdt_support.c or even in libfdt/. That's understandable as libfdt provides support for much more than commands; OTOH, cmd_disk provides support *only* to commands. > it's no big deal, i'm just pointing out that cmd_disk.c flies in the > face of a fairly obvious pattern in u-boot filenaming convention. and > on that note, i will shut up about it. :-) > > rday Amicalement, -- Albert.