diff options
| author | Alejandro Soto <alejandro@34project.org> | 2021-12-29 06:11:24 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2021-12-29 06:11:42 -0600 |
| commit | 36e6ca83518c5afec980561ae9dbd6bdf4118420 (patch) | |
| tree | edc0fda0d2ee148d0dc90e1c7307d38068427986 /examples | |
| parent | 95ae1b7cfaa92ac0fc10a362ed9cdd29a37b0781 (diff) | |
Refactor FsInfo API
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/ext2.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/examples/ext2.rs b/examples/ext2.rs index 3a68eee..4c62a3f 100644 --- a/examples/ext2.rs +++ b/examples/ext2.rs @@ -330,17 +330,17 @@ impl Ext2 { let total_inodes = self.superblock.s_inodes_count as u64; let free_inodes = self.superblock.s_free_inodes_count as u64; - reply.info( - FsInfo::default() - .blocks( - self.block_size() as u32, - total_blocks, - free_blocks, - available_blocks, - ) - .inodes(total_inodes, free_inodes) - .filenames(255), - ) + let info = FsInfo::default() + .blocks( + self.block_size() as u32, + total_blocks, + free_blocks, + available_blocks, + ) + .inodes(total_inodes, free_inodes) + .max_filename(255); + + reply.info(&info) } async fn getattr<'o>(&self, (request, reply): Op<'o, Getattr>) -> Done<'o> { |
