summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/mach-sandbox/include/mach/linux.h
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2019-09-09 11:31:28 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-09-09 15:23:41 +0200
commit801b7cff0210fab83768847b2390f6821e95e2ab (patch)
tree621ef8dd5f2ea5834a26cd39322550b56e86b05d /arch/sandbox/mach-sandbox/include/mach/linux.h
parent29974c5147a21bd9744183136c88147731c14b49 (diff)
downloadbarebox-801b7cff0210fab83768847b2390f6821e95e2ab.tar.gz
barebox-801b7cff0210fab83768847b2390f6821e95e2ab.tar.xz
sandbox: hostfile: allow probing from device tree
When testing things like barebox state in sandbox, it's nice to be able to refer to a partition on a hostfile by phandle. Support this by checking for reading the barebox,filename property. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox/mach-sandbox/include/mach/linux.h')
-rw-r--r--arch/sandbox/mach-sandbox/include/mach/linux.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sandbox/mach-sandbox/include/mach/linux.h b/arch/sandbox/mach-sandbox/include/mach/linux.h
index 7d0ed55735..c344285473 100644
--- a/arch/sandbox/mach-sandbox/include/mach/linux.h
+++ b/arch/sandbox/mach-sandbox/include/mach/linux.h
@@ -10,6 +10,7 @@ struct fb_bitfield;
int linux_register_device(const char *name, void *start, void *end);
int tap_alloc(const char *dev);
uint64_t linux_get_time(void);
+int linux_open(const char *filename, int readwrite);
int linux_read(int fd, void *buf, size_t count);
int linux_read_nonblock(int fd, void *buf, size_t count);
ssize_t linux_write(int fd, const void *buf, size_t count);