Rebrand to flashprog and update URLs

Mostly automated `sed` work. As of now, URLs to the old wiki are broken
either way, so changing them shouldn't hurt. Other URLs (e.g. to mailing
list archives) were hopefully filtered correctly.

Change-Id: I9d43bfd0e675eff2fcbad05f304b9ce9f5006b08
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashrom-stable/+/21
diff --git a/include/flash.h b/include/flash.h
index db19566..bb31731 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -32,7 +32,7 @@
 #undef max
 #endif
 
-#include "libflashrom.h"
+#include "libflashprog.h"
 #include "layout.h"
 #include "writeprotect.h"
 
@@ -178,8 +178,8 @@
 #define TEST_BAD_PREW	(struct tested){ .probe = BAD, .read = BAD, .erase = BAD, .write = BAD, .wp = NT }
 #define TEST_BAD_PREWB	(struct tested){ .probe = BAD, .read = BAD, .erase = BAD, .write = BAD, .wp = BAD }
 
-struct flashrom_flashctx;
-#define flashctx flashrom_flashctx /* TODO: Agree on a name and convert all occurrences. */
+struct flashprog_flashctx;
+#define flashctx flashprog_flashctx /* TODO: Agree on a name and convert all occurrences. */
 typedef int (erasefunc_t)(struct flashctx *flash, unsigned int addr, unsigned int blocklen);
 
 enum flash_reg {
@@ -230,7 +230,7 @@
 	unsigned int page_size;
 	int feature_bits;
 
-	/* Indicate how well flashrom supports different operations of this flash chip. */
+	/* Indicate how well flashprog supports different operations of this flash chip. */
 	struct tested {
 		enum test_state probe;
 		enum test_state read;
@@ -327,20 +327,20 @@
 
 typedef int (*chip_restore_fn_cb_t)(struct flashctx *flash, uint8_t status);
 
-struct flashrom_flashctx {
+struct flashprog_flashctx {
 	struct flashchip *chip;
 	/* FIXME: The memory mappings should be saved in a more structured way. */
 	/* The physical_* fields store the respective addresses in the physical address space of the CPU. */
 	uintptr_t physical_memory;
-	/* The virtual_* fields store where the respective physical address is mapped into flashrom's address
+	/* The virtual_* fields store where the respective physical address is mapped into flashprog's address
 	 * space. A value equivalent to (chipaddr)ERROR_PTR indicates an invalid mapping (or none at all). */
 	chipaddr virtual_memory;
 	/* Some flash devices have an additional register space; semantics are like above. */
 	uintptr_t physical_registers;
 	chipaddr virtual_registers;
 	struct registered_master *mst;
-	const struct flashrom_layout *layout;
-	struct flashrom_layout *default_layout;
+	const struct flashprog_layout *layout;
+	struct flashprog_layout *default_layout;
 	struct {
 		bool force;
 		bool force_boardmismatch;
@@ -412,8 +412,8 @@
 size_t strnlen(const char *str, size_t n);
 #endif
 
-/* flashrom.c */
-extern const char flashrom_version[];
+/* flashprog.c */
+extern const char flashprog_version[];
 extern const char *chip_to_probe;
 char *flashbuses_to_text(enum chipbustype bustype);
 int map_flash(struct flashctx *flash);
@@ -436,26 +436,26 @@
 
 /* Something happened that shouldn't happen, we'll abort. */
 #define ERROR_FATAL -0xee
-#define ERROR_FLASHROM_BUG -200
-/* We reached one of the hardcoded limits of flashrom. This can be fixed by
+#define ERROR_FLASHPROG_BUG -200
+/* We reached one of the hardcoded limits of flashprog. This can be fixed by
  * increasing the limit of a compile-time allocation or by switching to dynamic
  * allocation.
  * Note: If this warning is triggered, check first for runaway registrations.
  */
-#define ERROR_FLASHROM_LIMIT -201
+#define ERROR_FLASHPROG_LIMIT -201
 
 /* cli_common.c */
 void print_chip_support_status(const struct flashchip *chip);
 
 /* cli_output.c */
-extern enum flashrom_log_level verbose_screen;
-extern enum flashrom_log_level verbose_logfile;
+extern enum flashprog_log_level verbose_screen;
+extern enum flashprog_log_level verbose_logfile;
 int open_logfile(const char * const filename);
 int close_logfile(void);
 void start_logging(void);
-int flashrom_print_cb(enum flashrom_log_level level, const char *fmt, va_list ap);
+int flashprog_print_cb(enum flashprog_log_level level, const char *fmt, va_list ap);
 /* Let gcc and clang check for correct printf-style format strings. */
-int print(enum flashrom_log_level level, const char *fmt, ...)
+int print(enum flashprog_log_level level, const char *fmt, ...)
 #ifdef __MINGW32__
 #  ifndef __MINGW_PRINTF_FORMAT
 #    define __MINGW_PRINTF_FORMAT gnu_printf
@@ -464,24 +464,24 @@
 #else
 __attribute__((format(printf, 2, 3)));
 #endif
-#define msg_gerr(...)	print(FLASHROM_MSG_ERROR, __VA_ARGS__)	/* general errors */
-#define msg_perr(...)	print(FLASHROM_MSG_ERROR, __VA_ARGS__)	/* programmer errors */
-#define msg_cerr(...)	print(FLASHROM_MSG_ERROR, __VA_ARGS__)	/* chip errors */
-#define msg_gwarn(...)	print(FLASHROM_MSG_WARN, __VA_ARGS__)	/* general warnings */
-#define msg_pwarn(...)	print(FLASHROM_MSG_WARN, __VA_ARGS__)	/* programmer warnings */
-#define msg_cwarn(...)	print(FLASHROM_MSG_WARN, __VA_ARGS__)	/* chip warnings */
-#define msg_ginfo(...)	print(FLASHROM_MSG_INFO, __VA_ARGS__)	/* general info */
-#define msg_pinfo(...)	print(FLASHROM_MSG_INFO, __VA_ARGS__)	/* programmer info */
-#define msg_cinfo(...)	print(FLASHROM_MSG_INFO, __VA_ARGS__)	/* chip info */
-#define msg_gdbg(...)	print(FLASHROM_MSG_DEBUG, __VA_ARGS__)	/* general debug */
-#define msg_pdbg(...)	print(FLASHROM_MSG_DEBUG, __VA_ARGS__)	/* programmer debug */
-#define msg_cdbg(...)	print(FLASHROM_MSG_DEBUG, __VA_ARGS__)	/* chip debug */
-#define msg_gdbg2(...)	print(FLASHROM_MSG_DEBUG2, __VA_ARGS__)	/* general debug2 */
-#define msg_pdbg2(...)	print(FLASHROM_MSG_DEBUG2, __VA_ARGS__)	/* programmer debug2 */
-#define msg_cdbg2(...)	print(FLASHROM_MSG_DEBUG2, __VA_ARGS__)	/* chip debug2 */
-#define msg_gspew(...)	print(FLASHROM_MSG_SPEW, __VA_ARGS__)	/* general debug spew  */
-#define msg_pspew(...)	print(FLASHROM_MSG_SPEW, __VA_ARGS__)	/* programmer debug spew  */
-#define msg_cspew(...)	print(FLASHROM_MSG_SPEW, __VA_ARGS__)	/* chip debug spew  */
+#define msg_gerr(...)	print(FLASHPROG_MSG_ERROR, __VA_ARGS__)	/* general errors */
+#define msg_perr(...)	print(FLASHPROG_MSG_ERROR, __VA_ARGS__)	/* programmer errors */
+#define msg_cerr(...)	print(FLASHPROG_MSG_ERROR, __VA_ARGS__)	/* chip errors */
+#define msg_gwarn(...)	print(FLASHPROG_MSG_WARN, __VA_ARGS__)	/* general warnings */
+#define msg_pwarn(...)	print(FLASHPROG_MSG_WARN, __VA_ARGS__)	/* programmer warnings */
+#define msg_cwarn(...)	print(FLASHPROG_MSG_WARN, __VA_ARGS__)	/* chip warnings */
+#define msg_ginfo(...)	print(FLASHPROG_MSG_INFO, __VA_ARGS__)	/* general info */
+#define msg_pinfo(...)	print(FLASHPROG_MSG_INFO, __VA_ARGS__)	/* programmer info */
+#define msg_cinfo(...)	print(FLASHPROG_MSG_INFO, __VA_ARGS__)	/* chip info */
+#define msg_gdbg(...)	print(FLASHPROG_MSG_DEBUG, __VA_ARGS__)	/* general debug */
+#define msg_pdbg(...)	print(FLASHPROG_MSG_DEBUG, __VA_ARGS__)	/* programmer debug */
+#define msg_cdbg(...)	print(FLASHPROG_MSG_DEBUG, __VA_ARGS__)	/* chip debug */
+#define msg_gdbg2(...)	print(FLASHPROG_MSG_DEBUG2, __VA_ARGS__)	/* general debug2 */
+#define msg_pdbg2(...)	print(FLASHPROG_MSG_DEBUG2, __VA_ARGS__)	/* programmer debug2 */
+#define msg_cdbg2(...)	print(FLASHPROG_MSG_DEBUG2, __VA_ARGS__)	/* chip debug2 */
+#define msg_gspew(...)	print(FLASHPROG_MSG_SPEW, __VA_ARGS__)	/* general debug spew  */
+#define msg_pspew(...)	print(FLASHPROG_MSG_SPEW, __VA_ARGS__)	/* programmer debug spew  */
+#define msg_cspew(...)	print(FLASHPROG_MSG_SPEW, __VA_ARGS__)	/* chip debug spew  */
 
 /* spi.c */
 struct spi_command {
diff --git a/include/ich_descriptors.h b/include/ich_descriptors.h
index 5a6cdf1..7e123f3 100644
--- a/include/ich_descriptors.h
+++ b/include/ich_descriptors.h
@@ -591,6 +591,6 @@
 int read_ich_descriptors_via_fdo(enum ich_chipset cs, void *spibar, struct ich_descriptors *desc);
 int getFCBA_component_density(enum ich_chipset cs, const struct ich_descriptors *desc, uint8_t idx);
 
-int layout_from_ich_descriptors(struct flashrom_layout **, const void *dump, size_t len);
+int layout_from_ich_descriptors(struct flashprog_layout **, const void *dump, size_t len);
 
 #endif /* __ICH_DESCRIPTORS_H__ */
diff --git a/include/layout.h b/include/layout.h
index 91a6d6e..356ca25 100644
--- a/include/layout.h
+++ b/include/layout.h
@@ -44,23 +44,23 @@
 	char *name;
 };
 
-struct flashrom_layout;
+struct flashprog_layout;
 
 struct layout_include_args;
 
-struct flashrom_flashctx;
-const struct flashrom_layout *get_default_layout(const struct flashrom_flashctx *);
-const struct flashrom_layout *get_layout(const struct flashrom_flashctx *);
+struct flashprog_flashctx;
+const struct flashprog_layout *get_default_layout(const struct flashprog_flashctx *);
+const struct flashprog_layout *get_layout(const struct flashprog_flashctx *);
 
-int layout_from_file(struct flashrom_layout **, const char *name);
+int layout_from_file(struct flashprog_layout **, const char *name);
 
 int register_include_arg(struct layout_include_args **, char *arg);
-int process_include_args(struct flashrom_layout *, const struct layout_include_args *);
+int process_include_args(struct flashprog_layout *, const struct layout_include_args *);
 void cleanup_include_args(struct layout_include_args **);
 
-const struct romentry *layout_next_included_region(const struct flashrom_layout *, chipoff_t);
-const struct romentry *layout_next_included(const struct flashrom_layout *, const struct romentry *);
-const struct romentry *layout_next(const struct flashrom_layout *, const struct romentry *);
-int layout_sanity_checks(const struct flashrom_flashctx *, bool write_it);
+const struct romentry *layout_next_included_region(const struct flashprog_layout *, chipoff_t);
+const struct romentry *layout_next_included(const struct flashprog_layout *, const struct romentry *);
+const struct romentry *layout_next(const struct flashprog_layout *, const struct romentry *);
+int layout_sanity_checks(const struct flashprog_flashctx *, bool write_it);
 
 #endif /* !__LAYOUT_H__ */
diff --git a/include/libflashprog.h b/include/libflashprog.h
new file mode 100644
index 0000000..9c39f5f
--- /dev/null
+++ b/include/libflashprog.h
@@ -0,0 +1,118 @@
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright (C) 2010 Google Inc.
+ * Copyright (C) 2012 secunet Security Networks AG
+ * (Written by Nico Huber <nico.huber@secunet.com> for secunet)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __LIBFLASHPROG_H__
+#define __LIBFLASHPROG_H__ 1
+
+#include <sys/types.h>
+#include <stddef.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdarg.h>
+
+int flashprog_init(int perform_selfcheck);
+int flashprog_shutdown(void);
+/** @ingroup flashprog-general */
+enum flashprog_log_level {
+	FLASHPROG_MSG_ERROR	= 0,
+	FLASHPROG_MSG_WARN	= 1,
+	FLASHPROG_MSG_INFO	= 2,
+	FLASHPROG_MSG_DEBUG	= 3,
+	FLASHPROG_MSG_DEBUG2	= 4,
+	FLASHPROG_MSG_SPEW	= 5,
+};
+/** @ingroup flashprog-general */
+typedef int(flashprog_log_callback)(enum flashprog_log_level, const char *format, va_list);
+void flashprog_set_log_callback(flashprog_log_callback *);
+
+/** @ingroup flashprog-prog */
+struct flashprog_programmer;
+int flashprog_programmer_init(struct flashprog_programmer **, const char *prog_name, const char *prog_params);
+int flashprog_programmer_shutdown(struct flashprog_programmer *);
+
+struct flashprog_flashctx;
+int flashprog_flash_probe(struct flashprog_flashctx **, const struct flashprog_programmer *, const char *chip_name);
+size_t flashprog_flash_getsize(const struct flashprog_flashctx *);
+int flashprog_flash_erase(struct flashprog_flashctx *);
+void flashprog_flash_release(struct flashprog_flashctx *);
+
+/** @ingroup flashprog-flash */
+enum flashprog_flag {
+	FLASHPROG_FLAG_FORCE,
+	FLASHPROG_FLAG_FORCE_BOARDMISMATCH,
+	FLASHPROG_FLAG_VERIFY_AFTER_WRITE,
+	FLASHPROG_FLAG_VERIFY_WHOLE_CHIP,
+};
+void flashprog_flag_set(struct flashprog_flashctx *, enum flashprog_flag, bool value);
+bool flashprog_flag_get(const struct flashprog_flashctx *, enum flashprog_flag);
+
+int flashprog_image_read(struct flashprog_flashctx *, void *buffer, size_t buffer_len);
+int flashprog_image_write(struct flashprog_flashctx *, void *buffer, size_t buffer_len, const void *refbuffer);
+int flashprog_image_verify(struct flashprog_flashctx *, const void *buffer, size_t buffer_len);
+
+struct flashprog_layout;
+int flashprog_layout_new(struct flashprog_layout **);
+int flashprog_layout_read_from_ifd(struct flashprog_layout **, struct flashprog_flashctx *, const void *dump, size_t len);
+int flashprog_layout_read_fmap_from_rom(struct flashprog_layout **,
+		struct flashprog_flashctx *, size_t offset, size_t length);
+int flashprog_layout_read_fmap_from_buffer(struct flashprog_layout **layout,
+		struct flashprog_flashctx *, const uint8_t *buf, size_t len);
+int flashprog_layout_add_region(struct flashprog_layout *, size_t start, size_t end, const char *name);
+int flashprog_layout_include_region(struct flashprog_layout *, const char *name);
+void flashprog_layout_release(struct flashprog_layout *);
+void flashprog_layout_set(struct flashprog_flashctx *, const struct flashprog_layout *);
+
+/** @ingroup flashprog-wp */
+enum flashprog_wp_result {
+	FLASHPROG_WP_OK = 0,
+	FLASHPROG_WP_ERR_CHIP_UNSUPPORTED = 1,
+	FLASHPROG_WP_ERR_OTHER = 2,
+	FLASHPROG_WP_ERR_READ_FAILED = 3,
+	FLASHPROG_WP_ERR_WRITE_FAILED = 4,
+	FLASHPROG_WP_ERR_VERIFY_FAILED = 5,
+	FLASHPROG_WP_ERR_RANGE_UNSUPPORTED = 6,
+	FLASHPROG_WP_ERR_MODE_UNSUPPORTED = 7,
+	FLASHPROG_WP_ERR_RANGE_LIST_UNAVAILABLE = 8,
+	FLASHPROG_WP_ERR_UNSUPPORTED_STATE = 9,
+};
+
+enum flashprog_wp_mode {
+	FLASHPROG_WP_MODE_DISABLED,
+	FLASHPROG_WP_MODE_HARDWARE,
+	FLASHPROG_WP_MODE_POWER_CYCLE,
+	FLASHPROG_WP_MODE_PERMANENT
+};
+struct flashprog_wp_cfg;
+struct flashprog_wp_ranges;
+
+enum flashprog_wp_result flashprog_wp_cfg_new(struct flashprog_wp_cfg **);
+void flashprog_wp_cfg_release(struct flashprog_wp_cfg *);
+void flashprog_wp_set_mode(struct flashprog_wp_cfg *, enum flashprog_wp_mode);
+enum flashprog_wp_mode flashprog_wp_get_mode(const struct flashprog_wp_cfg *);
+void flashprog_wp_set_range(struct flashprog_wp_cfg *, size_t start, size_t len);
+void flashprog_wp_get_range(size_t *start, size_t *len, const struct flashprog_wp_cfg *);
+
+enum flashprog_wp_result flashprog_wp_read_cfg(struct flashprog_wp_cfg *, struct flashprog_flashctx *);
+enum flashprog_wp_result flashprog_wp_write_cfg(struct flashprog_flashctx *, const struct flashprog_wp_cfg *);
+
+enum flashprog_wp_result flashprog_wp_get_available_ranges(struct flashprog_wp_ranges **, struct flashprog_flashctx *);
+size_t flashprog_wp_ranges_get_count(const struct flashprog_wp_ranges *);
+enum flashprog_wp_result flashprog_wp_ranges_get_range(size_t *start, size_t *len, const struct flashprog_wp_ranges *, unsigned int index);
+void flashprog_wp_ranges_release(struct flashprog_wp_ranges *);
+
+#endif				/* !__LIBFLASHPROG_H__ */
diff --git a/include/libflashrom.h b/include/libflashrom.h
deleted file mode 100644
index 9f503a2..0000000
--- a/include/libflashrom.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * This file is part of the flashrom project.
- *
- * Copyright (C) 2010 Google Inc.
- * Copyright (C) 2012 secunet Security Networks AG
- * (Written by Nico Huber <nico.huber@secunet.com> for secunet)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __LIBFLASHROM_H__
-#define __LIBFLASHROM_H__ 1
-
-#include <sys/types.h>
-#include <stddef.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdarg.h>
-
-int flashrom_init(int perform_selfcheck);
-int flashrom_shutdown(void);
-/** @ingroup flashrom-general */
-enum flashrom_log_level {
-	FLASHROM_MSG_ERROR	= 0,
-	FLASHROM_MSG_WARN	= 1,
-	FLASHROM_MSG_INFO	= 2,
-	FLASHROM_MSG_DEBUG	= 3,
-	FLASHROM_MSG_DEBUG2	= 4,
-	FLASHROM_MSG_SPEW	= 5,
-};
-/** @ingroup flashrom-general */
-typedef int(flashrom_log_callback)(enum flashrom_log_level, const char *format, va_list);
-void flashrom_set_log_callback(flashrom_log_callback *);
-
-/** @ingroup flashrom-prog */
-struct flashrom_programmer;
-int flashrom_programmer_init(struct flashrom_programmer **, const char *prog_name, const char *prog_params);
-int flashrom_programmer_shutdown(struct flashrom_programmer *);
-
-struct flashrom_flashctx;
-int flashrom_flash_probe(struct flashrom_flashctx **, const struct flashrom_programmer *, const char *chip_name);
-size_t flashrom_flash_getsize(const struct flashrom_flashctx *);
-int flashrom_flash_erase(struct flashrom_flashctx *);
-void flashrom_flash_release(struct flashrom_flashctx *);
-
-/** @ingroup flashrom-flash */
-enum flashrom_flag {
-	FLASHROM_FLAG_FORCE,
-	FLASHROM_FLAG_FORCE_BOARDMISMATCH,
-	FLASHROM_FLAG_VERIFY_AFTER_WRITE,
-	FLASHROM_FLAG_VERIFY_WHOLE_CHIP,
-};
-void flashrom_flag_set(struct flashrom_flashctx *, enum flashrom_flag, bool value);
-bool flashrom_flag_get(const struct flashrom_flashctx *, enum flashrom_flag);
-
-int flashrom_image_read(struct flashrom_flashctx *, void *buffer, size_t buffer_len);
-int flashrom_image_write(struct flashrom_flashctx *, void *buffer, size_t buffer_len, const void *refbuffer);
-int flashrom_image_verify(struct flashrom_flashctx *, const void *buffer, size_t buffer_len);
-
-struct flashrom_layout;
-int flashrom_layout_new(struct flashrom_layout **);
-int flashrom_layout_read_from_ifd(struct flashrom_layout **, struct flashrom_flashctx *, const void *dump, size_t len);
-int flashrom_layout_read_fmap_from_rom(struct flashrom_layout **,
-		struct flashrom_flashctx *, size_t offset, size_t length);
-int flashrom_layout_read_fmap_from_buffer(struct flashrom_layout **layout,
-		struct flashrom_flashctx *, const uint8_t *buf, size_t len);
-int flashrom_layout_add_region(struct flashrom_layout *, size_t start, size_t end, const char *name);
-int flashrom_layout_include_region(struct flashrom_layout *, const char *name);
-void flashrom_layout_release(struct flashrom_layout *);
-void flashrom_layout_set(struct flashrom_flashctx *, const struct flashrom_layout *);
-
-/** @ingroup flashrom-wp */
-enum flashrom_wp_result {
-	FLASHROM_WP_OK = 0,
-	FLASHROM_WP_ERR_CHIP_UNSUPPORTED = 1,
-	FLASHROM_WP_ERR_OTHER = 2,
-	FLASHROM_WP_ERR_READ_FAILED = 3,
-	FLASHROM_WP_ERR_WRITE_FAILED = 4,
-	FLASHROM_WP_ERR_VERIFY_FAILED = 5,
-	FLASHROM_WP_ERR_RANGE_UNSUPPORTED = 6,
-	FLASHROM_WP_ERR_MODE_UNSUPPORTED = 7,
-	FLASHROM_WP_ERR_RANGE_LIST_UNAVAILABLE = 8,
-	FLASHROM_WP_ERR_UNSUPPORTED_STATE = 9,
-};
-
-enum flashrom_wp_mode {
-	FLASHROM_WP_MODE_DISABLED,
-	FLASHROM_WP_MODE_HARDWARE,
-	FLASHROM_WP_MODE_POWER_CYCLE,
-	FLASHROM_WP_MODE_PERMANENT
-};
-struct flashrom_wp_cfg;
-struct flashrom_wp_ranges;
-
-enum flashrom_wp_result flashrom_wp_cfg_new(struct flashrom_wp_cfg **);
-void flashrom_wp_cfg_release(struct flashrom_wp_cfg *);
-void flashrom_wp_set_mode(struct flashrom_wp_cfg *, enum flashrom_wp_mode);
-enum flashrom_wp_mode flashrom_wp_get_mode(const struct flashrom_wp_cfg *);
-void flashrom_wp_set_range(struct flashrom_wp_cfg *, size_t start, size_t len);
-void flashrom_wp_get_range(size_t *start, size_t *len, const struct flashrom_wp_cfg *);
-
-enum flashrom_wp_result flashrom_wp_read_cfg(struct flashrom_wp_cfg *, struct flashrom_flashctx *);
-enum flashrom_wp_result flashrom_wp_write_cfg(struct flashrom_flashctx *, const struct flashrom_wp_cfg *);
-
-enum flashrom_wp_result flashrom_wp_get_available_ranges(struct flashrom_wp_ranges **, struct flashrom_flashctx *);
-size_t flashrom_wp_ranges_get_count(const struct flashrom_wp_ranges *);
-enum flashrom_wp_result flashrom_wp_ranges_get_range(size_t *start, size_t *len, const struct flashrom_wp_ranges *, unsigned int index);
-void flashrom_wp_ranges_release(struct flashrom_wp_ranges *);
-
-#endif				/* !__LIBFLASHROM_H__ */
diff --git a/include/programmer.h b/include/programmer.h
index a4e2be6..4fee2ef 100644
--- a/include/programmer.h
+++ b/include/programmer.h
@@ -277,7 +277,7 @@
 int register_spi_bitbang_master(const struct bitbang_spi_master *master, void *spi_data);
 
 
-/* flashrom.c */
+/* flashprog.c */
 struct decode_sizes {
 	uint32_t parallel;
 	uint32_t lpc;
diff --git a/include/spi.h b/include/spi.h
index 4c6ff3e..dc09b8e 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -211,7 +211,7 @@
 #define SPI_INVALID_OPCODE	-2
 #define SPI_INVALID_ADDRESS	-3
 #define SPI_INVALID_LENGTH	-4
-#define SPI_FLASHROM_BUG	-5
+#define SPI_FLASHPROG_BUG	-5
 #define SPI_PROGRAMMER_ERROR	-6
 
 #endif		/* !__SPI_H__ */
diff --git a/include/writeprotect.h b/include/writeprotect.h
index e27403d..0e5a86e 100644
--- a/include/writeprotect.h
+++ b/include/writeprotect.h
@@ -22,7 +22,7 @@
 #include <stdbool.h>
 #include <stddef.h>
 
-#include "libflashrom.h"
+#include "libflashprog.h"
 
 #define MAX_BP_BITS 4
 
@@ -32,13 +32,13 @@
 };
 
 /* Generic description of a chip's write protection configuration. */
-struct flashrom_wp_cfg {
-        enum flashrom_wp_mode mode;
+struct flashprog_wp_cfg {
+        enum flashprog_wp_mode mode;
         struct wp_range range;
 };
 
 /* Collection of multiple write protection ranges. */
-struct flashrom_wp_ranges {
+struct flashprog_wp_ranges {
 	struct wp_range *ranges;
 	size_t count;
 };
@@ -75,15 +75,15 @@
 	uint8_t bp[MAX_BP_BITS];
 };
 
-struct flashrom_flashctx;
+struct flashprog_flashctx;
 
 /* Write WP configuration to the chip */
-enum flashrom_wp_result wp_write_cfg(struct flashrom_flashctx *, const struct flashrom_wp_cfg *);
+enum flashprog_wp_result wp_write_cfg(struct flashprog_flashctx *, const struct flashprog_wp_cfg *);
 
 /* Read WP configuration from the chip */
-enum flashrom_wp_result wp_read_cfg(struct flashrom_wp_cfg *, struct flashrom_flashctx *);
+enum flashprog_wp_result wp_read_cfg(struct flashprog_wp_cfg *, struct flashprog_flashctx *);
 
 /* Get a list of protection ranges supported by the chip */
-enum flashrom_wp_result wp_get_available_ranges(struct flashrom_wp_ranges **, struct flashrom_flashctx *);
+enum flashprog_wp_result wp_get_available_ranges(struct flashprog_wp_ranges **, struct flashprog_flashctx *);
 
 #endif /* !__WRITEPROTECT_H__ */