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.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to