authorgravatar for semarie@online.frSébastien Marie <semarie@online.fr> 2020-11-19 13:54:47+00:00
committergravatar for semarie@online.frSébastien Marie <semarie@online.fr> 2020-11-19 13:54:47+00:00
log7579ce180f2bf4b5da6ecca5db83af6789c2f576
tree9c0c690bf030189ced54cbb8b33d88810da32956
parentad2ff9e65d91bd04ca48a7aceee3931ab7b00652

Iterator: rename freebsd_entry to bsd_entry to reflect that nextBsd is not freebsd only


1 files changed, 4 insertions(+), 4 deletions(-)

lib/std/fs.zig+4-4
...@@ -393,17 +393,17 @@ pub const Dir = struct {...@@ -393,17 +393,17 @@ pub const Dir = struct {
393 self.index = 0;393 self.index = 0;
394 self.end_index = @intCast(usize, rc);394 self.end_index = @intCast(usize, rc);
395 }395 }
396 const freebsd_entry = @ptrCast(*align(1) os.dirent, &self.buf[self.index]);396 const bsd_entry = @ptrCast(*align(1) os.dirent, &self.buf[self.index]);
397 const next_index = self.index + freebsd_entry.reclen();397 const next_index = self.index + bsd_entry.reclen();
398 self.index = next_index;398 self.index = next_index;
399399
400 const name = @ptrCast([*]u8, &freebsd_entry.d_name)[0..freebsd_entry.d_namlen];400 const name = @ptrCast([*]u8, &bsd_entry.d_name)[0..bsd_entry.d_namlen];
401401
402 if (mem.eql(u8, name, ".") or mem.eql(u8, name, "..")) {402 if (mem.eql(u8, name, ".") or mem.eql(u8, name, "..")) {
403 continue :start_over;403 continue :start_over;
404 }404 }
405405
406 const entry_kind = switch (freebsd_entry.d_type) {406 const entry_kind = switch (bsd_entry.d_type) {
407 os.DT_BLK => Entry.Kind.BlockDevice,407 os.DT_BLK => Entry.Kind.BlockDevice,
408 os.DT_CHR => Entry.Kind.CharacterDevice,408 os.DT_CHR => Entry.Kind.CharacterDevice,
409 os.DT_DIR => Entry.Kind.Directory,409 os.DT_DIR => Entry.Kind.Directory,