Skip to content

Commit

Permalink
Add comments and error checks to mem.
Browse files Browse the repository at this point in the history
  • Loading branch information
Galfurian committed Oct 25, 2024
1 parent 34b3e1d commit f5a4d9a
Show file tree
Hide file tree
Showing 2 changed files with 263 additions and 63 deletions.
10 changes: 8 additions & 2 deletions mentos/inc/drivers/mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@

#pragma once

/// @brief Initializes the memory devices.
/// @return 0 on success, 1 on error.
/// @brief Initializes memory devices and registers the null device.
///
/// @details This function creates the `/dev/null` device, registers the null
/// filesystem type, and mounts the null device to the virtual file system. If
/// any step fails, it logs the error and returns an appropriate error code.
///
/// @return 0 on success, -ENODEV if device creation fails, 1 if filesystem
/// registration or mounting fails.
int mem_devs_initialize(void);

/// @}
Expand Down
Loading

0 comments on commit f5a4d9a

Please sign in to comment.