All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] common/cmd_disk.c doesn't actually define any "commands"
Date: Mon, 4 Feb 2013 16:18:01 +0100	[thread overview]
Message-ID: <20130204161801.55fbf372@lilith> (raw)
In-Reply-To: <20130204100420.36086kek4ftusc0s@crashcourse.ca>

Hi Robert,

On Mon, 04 Feb 2013 10:04:20 -0500, "Robert P. J. Day"
<rpjday@crashcourse.ca> wrote:

> Quoting Albert ARIBAUD <albert.u.boot@aribaud.net>:
> 
> > Hi Robert,
> >
> > On Mon, 04 Feb 2013 07:53:43 -0500, "Robert P. J. Day"
> > <rpjday@crashcourse.ca> 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.

      parent reply	other threads:[~2013-02-04 15:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 12:53 [U-Boot] common/cmd_disk.c doesn't actually define any "commands" Robert P. J. Day
2013-02-04 14:26 ` Albert ARIBAUD
2013-02-04 15:04   ` Robert P. J. Day
2013-02-04 15:17     ` Mats Kärrman
2013-02-04 15:29       ` Robert P. J. Day
2013-02-04 15:30       ` Albert ARIBAUD
2013-02-04 15:42         ` Mats Kärrman
2013-02-04 16:01           ` Albert ARIBAUD
2013-02-04 15:18     ` Albert ARIBAUD [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130204161801.55fbf372@lilith \
    --to=albert.u.boot@aribaud.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.