flash_write.c (0297e5b82ea1bf8b151f8208c5f28a121d82eb4c) flash_write.c (68a24c9ea5ce11c87fab22a3f4648c7d88c98fee)
1// SPDX-License-Identifier: Apache-2.0
2// Copyright (C) 2018 IBM Corp.
3
4#include <assert.h>
5#include <mtd/mtd-abi.h>
6#include <stdio.h>
7#include <stdlib.h>
8#include <string.h>

--- 23 unchanged lines hidden (view full) ---

32 return NULL;
33
34 return tmp->path;
35}
36
37#define MEM_SIZE 3
38#define ERASE_SIZE 1
39
1// SPDX-License-Identifier: Apache-2.0
2// Copyright (C) 2018 IBM Corp.
3
4#include <assert.h>
5#include <mtd/mtd-abi.h>
6#include <stdio.h>
7#include <stdlib.h>
8#include <string.h>

--- 23 unchanged lines hidden (view full) ---

32 return NULL;
33
34 return tmp->path;
35}
36
37#define MEM_SIZE 3
38#define ERASE_SIZE 1
39
40int ioctl(int fd, unsigned long request, ...)
40int ioctl(int fd __attribute__((unused)), unsigned long request, ...)
41{
42 va_list ap;
43
44 if (request != MEMGETINFO)
45 return -1;
46
47 struct mtd_info_user *info;
48

--- 5 unchanged lines hidden (view full) ---

54
55 return 0;
56}
57
58int main(void)
59{
60 struct mbox_context _context, *context = &_context;
61 struct backend *backend = &context->backend;
41{
42 va_list ap;
43
44 if (request != MEMGETINFO)
45 return -1;
46
47 struct mtd_info_user *info;
48

--- 5 unchanged lines hidden (view full) ---

54
55 return 0;
56}
57
58int main(void)
59{
60 struct mbox_context _context, *context = &_context;
61 struct backend *backend = &context->backend;
62 char src[MEM_SIZE];
62 uint8_t src[MEM_SIZE];
63 uint8_t *map;
64 int rc;
65
66 atexit(cleanup);
67
68 mbox_vlog = &mbox_log_console;
69
70 rc = backend_probe_mtd(backend, get_dev_mtd());

--- 39 unchanged lines hidden ---
63 uint8_t *map;
64 int rc;
65
66 atexit(cleanup);
67
68 mbox_vlog = &mbox_log_console;
69
70 rc = backend_probe_mtd(backend, get_dev_mtd());

--- 39 unchanged lines hidden ---