summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-09-12 07:53:05 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-09-12 07:53:05 +0200
commit9b1102c02bfd39352e0d2995c733edb7be3b0601 (patch)
tree3f089c640bab75c020b69f5dcf44d744a0a7f2e4 /fs
parentf48a1596f4e911d4516b986e4778f18321b39b48 (diff)
parenta10dbfc4175867c0d15f02b7f244837c5d41478e (diff)
downloadbarebox-9b1102c02bfd39352e0d2995c733edb7be3b0601.tar.gz
Merge branch 'for-next/misc'
Diffstat (limited to 'fs')
-rw-r--r--fs/fat/ff.c2
-rw-r--r--fs/omap4_usbbootfs.c41
-rw-r--r--fs/pstore/platform.c29
3 files changed, 30 insertions, 42 deletions
diff --git a/fs/fat/ff.c b/fs/fat/ff.c
index ba4adfc..4d30433 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 169cde7..4f15921 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 0a6fa38..15c0174 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;