From 8ceacc04b89638c307910cb2282988410bcfb2bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 15 Jul 2022 08:11:05 +0300 Subject: [PATCH] rename turbo to turbonss --- README.md | 2 +- build.zig | 6 +++--- src/test_all.zig | 6 +++--- src/{turbo-analyze.zig => turbonss-analyze.zig} | 6 +++--- src/{turbo-getent.zig => turbonss-getent.zig} | 14 +++++++------- src/{turbo-unix2db.zig => turbonss-unix2db.zig} | 10 +++++----- 6 files changed, 22 insertions(+), 22 deletions(-) rename src/{turbo-analyze.zig => turbonss-analyze.zig} (97%) rename src/{turbo-getent.zig => turbonss-getent.zig} (96%) rename src/{turbo-unix2db.zig => turbonss-unix2db.zig} (97%) diff --git a/README.md b/README.md index 3c60dd3..953d9ad 100644 --- a/README.md +++ b/README.md @@ -393,7 +393,7 @@ Prepare `profile.data`: ``` zig build -Drelease-small=true && \ perf record --call-graph=dwarf \ - zig-out/bin/turbo-unix2db --passwd passwd2 --group group2 + zig-out/bin/turbonss-unix2db --passwd passwd2 --group group2 ``` Perf interactive: diff --git a/build.zig b/build.zig index 3143b47..540ea23 100644 --- a/build.zig +++ b/build.zig @@ -64,7 +64,7 @@ pub fn build(b: *zbs.Builder) void { bdz.addIncludeDir("include/deps/cmph"); { - const exe = b.addExecutable("turbo-unix2db", "src/turbo-unix2db.zig"); + const exe = b.addExecutable("turbonss-unix2db", "src/turbonss-unix2db.zig"); exe.strip = strip; exe.setTarget(target); exe.setBuildMode(mode); @@ -73,7 +73,7 @@ pub fn build(b: *zbs.Builder) void { } { - const exe = b.addExecutable("turbo-analyze", "src/turbo-analyze.zig"); + const exe = b.addExecutable("turbonss-analyze", "src/turbonss-analyze.zig"); exe.strip = strip; exe.setTarget(target); exe.setBuildMode(mode); @@ -81,7 +81,7 @@ pub fn build(b: *zbs.Builder) void { } { - const exe = b.addExecutable("turbo-getent", "src/turbo-getent.zig"); + const exe = b.addExecutable("turbonss-getent", "src/turbonss-getent.zig"); exe.strip = strip; exe.linkLibC(); exe.linkLibrary(bdz); diff --git a/src/test_all.zig b/src/test_all.zig index 28bd44e..e22d532 100644 --- a/src/test_all.zig +++ b/src/test_all.zig @@ -16,7 +16,7 @@ test "turbonss test suite" { _ = @import("validate.zig"); // main - _ = @import("turbo-getent.zig"); - _ = @import("turbo-unix2db.zig"); - _ = @import("turbo-analyze.zig"); + _ = @import("turbonss-getent.zig"); + _ = @import("turbonss-unix2db.zig"); + _ = @import("turbonss-analyze.zig"); } diff --git a/src/turbo-analyze.zig b/src/turbonss-analyze.zig similarity index 97% rename from src/turbo-analyze.zig rename to src/turbonss-analyze.zig index 9c8d90e..f6041a7 100644 --- a/src/turbo-analyze.zig +++ b/src/turbonss-analyze.zig @@ -19,7 +19,7 @@ const Header = @import("header.zig").Header; const section_length_bits = @import("header.zig").section_length_bits; const usage = - \\usage: turbo-analyze [OPTION]... + \\usage: turbonss-analyze [OPTION]... \\ \\Arguments: \\ Path to the database (default: /etc/turbonss/db.turbo) @@ -159,7 +159,7 @@ fn execute( const testing = std.testing; -test "turbo-analyze trivial error: db file" { +test "turbonss-analyze trivial error: db file" { const args = &[_][*:0]const u8{"/does/not/exist.turbo"}; const allocator = testing.allocator; var stderr = ArrayList(u8).init(allocator); @@ -190,7 +190,7 @@ fn splitInt(n: u64) BoundedArray(u8, max_len) { return result; } -test "turbo-analyze separators" { +test "turbonss-analyze separators" { const tests = [_]struct { input: u64, want: []const u8, diff --git a/src/turbo-getent.zig b/src/turbonss-getent.zig similarity index 96% rename from src/turbo-getent.zig rename to src/turbonss-getent.zig index b127485..bae2fab 100644 --- a/src/turbo-getent.zig +++ b/src/turbonss-getent.zig @@ -16,12 +16,12 @@ const User = @import("User.zig"); const Mode = enum { group, passwd }; const usage = - \\usage: turbo-getent [OPTION]... group|passwd [key...] + \\usage: turbonss-getent [OPTION]... group|passwd [key...] \\ \\ -h Print this help message and exit - \\ --db=PATH Path to the database (default: /etc/turbonss/db.turbo) + \\ --db PATH Path to the database (default: /etc/turbonss/db.turbo) \\ - \\turbo-getent resolves group or passwd (a.k.a. user) entries from the + \\turbonss-getent resolves group or passwd (a.k.a. user) entries from the \\database file. If one or more key arguments are provided, then only \\entries that match the supplied keys will be displayed. If no key is \\provided, all entries will be displayed. @@ -194,7 +194,7 @@ fn printGroup(stdout: anytype, db: *const DB, g: *const PackedGroup) ?u8 { const testing = std.testing; -test "turbo-getent passwd" { +test "turbonss-getent passwd" { var tf = try File.TestDB.init(testing.allocator); defer tf.deinit(); var stdout = ArrayList(u8).init(testing.allocator); @@ -224,7 +224,7 @@ test "turbo-getent passwd" { } } -test "turbo-getent passwdAll" { +test "turbonss-getent passwdAll" { var tf = try File.TestDB.init(testing.allocator); defer tf.deinit(); var stdout = ArrayList(u8).init(testing.allocator); @@ -259,7 +259,7 @@ test "turbo-getent passwdAll" { } } -test "turbo-getent group" { +test "turbonss-getent group" { var tf = try File.TestDB.init(testing.allocator); defer tf.deinit(); var stdout = ArrayList(u8).init(testing.allocator); @@ -290,7 +290,7 @@ test "turbo-getent group" { } } -test "turbo-getent groupAll" { +test "turbonss-getent groupAll" { var tf = try File.TestDB.init(testing.allocator); defer tf.deinit(); var stdout = ArrayList(u8).init(testing.allocator); diff --git a/src/turbo-unix2db.zig b/src/turbonss-unix2db.zig similarity index 97% rename from src/turbo-unix2db.zig rename to src/turbonss-unix2db.zig index d0107f2..cd5c9fc 100644 --- a/src/turbo-unix2db.zig +++ b/src/turbonss-unix2db.zig @@ -15,7 +15,7 @@ const DB = @import("DB.zig"); const ErrCtx = @import("ErrCtx.zig"); const usage = - \\usage: turbo-unix2db [options] + \\usage: turbonss-unix2db [options] \\ \\ -h Print this help message and exit \\ --passwd Path to passwd file (default: passwd) @@ -129,7 +129,7 @@ fn fail(errc: *ErrCtx, stderr: anytype, err: anytype) u8 { const testing = std.testing; -test "turbo-unix2db invalid argument" { +test "turbonss-unix2db invalid argument" { const allocator = testing.allocator; const args = &[_][*:0]const u8{"--invalid-argument"}; var stderr = ArrayList(u8).init(allocator); @@ -146,7 +146,7 @@ test "turbo-unix2db invalid argument" { )); } -test "turbo-unix2db trivial error: missing passwd file" { +test "turbonss-unix2db trivial error: missing passwd file" { const allocator = testing.allocator; const args = &[_][*:0]const u8{}; var stderr = ArrayList(u8).init(allocator); @@ -159,7 +159,7 @@ test "turbo-unix2db trivial error: missing passwd file" { try testing.expectEqualStrings(stderr.items, "ERROR FileNotFound: open 'passwd'\n"); } -test "turbo-unix2db fail" { +test "turbonss-unix2db fail" { var errc = ErrCtx{}; var buf = ArrayList(u8).init(testing.allocator); defer buf.deinit(); @@ -169,7 +169,7 @@ test "turbo-unix2db fail" { try testing.expectEqualStrings(buf.items, "ERROR NotSure: invalid user 'foo'\n"); } -test "turbo-unix2db smoke test" { +test "turbonss-unix2db smoke test" { const allocator = testing.allocator; var stderr = ArrayList(u8).init(allocator); defer stderr.deinit();