Changeset 1417


Ignore:
Timestamp:
08/20/11 16:14:22 (9 months ago)
Author:
uwe
Message:

Move the main() function from flashrom.c to cli_classic.c.

The file flashrom.c is part of libflashrom and should thus not contain a
main() function, that would break compilation of all frontends using
libflashrom. Also, cli_classic.c is the right place anyway, as it's the
main() of the CLI tool.

Rename the simple wrapper cli_classic() in cli_classic.c to main(), as
it's not really needed.

Signed-off-by: Uwe Hermann <uwe@…>
Acked-by: Stefan Tauner <stefan.tauner@…>

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli_classic.c

    r1413 r1417  
    9797} 
    9898 
    99 int cli_classic(int argc, char *argv[]) 
     99int main(int argc, char *argv[]) 
    100100{ 
    101101        unsigned long size; 
  • trunk/flash.h

    r1404 r1417  
    252252#define msg_cspew(...)  print(MSG_BARF, __VA_ARGS__)    /* chip debug barf  */ 
    253253 
    254 /* cli_classic.c */ 
    255 int cli_classic(int argc, char *argv[]); 
    256  
    257254/* layout.c */ 
    258255int read_romlayout(char *name); 
  • trunk/flashrom.c

    r1413 r1417  
    17971797} 
    17981798 
    1799 int main(int argc, char *argv[]) 
    1800 { 
    1801         return cli_classic(argc, argv); 
    1802 } 
    1803  
    18041799/* FIXME: This function signature needs to be improved once doit() has a better 
    18051800 * function signature. 
Note: See TracChangeset for help on using the changeset viewer.