Skip to content

Commit

Permalink
Use zigimports to remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbaur committed Feb 12, 2025
1 parent 2b56135 commit ee35d1c
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 18 deletions.
2 changes: 0 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const std = @import("std");
const log = std.log;
const builtin = @import("builtin");

pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(
Expand Down
6 changes: 0 additions & 6 deletions src/boot/disk.zig
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
const std = @import("std");
const posix = std.posix;
const system = std.posix.system;
const MS = std.os.linux.MS;

const linux_headers = @import("linux_headers");

const BootLoader = @import("./bootloader.zig");
const Device = @import("../device.zig");
const Filesystem = @import("../disk/filesystem.zig");
Expand Down Expand Up @@ -225,9 +222,6 @@ fn _entryLoaded(self: *@This(), ctx: *anyopaque) !void {
}
}

const random_bytes_count = 12;
const sub_path_len = std.fs.base64_encoder.calcSize(random_bytes_count);

const mountpath = "mount";

fn mount(self: *DiskBootLoader, fstype: Filesystem.Type, path: []const u8) !void {
Expand Down
5 changes: 0 additions & 5 deletions src/console.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ const std = @import("std");
const posix = std.posix;
const process = std.process;

const linux_headers = @import("linux_headers");

const BootLoader = @import("./boot/bootloader.zig");
const Device = @import("./device.zig");
const system = @import("./system.zig");

const esc = std.ascii.control_code.esc;
Expand All @@ -26,8 +23,6 @@ pub const Event = enum {

const Console = @This();

const CONSOLE = "/dev/char/5:1";

pub const IN = posix.STDIN_FILENO;

const NON_WORD_CHARS = std.ascii.whitespace ++ [_]u8{ '.', ';', ',' };
Expand Down
1 change: 0 additions & 1 deletion src/kobject.zig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const std = @import("std");
const posix = std.posix;

const Device = @import("./device.zig");
const DeviceWatcher = @import("./watch.zig");
Expand Down
1 change: 0 additions & 1 deletion src/tboot-loader.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const linux_headers = @import("linux_headers");
const Autoboot = @import("./autoboot.zig");
const BootLoader = @import("./boot/bootloader.zig");
const Console = @import("./console.zig");
const Device = @import("./device.zig");
const DeviceWatcher = @import("./watch.zig");
const DiskBootLoader = @import("./boot/disk.zig");
const Log = @import("./log.zig");
Expand Down
1 change: 0 additions & 1 deletion src/utils.zig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const std = @import("std");
const posix = std.posix;

pub fn enumFromStr(T: anytype, value: []const u8) !T {
inline for (std.meta.fields(T)) |field| {
Expand Down
1 change: 0 additions & 1 deletion src/watch.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const std = @import("std");
const posix = std.posix;
const path = std.fs.path;
const epoll_event = std.os.linux.epoll_event;

const Device = @import("./device.zig");
Expand Down
1 change: 0 additions & 1 deletion src/ymodem.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const posix = std.posix;
const Crc16Xmodem = std.hash.crc.Crc16Xmodem;
const Progress = std.Progress;

const linux_headers = @import("linux_headers");
const system = @import("./system.zig");

const clap = @import("clap");
Expand Down

0 comments on commit ee35d1c

Please sign in to comment.