Browse Source

put const qualified when needed

master
Mathieu Serandour 6 months ago
parent
commit
196732771b
  1. 8
      kernel/fs/fat32/fat32.c
  2. 4
      kernel/fs/fs.h

8
kernel/fs/fat32/fat32.c

@ -43,7 +43,7 @@ void fat32_unmount(fs_t* fs);
int fat32_read_file_sectors(
fs_t* restrict fs,
file_t* restrict fd,
const file_t* restrict fd,
void* restrict buf,
uint64_t begin,
size_t n
@ -51,7 +51,7 @@ int fat32_read_file_sectors(
int fat32_write_file_sectors(
fs_t* restrict fs,
file_t* restrict file,
const file_t* restrict file,
const void* restrict buf,
uint64_t begin,
size_t n
@ -1155,7 +1155,7 @@ cluster_t fetch_cluster(
int fat32_read_file_sectors(
fs_t* restrict fs,
file_t* restrict fd,
const file_t* restrict fd,
void* restrict buf,
uint64_t begin,
size_t n
@ -1235,7 +1235,7 @@ int fat32_read_file_sectors(
int fat32_write_file_sectors(
fs_t* restrict fs,
file_t* restrict fd,
const file_t* restrict fd,
const void* restrict buf,
uint64_t begin,
size_t n

4
kernel/fs/fs.h

@ -186,7 +186,7 @@ typedef struct fs {
* first sector to read
* @return int the number of read bytes.
*/
int (*read_file_sectors)(struct fs* restrict fs,file_t* restrict fd,
int (*read_file_sectors)(struct fs* restrict fs, const file_t* restrict fd,
void* restrict buf, uint64_t begin, size_t n);
@ -208,7 +208,7 @@ typedef struct fs {
* @param n amount of sectors to be written
* @return int the number of read bytes.
*/
int (*write_file_sectors)(struct fs* restrict fs, file_t* fd,
int (*write_file_sectors)(struct fs* restrict fs, const file_t* restrict fd,
const void* restrict buf, uint64_t begin, size_t n);

Loading…
Cancel
Save