Clarifies that the sector is only read and not modified.

Signed-off-by: Michael Adler <[email protected]>
---
 tools/fat.c | 5 +++--
 tools/fat.h | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/fat.c b/tools/fat.c
index f2cc12a..0ff0f64 100644
--- a/tools/fat.c
+++ b/tools/fat.c
@@ -66,7 +66,8 @@ static inline int fat_valid_media(u8 media)
 }
 
 static int fat_read_bpb(void __attribute__((unused)) *sb,
-       struct fat_boot_sector *b, int silent, struct fat_bios_param_block *bpb)
+       const struct fat_boot_sector *b, int silent,
+       struct fat_bios_param_block *bpb)
 {
        int error = -EINVAL;
 
@@ -146,7 +147,7 @@ out:
  /* end of Linux kernel code */
  
/*****************************************************************************/
 
-int determine_FAT_bits(struct fat_boot_sector *sector)
+int determine_FAT_bits(const struct fat_boot_sector *sector)
 {
        struct fat_bios_param_block bpb;
        if (fat_read_bpb(NULL, sector, !verbosity, &bpb)) {
diff --git a/tools/fat.h b/tools/fat.h
index 4e77757..8c991ab 100644
--- a/tools/fat.h
+++ b/tools/fat.h
@@ -22,4 +22,4 @@
  * to ensure it is a valid FAT boot sector. If the provided boot sector is not 
valid or an error
  * occurs during the determination process, the function returns a value less 
than or equal to 0.
  */
-int determine_FAT_bits(struct fat_boot_sector *sector);
+int determine_FAT_bits(const struct fat_boot_sector *sector);
-- 
2.41.0

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/20230817115625.334613-2-michael.adler%40siemens.com.

Reply via email to