From 006399dc8d5983037d1ac5a7b9d81a0bdc117143 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 13 Jul 2023 10:25:14 +0200 Subject: mod: restructure module layout --- mod/include/cyber_device.h | 13 +++++++++---- mod/include/cyber_file.h | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'mod/include') diff --git a/mod/include/cyber_device.h b/mod/include/cyber_device.h index 1da9e37..884b54a 100644 --- a/mod/include/cyber_device.h +++ b/mod/include/cyber_device.h @@ -25,7 +25,7 @@ /** * This structure holds information about the CYBER device */ -extern struct cyber_device +typedef struct { /** * The kernel character device structure @@ -47,16 +47,21 @@ extern struct cyber_device */ dev_t number; -} device; + /** + * Cyber space! + */ + char * space; + +} cyber_device; /** * Initialize the CYBER device */ -int cyber_device_init(void); +int cyber_device_init(cyber_device * device, struct file_operations const * file_ops); /** * Deinitialize the CYBER device */ -void cyber_device_shutdown(void); +void cyber_device_shutdown(cyber_device * device); #endif diff --git a/mod/include/cyber_file.h b/mod/include/cyber_file.h index eb12cce..c4eea70 100644 --- a/mod/include/cyber_file.h +++ b/mod/include/cyber_file.h @@ -25,7 +25,7 @@ * * @return zero on success, non-zero otherwise */ -int cyber_file_init(void); +int cyber_file_init(struct file_operations * file_ops); /** * Shutdown the CYBER file -- cgit v1.2.3