register_driver: fix driver modes accross the code

State of problem:
 - Some drivers that do not support write operations (does not
   have write handler or ioctl do not perform any write actions)
   are registered with write permissions
 - Some drivers that do not support read operation (does not
   have read handler or ioctl do not perform any read actions)
   are registered with read permissions
 - Some drivers are registered with execute permissions

Solution:
 - Iterate code where register_driver() is used and change 'mode'
   parameter to reflect the actual read/write operations executed
   by a driver
 - Remove execute permissions from 'mode' parameter

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko
2022-01-26 14:52:09 +02:00
committed by Xiang Xiao
parent 1d89d9ae4b
commit 41c95da594
35 changed files with 141 additions and 102 deletions
+5 -5
View File
@@ -226,16 +226,16 @@ struct geometry
struct partition_info_s
{
size_t numsectors; /* Number of sectors in the partition */
size_t sectorsize; /* Size in bytes of a single sector */
off_t startsector; /* Offset to the first section/block of the
* managed sub-region */
size_t numsectors; /* Number of sectors in the partition */
size_t sectorsize; /* Size in bytes of a single sector */
off_t startsector; /* Offset to the first section/block of the
* managed sub-region */
/* NULL-terminated string representing the name of the parent node of the
* partition.
*/
char parent[NAME_MAX + 1];
char parent[NAME_MAX + 1];
};
/* This structure is provided by block devices when they register with the