[flashrom] [commit] r1730 - trunk
repository service
svn at flashrom.org
Fri Aug 30 23:29:45 CEST 2013
Author: stefanct
Date: Fri Aug 30 23:29:45 2013
New Revision: 1730
URL: http://flashrom.org/trac/flashrom/changeset/1730
Log:
libpayload: Remove file I/O in flashrom.c.
read_buf_from_file() and write_buf_to_file() use file streams which are
not supported in libpayload.
Signed-off-by: Nico Huber <nico.huber at secunet.com>
Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
Modified:
trunk/flashrom.c
Modified: trunk/flashrom.c
==============================================================================
--- trunk/flashrom.c Thu Aug 29 15:15:36 2013 (r1729)
+++ trunk/flashrom.c Fri Aug 30 23:29:45 2013 (r1730)
@@ -1166,6 +1166,10 @@
int read_buf_from_file(unsigned char *buf, unsigned long size,
const char *filename)
{
+#ifdef __LIBPAYLOAD__
+ msg_gerr("Error: No file I/O support in libpayload\n");
+ return 1;
+#else
unsigned long numbytes;
FILE *image;
struct stat image_stat;
@@ -1196,11 +1200,16 @@
return 1;
}
return 0;
+#endif
}
int write_buf_to_file(unsigned char *buf, unsigned long size,
const char *filename)
{
+#ifdef __LIBPAYLOAD__
+ msg_gerr("Error: No file I/O support in libpayload\n");
+ return 1;
+#else
unsigned long numbytes;
FILE *image;
@@ -1221,6 +1230,7 @@
return 1;
}
return 0;
+#endif
}
int read_flash_to_file(struct flashctx *flash, const char *filename)
More information about the flashrom
mailing list