Skip to content

Commit ebfe317

Browse files
enkileereddevillg
authored andcommitted
Signed-off-by: enkilee <jeffrey0122@163.com>
fix some typo errors to make code stronger
1 parent 2a71865 commit ebfe317

10 files changed

Lines changed: 21 additions & 21 deletions

File tree

apps/uab/header/src/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ int runAppLoader(const std::vector<std::string_view> &loaderArgs) noexcept
473473
return -1;
474474
}
475475

476-
std::cout << "This UAB is not support for runnning" << std::endl;
476+
std::cout << "This UAB is not support for running" << std::endl;
477477
return 0;
478478
}
479479

@@ -525,7 +525,7 @@ int runAppLoader(const std::vector<std::string_view> &loaderArgs) noexcept
525525
}
526526

527527
if (WIFSIGNALED(status)) {
528-
// maybe we runnning under a shell
528+
// maybe we running under a shell
529529
return 128 + WTERMSIG(status);
530530
}
531531

@@ -696,7 +696,7 @@ int main(int argc, char **argv)
696696
const bool onlyApp = metaInfo.onlyApp.value_or(false);
697697

698698
if (!onlyApp) {
699-
std::cout << "This UAB is not support for runnning" << std::endl;
699+
std::cout << "This UAB is not support for running" << std::endl;
700700
return 0;
701701
}
702702

apps/uab/loader/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,6 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv) // NOLINT
627627
return WTERMSIG(wstatus) + 128;
628628
}
629629

630-
std::cerr << "unknow exit status" << std::endl;
630+
std::cerr << "unknown exit status" << std::endl;
631631
return -1;
632632
}

docs/pages/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# NOTICE
22

