[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH 4/6] lib/devfs: Tabify imported devfs code
According to Unikraft's coding style indents are under the form of tabs. The imported code used both spaces and tabs. This patch makes all indents to be use tabs. Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx> --- lib/devfs/devfs_vnops.c | 12 ++++----- lib/devfs/device.c | 10 ++++---- lib/vfscore/include/vfscore/device.h | 38 ++++++++++++++-------------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/lib/devfs/devfs_vnops.c b/lib/devfs/devfs_vnops.c index 1ec0d553..925179f3 100644 --- a/lib/devfs/devfs_vnops.c +++ b/lib/devfs/devfs_vnops.c @@ -67,7 +67,7 @@ #define DPRINTF(X) #endif -#define ASSERT(e) +#define ASSERT(e) static uint64_t inode_count = 1; /* inode 0 is reserved to root */ @@ -249,13 +249,13 @@ vop_eperm(void) int vop_erofs(void) { - return EROFS; + return EROFS; } int vfs_nullop(void) { - return 0; + return 0; } @@ -323,9 +323,9 @@ struct vfsops devfs_vfsops = { }; static struct vfscore_fs_type fs_devfs = { - .vs_name = "devfs", - .vs_init = NULL, - .vs_op = &devfs_vfsops, + .vs_name = "devfs", + .vs_init = NULL, + .vs_op = &devfs_vfsops, }; UK_FS_REGISTER(fs_devfs); diff --git a/lib/devfs/device.c b/lib/devfs/device.c index 50522076..372e3cb1 100644 --- a/lib/devfs/device.c +++ b/lib/devfs/device.c @@ -91,7 +91,7 @@ void device_register(struct device *dev, const char *name, int flags) { size_t len; void *priv = NULL; - + UK_ASSERT(dev->driver != NULL); /* Check the length of name. */ @@ -123,8 +123,8 @@ void device_register(struct device *dev, const char *name, int flags) dev->next = device_list; dev->max_io_size = UINT_MAX; device_list = dev; - - uk_mutex_unlock(&devfs_lock); + + uk_mutex_unlock(&devfs_lock); } @@ -154,8 +154,8 @@ device_create(struct driver *drv, const char *name, int flags) if ((dev = malloc(sizeof(struct device))) == NULL) UK_CRASH("device_create"); - dev->driver = drv; - device_register(dev, name, flags); + dev->driver = drv; + device_register(dev, name, flags); return dev; } diff --git a/lib/vfscore/include/vfscore/device.h b/lib/vfscore/include/vfscore/device.h index bcb33c33..bee57bb8 100644 --- a/lib/vfscore/include/vfscore/device.h +++ b/lib/vfscore/include/vfscore/device.h @@ -104,13 +104,13 @@ struct driver { */ typedef enum device_state { - DS_INACTIVE = 0x00, /* driver is inactive */ - DS_ALIVE = 0x01, /* probe succeded */ - DS_ACTIVE = 0x02, /* intialized */ - DS_DEBUG = 0x04, /* debug */ - DS_NOTPRESENT = 0x08, /* not probed or probe failed */ - DS_ATTACHING = 0x10, /* currently attaching */ - DS_ATTACHED = 0x20, /*attach method called */ + DS_INACTIVE = 0x00, /* driver is inactive */ + DS_ALIVE = 0x01, /* probe succeded */ + DS_ACTIVE = 0x02, /* intialized */ + DS_DEBUG = 0x04, /* debug */ + DS_NOTPRESENT = 0x08, /* not probed or probe failed */ + DS_ATTACHING = 0x10, /* currently attaching */ + DS_ATTACHED = 0x20, /*attach method called */ } device_state_t; /* @@ -183,24 +183,24 @@ static inline void device_quiet(device_t dev) static inline const char * devtoname(struct device *dev) { - return dev->name; + return dev->name; } -int device_open(const char *, int, struct device **); -int device_close(struct device *); -int device_read(struct device *, struct uio *, int); -int device_write(struct device *, struct uio *, int); -int device_ioctl(struct device *, u_long, void *); -int device_info(struct devinfo *); +int device_open(const char *, int, struct device **); +int device_close(struct device *); +int device_read(struct device *, struct uio *, int); +int device_write(struct device *, struct uio *, int); +int device_ioctl(struct device *, u_long, void *); +int device_info(struct devinfo *); -int bdev_read(struct device *dev, struct uio *uio, int ioflags); -int bdev_write(struct device *dev, struct uio *uio, int ioflags); +int bdev_read(struct device *dev, struct uio *uio, int ioflags); +int bdev_write(struct device *dev, struct uio *uio, int ioflags); -int enodev(void); -int nullop(void); +int enodev(void); +int nullop(void); void multiplex_strategy(struct bio *); -int physio(struct device *dev, struct uio *uio, int ioflags); +int physio(struct device *dev, struct uio *uio, int ioflags); struct device * device_create(struct driver *drv, const char *name, int flags); int device_destroy(struct device *dev); -- 2.20.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |