From: legendbb <legendbb@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Why cmd_tbl_t is referenced as extern in defining __u_boot_cmd_start?
Date: Tue, 2 Nov 2010 08:56:31 -0700 (PDT) [thread overview]
Message-ID: <30115036.post@talk.nabble.com> (raw)
line 64 and 65 in include/command.h
extern cmd_tbl_t __u_boot_cmd_start;
extern cmd_tbl_t __u_boot_cmd_end;
definition of cmd_tbl_t is just one line above these. Why "extern" is used?
Thanks,
struct cmd_tbl_s {
char *name; /* Command Name */
int maxargs; /* maximum number of arguments */
int repeatable; /* autorepeat allowed? */
/* Implementation function */
int (*cmd)(struct cmd_tbl_s *, int, int, char *[]);
char *usage; /* Usage message (short) */
#ifdef CONFIG_SYS_LONGHELP
char *help; /* Help message (long) */
#endif
#ifdef CONFIG_AUTO_COMPLETE
/* do auto completion on the arguments */
int (*complete)(int argc, char *argv[], char last_char, int maxv, char
*cmdv[]);
#endif
};
typedef struct cmd_tbl_s cmd_tbl_t;
extern cmd_tbl_t __u_boot_cmd_start;
extern cmd_tbl_t __u_boot_cmd_end;
--
View this message in context: http://old.nabble.com/Why-cmd_tbl_t-is-referenced-as-extern-in-defining-__u_boot_cmd_start--tp30115036p30115036.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
next reply other threads:[~2010-11-02 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-02 15:56 legendbb [this message]
2010-11-09 14:20 ` [U-Boot] Why cmd_tbl_t is referenced as extern in defining __u_boot_cmd_start? Mike Frysinger
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=30115036.post@talk.nabble.com \
--to=legendbb@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox