backend.c (8cef63e3a3652b25f6a310800c1e0bf09aeed4c6) | backend.c (68a24c9ea5ce11c87fab22a3f4648c7d88c98fee) |
---|---|
1// SPDX-License-Identifier: Apache-2.0 2// Copyright (C) 2018 IBM Corp. 3// Copyright (C) 2018 Evan Lojewski. 4 5#define _GNU_SOURCE 6#include <assert.h> 7#include <errno.h> 8#include <fcntl.h> --- 21 unchanged lines hidden (view full) --- 30#include "backend.h" 31#include "lpc.h" 32#include "mboxd.h" 33 34#define MIN(__x__, __y__) (((__x__) < (__y__)) ? (__x__) : (__y__)) 35 36#define FILE_ERASE_SIZE (4 * 1024) 37 | 1// SPDX-License-Identifier: Apache-2.0 2// Copyright (C) 2018 IBM Corp. 3// Copyright (C) 2018 Evan Lojewski. 4 5#define _GNU_SOURCE 6#include <assert.h> 7#include <errno.h> 8#include <fcntl.h> --- 21 unchanged lines hidden (view full) --- 30#include "backend.h" 31#include "lpc.h" 32#include "mboxd.h" 33 34#define MIN(__x__, __y__) (((__x__) < (__y__)) ? (__x__) : (__y__)) 35 36#define FILE_ERASE_SIZE (4 * 1024) 37 |
38#pragma GCC diagnostic push 39#pragma GCC diagnostic ignored "-Wpointer-arith" 40 |
|
38struct file_data { 39 int fd; 40}; 41 42static int file_dev_init(struct backend *backend, void *data) 43{ 44 struct mtd_info_user info; 45 const char *path = data; --- 230 unchanged lines hidden (view full) --- 276{ 277 struct backend with; 278 279 assert(master); 280 with = backend_get_file(); 281 282 return backend_init(master, &with, (void *)path); 283} | 41struct file_data { 42 int fd; 43}; 44 45static int file_dev_init(struct backend *backend, void *data) 46{ 47 struct mtd_info_user info; 48 const char *path = data; --- 230 unchanged lines hidden (view full) --- 279{ 280 struct backend with; 281 282 assert(master); 283 with = backend_get_file(); 284 285 return backend_init(master, &with, (void *)path); 286} |
287 288#pragma GCC diagnostic pop |
|