diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-09-12 07:53:05 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-09-12 07:53:05 +0200 |
commit | 9b1102c02bfd39352e0d2995c733edb7be3b0601 (patch) | |
tree | 3f089c640bab75c020b69f5dcf44d744a0a7f2e4 /fs | |
parent | f48a1596f4e911d4516b986e4778f18321b39b48 (diff) | |
parent | a10dbfc4175867c0d15f02b7f244837c5d41478e (diff) | |
download | barebox-9b1102c02bfd39352e0d2995c733edb7be3b0601.tar.gz barebox-9b1102c02bfd39352e0d2995c733edb7be3b0601.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fat/ff.c | 2 | ||||
-rw-r--r-- | fs/omap4_usbbootfs.c | 41 | ||||
-rw-r--r-- | fs/pstore/platform.c | 29 |
3 files changed, 30 insertions, 42 deletions
diff --git a/fs/fat/ff.c b/fs/fat/ff.c index ba4adfc133..4d30433e5f 100644 --- a/fs/fat/ff.c +++ b/fs/fat/ff.c @@ -1538,7 +1538,7 @@ static enum filetype check_fs ( /* 0:The FAT BR, 1:Valid BR but not an FAT, 2:No DWORD *bootsec ) { - enum filetype ret; + DRESULT ret; /* Load boot record */ ret = disk_read(fs, fs->win, sect, 1); diff --git a/fs/omap4_usbbootfs.c b/fs/omap4_usbbootfs.c index 169cde7ddb..4f159210d1 100644 --- a/fs/omap4_usbbootfs.c +++ b/fs/omap4_usbbootfs.c @@ -29,39 +29,6 @@ struct file_priv { s32 id; u32 size; }; -/* -static int omap4_usbbootfs_create( - struct device_d *dev, const char *pathname, mode_t mode) -{ - return -ENOSYS; -} - -static int omap4_usbbootfs_unlink(struct device_d *dev, const char *pathname) -{ - return -ENOSYS; -} - -static int omap4_usbbootfs_mkdir(struct device_d *dev, const char *pathname) -{ - return -ENOSYS; -} - -static int omap4_usbbootfs_rmdir(struct device_d *dev, const char *pathname) -{ - return -ENOSYS; -} - -static int omap4_usbbootfs_write( - struct device_d *_dev, FILE *f, const void *inbuf, size_t size) -{ - return -ENOSYS; -} - -static int omap4_usbbootfs_truncate(struct device_d *dev, FILE *f, loff_t size) -{ - return -ENOSYS; -} -*/ static struct file_priv *omap4_usbbootfs_do_open( struct device_d *dev, int accmode, const char *filename) @@ -187,14 +154,6 @@ static struct fs_driver_d omap4_usbbootfs_driver = { .read = omap4_usbbootfs_read, .opendir = omap4_usbbootfs_opendir, .stat = omap4_usbbootfs_stat, -/* - .create = omap4_usbbootfs_create, - .unlink = omap4_usbbootfs_unlink, - .mkdir = omap4_usbbootfs_mkdir, - .rmdir = omap4_usbbootfs_rmdir, - .write = omap4_usbbootfs_write, - .truncate= omap4_usbbootfs_truncate, -*/ .flags = 0, .drv = { .probe = omap4_usbbootfs_probe, diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 0a6fa38edc..15c0174b1f 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -46,6 +46,35 @@ void pstore_set_kmsg_bytes(int bytes) static int pstore_ready; +static void pstore_console_write(const char *s, unsigned c) +{ + const char *e = s + c; + + while (s < e) { + struct pstore_record record = { + .type = PSTORE_TYPE_CONSOLE, + .psi = psinfo, + }; + + if (c > psinfo->bufsize) + c = psinfo->bufsize; + + record.buf = (char *)s; + record.size = c; + psinfo->write_buf(PSTORE_TYPE_CONSOLE, 0, &record.id, 0, + record.buf, 0, record.size, psinfo); + s += c; + c = e - s; + } +} + +static int pstore_console_puts(struct console_device *cdev, const char *s, + size_t nbytes) +{ + pstore_console_write(s, nbytes); + return nbytes; +} + void pstore_log(const char *str) { uint64_t id; |