Deleted Added
full compact
ofw_disk.c (236579) ofw_disk.c (298230)
1/*-
2 * Copyright (C) 2000 Benno Rice.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
1/*-
2 * Copyright (C) 2000 Benno Rice.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27__FBSDID("$FreeBSD: head/sys/boot/ofw/libofw/ofw_disk.c 236579 2012-06-04 20:45:33Z marius $");
27__FBSDID("$FreeBSD: head/sys/boot/ofw/libofw/ofw_disk.c 298230 2016-04-18 23:09:22Z allanjude $");
28
29/*
30 * Disk I/O routines using Open Firmware
31 */
32
33#include <sys/param.h>
34
35#include <netinet/in.h>
36
37#include <machine/stdarg.h>
38
39#include <stand.h>
40
41#include "bootstrap.h"
42#include "libofw.h"
43
44static int ofwd_init(void);
45static int ofwd_strategy(void *devdata, int flag, daddr_t dblk,
28
29/*
30 * Disk I/O routines using Open Firmware
31 */
32
33#include <sys/param.h>
34
35#include <netinet/in.h>
36
37#include <machine/stdarg.h>
38
39#include <stand.h>
40
41#include "bootstrap.h"
42#include "libofw.h"
43
44static int ofwd_init(void);
45static int ofwd_strategy(void *devdata, int flag, daddr_t dblk,
46 size_t size, char *buf, size_t *rsize);
46 size_t offset, size_t size, char *buf, size_t *rsize);
47static int ofwd_open(struct open_file *f, ...);
48static int ofwd_close(struct open_file *f);
49static int ofwd_ioctl(struct open_file *f, u_long cmd, void *data);
50static void ofwd_print(int verbose);
51
52struct devsw ofwdisk = {
53 "block",
54 DEVT_DISK,

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

78static int
79ofwd_init(void)
80{
81
82 return (0);
83}
84
85static int
47static int ofwd_open(struct open_file *f, ...);
48static int ofwd_close(struct open_file *f);
49static int ofwd_ioctl(struct open_file *f, u_long cmd, void *data);
50static void ofwd_print(int verbose);
51
52struct devsw ofwdisk = {
53 "block",
54 DEVT_DISK,

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

78static int
79ofwd_init(void)
80{
81
82 return (0);
83}
84
85static int
86ofwd_strategy(void *devdata, int flag __unused, daddr_t dblk, size_t size,
87 char *buf, size_t *rsize)
86ofwd_strategy(void *devdata, int flag __unused, daddr_t dblk, size_t offset,
87 size_t size, char *buf, size_t *rsize)
88{
89 struct ofw_devdesc *dp = (struct ofw_devdesc *)devdata;
90 daddr_t pos;
91 int n;
92
93 if (dp != kdp) {
94 if (kdp != NULL) {
95#if !defined(__powerpc__)

--- 73 unchanged lines hidden ---
88{
89 struct ofw_devdesc *dp = (struct ofw_devdesc *)devdata;
90 daddr_t pos;
91 int n;
92
93 if (dp != kdp) {
94 if (kdp != NULL) {
95#if !defined(__powerpc__)

--- 73 unchanged lines hidden ---