2 * Copyright 2002-2006, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
6 * Distributed under the terms of the NewOS License.
14 #define DEVICE_NAME "null"
16 int32 api_version
= B_CUR_DRIVER_API_VERSION
;
20 null_open(const char *name
, uint32 flags
, void **cookie
)
28 null_close(void *cookie
)
35 null_freecookie(void *cookie
)
42 null_ioctl(void *cookie
, uint32 op
, void *buffer
, size_t length
)
49 null_read(void *cookie
, off_t pos
, void *buffer
, size_t *_length
)
57 null_write(void *cookie
, off_t pos
, const void *buffer
, size_t *_length
)
76 static const char *devices
[] = {
86 find_device(const char *name
)
88 static device_hooks hooks
= {
95 /* Leave select/deselect/readv/writev undefined. The kernel will
96 * use its own default implementation. The basic hooks above this
97 * line MUST be defined, however. */
104 if (!strcmp(name
, DEVICE_NAME
))