diff options
author | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2009-08-12 16:17:41 +0000 |
---|---|---|
committer | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2009-08-12 16:17:41 +0000 |
commit | b2c6548148ae0151424f486b6ba835b2d9682e35 (patch) | |
tree | b7a34e33e948c851fcbf64e55c1f3aea465f80b9 /serprog.c | |
parent | db8a99b25fc3e5789b83bacaf16243a3e5776f47 (diff) | |
download | flashrom-b2c6548148ae0151424f486b6ba835b2d9682e35.tar.gz |
Allow to compile out serprog completely. If CONFIG_SERPROG is not set,
no stubs and no data of serprog will remain.
Side benefit: This kills a few dozen lines of code.
r678, r679 and r680 made this possible.
Once "Only list available programers in usage()" is committed, even the
usage message will be adjusted automatically.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@681 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'serprog.c')
-rw-r--r-- | serprog.c | 42 |
1 files changed, 0 insertions, 42 deletions
@@ -23,9 +23,6 @@ #include <stdlib.h> #include <unistd.h> #include "flash.h" - -#if SERPROG_SUPPORT == 1 - #include <string.h> #include <ctype.h> #include <fcntl.h> @@ -774,42 +771,3 @@ void serprog_delay(int delay) sp_opbuf_usage += 5; sp_prev_was_write = 0; } - -#else - -int serprog_init(void) -{ - fprintf(stderr, "Serial programmer support was not compiled in\n"); - exit(1); -} - -int serprog_shutdown(void) -{ - fprintf(stderr, "Serial programmer support was not compiled in\n"); - exit(1); -} - -void serprog_chip_writeb(uint8_t val, chipaddr addr) -{ - fprintf(stderr, "Serial programmer support was not compiled in\n"); - exit(1); -} - -uint8_t serprog_chip_readb(const chipaddr addr) -{ - fprintf(stderr, "Serial programmer support was not compiled in\n"); - exit(1); -} - -void serprog_chip_readn(uint8_t *buf, const chipaddr addr, size_t len) -{ - fprintf(stderr, "Serial programmer support was not compiled in\n"); - exit(1); -} - -void serprog_delay(int delay) -{ - fprintf(stderr, "Serial programmer support was not compiled in\n"); - exit(1); -} -#endif |