1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 06:23:18 +02:00

Eliminate magic numbers indicating maximum column sizes in print.c

Without this the magic numbers need to be kept in sync with the maximum
length of the strings printed in the corresponding column. if not, an
overflow and a nasty ' '-storm occur on executing flashrom -L.

Corresponding to flashrom svn r1318.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
Stefan Tauner
2011-05-26 01:35:19 +00:00
parent c0aaf95487
commit 7bcacb1bdb
3 changed files with 100 additions and 38 deletions

View File

@ -145,7 +145,7 @@ struct bitbang_spi_master {
struct penable {
uint16_t vendor_id;
uint16_t device_id;
int status;
int status; /* OK=0 and NT=1 are defines only. Beware! */
const char *vendor_name;
const char *device_name;
int (*doit) (struct pci_dev *dev, const char *name);
@ -174,10 +174,10 @@ struct board_pciid_enable {
uint16_t second_card_vendor;
uint16_t second_card_device;
/* Pattern to match DMI entries */
/* Pattern to match DMI entries. May be NULL. */
const char *dmi_pattern;
/* The vendor / part name from the coreboot table. */
/* The vendor / part name from the coreboot table. May be NULL. */
const char *lb_vendor;
const char *lb_part;
@ -188,7 +188,7 @@ struct board_pciid_enable {
int max_rom_decode_parallel;
int status;
int (*enable) (void);
int (*enable) (void); /* May be NULL. */
};
extern const struct board_pciid_enable board_pciid_enables[];