| ... | ... | @@ -416,10 +416,12 @@ pub fn main() !void { |
| 416 | 416 | const reaction_set = rs: { |
| 417 | 417 | const gop = try w.dir_table.getOrPut(gpa, path); |
| 418 | 418 | if (!gop.found_existing) { |
| 419 | | try std.posix.fanotify_mark(w.fan_fd, .{ |
| 419 | std.posix.fanotify_mark(w.fan_fd, .{ |
| 420 | 420 | .ADD = true, |
| 421 | 421 | .ONLYDIR = true, |
| 422 | | }, Watch.fan_mask, path.root_dir.handle.fd, path.subPathOpt()); |
| 422 | }, Watch.fan_mask, path.root_dir.handle.fd, path.subPathOpt()) catch |err| { |
| 423 | fatal("unable to watch {}: {s}", .{ path, @errorName(err) }); |
| 424 | }; |
| 423 | 425 | |
| 424 | 426 | const dir_handle = try Watch.getDirHandle(gpa, path); |
| 425 | 427 | try w.handle_table.putNoClobber(gpa, dir_handle, .{}); |
| ... | ... | @@ -489,7 +491,7 @@ pub fn main() !void { |
| 489 | 491 | .revents = undefined, |
| 490 | 492 | }, |
| 491 | 493 | }; |
| 492 | | var caption_buf: [40]u8 = undefined; |
| 494 | var caption_buf: [std.Progress.Node.max_name_len]u8 = undefined; |
| 493 | 495 | const caption = std.fmt.bufPrint(&caption_buf, "Watching {d} Directories", .{ |
| 494 | 496 | w.dir_table.entries.len, |
| 495 | 497 | }) catch &caption_buf; |