From f817f7d9ac14f799d50d80ee837266c636403d6d Mon Sep 17 00:00:00 2001 From: beveloper Date: Tue, 3 Sep 2002 01:28:31 +0000 Subject: [PATCH] convert int into status_t git-svn-id: file:///srv/svn/repos/haiku/trunk/current@971 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/drivers/common/null.c | 33 +++++++++++++++-------- src/add-ons/kernel/drivers/common/zero.c | 34 +++++++++++++++--------- 2 files changed, 44 insertions(+), 23 deletions(-) diff --git a/src/add-ons/kernel/drivers/common/null.c b/src/add-ons/kernel/drivers/common/null.c index acb8bafca1..0b3fa243e7 100644 --- a/src/add-ons/kernel/drivers/common/null.c +++ b/src/add-ons/kernel/drivers/common/null.c @@ -12,43 +12,51 @@ #define DEVICE_NAME "null" -static int null_open(const char *name, uint32 flags, void * *cookie) +static status_t +null_open(const char *name, uint32 flags, void * *cookie) { *cookie = NULL; return 0; } -static int null_close(void * cookie) +static status_t +null_close(void * cookie) { return 0; } -static int null_freecookie(void * cookie) +static status_t +null_freecookie(void * cookie) { return 0; } -static int null_ioctl(void * cookie, uint32 op, void *buf, size_t len) +static status_t +null_ioctl(void * cookie, uint32 op, void *buf, size_t len) { return EPERM; } -static ssize_t null_read(void * cookie, off_t pos, void *buf, size_t *len) +static ssize_t +null_read(void * cookie, off_t pos, void *buf, size_t *len) { return 0; } -static ssize_t null_write(void * cookie, off_t pos, const void *buf, size_t *len) +static ssize_t +null_write(void * cookie, off_t pos, const void *buf, size_t *len) { return 0; } -status_t init_hardware() +status_t +init_hardware() { return 0; } -const char **publish_devices(void) +const char ** +publish_devices(void) { static const char *devices[] = { DEVICE_NAME, @@ -58,7 +66,8 @@ const char **publish_devices(void) return devices; } -device_hooks *find_device(const char *name) +device_hooks * +find_device(const char *name) { static device_hooks hooks = { &null_open, @@ -82,12 +91,14 @@ device_hooks *find_device(const char *name) return NULL; } -status_t init_driver() +status_t +init_driver() { return 0; } -void uninit_driver() +void +uninit_driver() { } diff --git a/src/add-ons/kernel/drivers/common/zero.c b/src/add-ons/kernel/drivers/common/zero.c index 71d5a8272a..8121e2bfe5 100644 --- a/src/add-ons/kernel/drivers/common/zero.c +++ b/src/add-ons/kernel/drivers/common/zero.c @@ -13,28 +13,33 @@ #define DEVICE_NAME "zero" -static int zero_open(const char *name, uint32 flags, void **cookie) +static status_t +zero_open(const char *name, uint32 flags, void **cookie) { *cookie = NULL; return 0; } -static int zero_close(void * cookie) +static status_t +zero_close(void * cookie) { return 0; } -static int zero_freecookie(void * cookie) +static status_t +zero_freecookie(void * cookie) { return 0; } -static int zero_ioctl(void * cookie, uint32 op, void *buf, size_t len) +static status_t +zero_ioctl(void * cookie, uint32 op, void *buf, size_t len) { return EPERM; } -static ssize_t zero_read(void * cookie, off_t pos, void *buf, size_t *len) +static ssize_t +zero_read(void * cookie, off_t pos, void *buf, size_t *len) { int rc; @@ -45,17 +50,20 @@ static ssize_t zero_read(void * cookie, off_t pos, void *buf, size_t *len) return 0; } -static ssize_t zero_write(void * cookie, off_t pos, const void *buf, size_t *len) +static ssize_t +zero_write(void * cookie, off_t pos, const void *buf, size_t *len) { return 0; } -status_t init_hardware() +status_t +init_hardware() { return 0; } -const char **publish_devices(void) +const char ** +publish_devices(void) { static const char *devices[] = { DEVICE_NAME, @@ -65,7 +73,8 @@ const char **publish_devices(void) return devices; } -device_hooks *find_device(const char *name) +device_hooks * +find_device(const char *name) { static device_hooks hooks = { &zero_open, @@ -89,13 +98,14 @@ device_hooks *find_device(const char *name) return NULL; } -status_t init_driver() +status_t +init_driver() { return 0; } -void uninit_driver() +void +uninit_driver() { } -