3-
Theses files will automatically sync to another github repo [linglong-homepage](https://github.com/OpenAtom-Linyaps/linyaps-doc) by github action.
3+
These files will automatically sync to another github repo [linglong-homepage](https://github.com/OpenAtom-Linyaps/linyaps-doc) by github action.

libs/linglong/src/linglong/cli/cli.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ int Cli::run(const RunOptions &options)
680680
commands = filePathMapping(commands, options);
681681

682682
// this lambda will dump reference of containerID, app, base and runtime to
683-
// /run/linglong/getuid()/getpid() to store these needed infomation
683+
// /run/linglong/getuid()/getpid() to store these needed information
684684
auto dumpContainerInfo = [&pidFile, &runContext, this]() -> bool {
685685
LINGLONG_TRACE("dump info")
686686
std::error_code ec;
@@ -1782,7 +1782,7 @@ int Cli::content(const ContentOptions &options)
17821782
LogE("failed to check symlink {}: {}", file.c_str(), ec.message());
17831783
}
17841784

1785-
// Dont't mapping the file under /home
1785+
// Don't mapping the file under /home
17861786
if (auto tmp = target.string(); tmp.rfind("/home/", 0) == 0) {
17871787
return target;
17881788
}
@@ -1812,7 +1812,7 @@ int Cli::content(const ContentOptions &options)
18121812
std::vector<std::string> Cli::filePathMapping(const std::vector<std::string> &command,
18131813
const RunOptions &options) const noexcept
18141814
{
1815-
// FIXME: couldn't handel command like 'll-cli run org.xxx.yyy --file f1 f2 f3 org.xxx.yyy %%F'
1815+
// FIXME: couldn't handle command like 'll-cli run org.xxx.yyy --file f1 f2 f3 org.xxx.yyy %%F'
18161816
// can't distinguish the boundary of command , need validate the command arguments in the future
18171817

18181818
std::vector<std::string> execArgs;
@@ -1858,7 +1858,7 @@ std::vector<std::string> Cli::filePathMapping(const std::vector<std::string> &co
18581858
continue;
18591859
}
18601860

1861-
LogW("unkown command argument {}", arg);
1861+
LogW("unknown command argument {}", arg);
18621862
}
18631863

18641864
return execArgs;

libs/linglong/src/linglong/package/architecture.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ std::string Architecture::toString() const noexcept
4040
return "mips64";
4141
case RISCV64:
4242
return "riscv64";
43-
case UNKNOW:
43+
case UNKNOWN:
4444
[[fallthrough]];
4545
default:
4646
return "unknown";
@@ -50,7 +50,7 @@ std::string Architecture::toString() const noexcept
5050
std::string Architecture::getTriplet() const noexcept
5151
{
5252
switch (this->v) {
53-
case UNKNOW:
53+
case UNKNOWN:
5454
return "unknown";
5555
case X86_64:
5656
return "x86_64-linux-gnu";
@@ -109,7 +109,7 @@ Architecture::Architecture(const std::string &raw)
109109
return RISCV64;
110110
}
111111

112-
throw std::runtime_error("unknow architecture");
112+
throw std::runtime_error("unknown architecture");
113113
}())
114114
{
115115
}

libs/linglong/src/linglong/package/architecture.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Architecture
1818
{
1919
public:
2020
enum Value : uint8_t {
21-
UNKNOW,
21+
UNKNOWN,
2222
X86_64,
2323
ARM64,
2424
LOONGARCH64,
@@ -28,7 +28,7 @@ class Architecture
2828
MIPS64,
2929
};
3030

31-
explicit Architecture(Value value = UNKNOW);
31+
explicit Architecture(Value value = UNKNOWN);
3232
explicit Architecture(const std::string &raw);
3333

3434
/**

libs/linglong/src/linglong/package_manager/package_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ PackageManager::getAllRunningContainers() noexcept
260260
return LINGLONG_ERR(fmt::format("failed to get state of {}", procDir), ec);
261261
}
262262

263-
LogI("ignore {} because corrsponding process is not found",
263+
LogI("ignore {} because corresponding process is not found",
264264
process_entry.path().c_str());
265265
continue;
266266
}

libs/linglong/tests/ll-tests/src/linglong/package/architecture_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ constexpr const char *INVALID_ARCHITECTURE_STRINGS[] = {
3737
};
3838

3939
// 错误消息常量
40-
constexpr auto ERROR_UNKNOWN_ARCHITECTURE = "unknow architecture";
40+
constexpr auto ERROR_UNKNOWN_ARCHITECTURE = "unknown architecture";
4141

4242
TEST(Package, ArchitectureToString)
4343
{
@@ -135,8 +135,8 @@ TEST(Package, ArchitectureDefaultConstruction)
135135
{
136136
// 测试默认构造
137137
Architecture defaultArch;
138-
EXPECT_EQ(defaultArch.toString(), "unknown"); // UNKNOW
139-
EXPECT_EQ(defaultArch.getTriplet(), "unknown"); // unknow
138+
EXPECT_EQ(defaultArch.toString(), "unknown"); // UNKNOWN
139+
EXPECT_EQ(defaultArch.getTriplet(), "unknown"); // UNKNOWN
140140
}
141141

142142
TEST(Package, ArchitectureCurrentCPUArchitecture)

libs/linglong/tests/ll-tests/src/linglong/package/version_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
using namespace linglong::package;
1212

13-
TEST(Packge, Version)
13+
TEST(Package, Version)
1414
{
1515
// 1.0.0.0 > 1.0.0+security.1 > 1.0.0 > 1.0.0-alpha
1616
EXPECT_GT(Version::parse("1.0.0.0").value(), Version::parse("1.0.0+security.1").value());
1717
EXPECT_GT(Version::parse("1.0.0.0").value(), Version::parse("1.0.0").value());
18-
EXPECT_GT(Version::parse("1.0.0.0").value(), Version::parse("1.0.0-aplha").value());
18+
EXPECT_GT(Version::parse("1.0.0.0").value(), Version::parse("1.0.0-alpha").value());
1919
EXPECT_GT(Version::parse("1.0.0+security.1").value(), Version::parse("1.0.0").value());
2020
EXPECT_GT(Version::parse("1.0.0+security.1").value(), Version::parse("1.0.0-alpha").value());
2121
// 1.0.0-alpha < 1.0.0-beta < 1.0.0 = 1.0.0+zbuild < 1.0.0+security.1 < 1.0.0+security.2

libs/linglong/tests/ll-tests/src/linglong/utils/file_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ TEST_F(FileTest, EnsureDirectory)
272272
EXPECT_TRUE(result.has_value());
273273
EXPECT_TRUE(fs::is_directory(file_path));
274274

275-
// Test with mutiple layer directory
275+
// Test with multiple layer directory
276276
fs::path multiple_dir = dest_dir / "multiple_dir" / "sub_dir";
277277
result = linglong::utils::ensureDirectory(multiple_dir);
278278
ASSERT_TRUE(result.has_value());

0 commit comments

Comments
 (0)