pmt: revert 7f8090b
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
/* By YZBruh */
|
||||
|
||||
/**
|
||||
* Copyright 2024 Partition Manager
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if __has_include("config.h")
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <mntent.h>
|
||||
|
||||
ssize_t getrandom(void* buf, size_t buflen, unsigned int flags);
|
||||
int getentropy(void* buf, size_t buflen);
|
||||
char* _Nullable hasmntopt(const struct mntent* mnt, const char* opt);
|
||||
void* _Nullable reallocarray(void* ptr, size_t count, size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -7,7 +7,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -19,84 +19,81 @@
|
||||
#pragma once
|
||||
|
||||
/* annotated macros */
|
||||
#define DeprecatedOption 1
|
||||
#define ChangedOption 2
|
||||
#define EndDeprcationPoint 0
|
||||
#define NotChanged 0
|
||||
#define NotChangedLong nullptr
|
||||
#define DeprecatedOption 1
|
||||
#define ChangedOption 2
|
||||
#define EndDeprcationPoint 0
|
||||
#define NotChanged 0
|
||||
#define NotChangedLong nullptr
|
||||
|
||||
/* version table */
|
||||
#define v150 "1.5.0"
|
||||
#define v160 "1.6.0"
|
||||
#define v170 "1.7.0"
|
||||
#define v180 "1.8.0"
|
||||
#define v190 "1.9.0"
|
||||
#define v200 "2.0.0"
|
||||
#define v210 "2.1.0"
|
||||
#define v220 "2.2.0"
|
||||
#define v230 "2.3.0"
|
||||
#define v240 "2.4.0"
|
||||
#define v250 "2.5.0"
|
||||
#define v260 "2.6.0"
|
||||
#define v270 "2.7.0"
|
||||
#define v280 "2.8.0"
|
||||
#define v290 "2.9.0"
|
||||
#define v291 "2.9.1"
|
||||
#define v296 "2.9.6"
|
||||
#define v302 "3.0.2"
|
||||
/* versions */
|
||||
#define v150 "1.5.0"
|
||||
#define v160 "1.6.0"
|
||||
#define v170 "1.7.0"
|
||||
#define v180 "1.8.0"
|
||||
#define v190 "1.9.0"
|
||||
#define v200 "2.0.0"
|
||||
#define v210 "2.1.0"
|
||||
#define v220 "2.2.0"
|
||||
#define v230 "2.3.0"
|
||||
#define v240 "2.4.0"
|
||||
#define v250 "2.5.0"
|
||||
#define v260 "2.6.0"
|
||||
#define v270 "2.7.0"
|
||||
#define v280 "2.8.0"
|
||||
#define v290 "2.9.0"
|
||||
#define v291 "2.9.1"
|
||||
#define v296 "2.9.6"
|
||||
#define vUNKNOWN nullptr
|
||||
|
||||
struct DeprecationVarTab {
|
||||
const int DeprecationType;
|
||||
const int Option;
|
||||
const int Option_new;
|
||||
const char* Option_long;
|
||||
const char* Option_long_new;
|
||||
const char* DeprecatedOnVersion;
|
||||
const int DeprecationType;
|
||||
const int Option;
|
||||
const int Option_new;
|
||||
const char* Option_long;
|
||||
const char* Option_long_new;
|
||||
const char* DeprecatedOnVersion;
|
||||
};
|
||||
|
||||
static struct DeprecationVarTab DeprecationTable[] = {
|
||||
{DeprecatedOption, 'b', NotChanged, "backup", NotChangedLong, v210},
|
||||
{DeprecatedOption, 'F', NotChanged, "flash", NotChangedLong, v210},
|
||||
{DeprecatedOption, 'r', NotChanged, "format", NotChangedLong, v210},
|
||||
{DeprecatedOption, 'L', NotChanged, "license", NotChangedLong, v250},
|
||||
{ChangedOption, 'D', 'p', "list", NotChangedLong, v210},
|
||||
{ChangedOption, 'c', 'P', "context", "search-path", v290},
|
||||
{EndDeprcationPoint, NotChanged, NotChanged, NotChangedLong, NotChanged, vUNKNOWN}
|
||||
{DeprecatedOption, 'b', NotChanged, "backup", NotChangedLong, v210},
|
||||
{DeprecatedOption, 'F', NotChanged, "flash", NotChangedLong, v210},
|
||||
{DeprecatedOption, 'r', NotChanged, "format", NotChangedLong, v210},
|
||||
{DeprecatedOption, 'L', NotChanged, "license", NotChangedLong, v250},
|
||||
{ChangedOption, 'D', 'p', "list", NotChangedLong, v210},
|
||||
{ChangedOption, 'c', 'P', "context", "search-path", v290},
|
||||
{EndDeprcationPoint, NotChanged, NotChanged, NotChangedLong, NotChanged, vUNKNOWN}
|
||||
};
|
||||
|
||||
static void
|
||||
__process_deprecated_opts(int Opt, const string& OptionLong, const char* DeprecationMsg)
|
||||
{
|
||||
string LongErrMsg = (OptionLong.empty()) ? PartitionManager::Display::UsingDispString->not_changed_opt : OptionLong;
|
||||
string LongErrMsg = (OptionLong.empty()) ? PartitionManager::Display::UsingDispString->not_changed_opt : OptionLong;
|
||||
|
||||
for (int optctrl = 0; DeprecationTable[optctrl].DeprecationType != 0; optctrl++)
|
||||
{
|
||||
for (int optctrl = 0; DeprecationTable[optctrl].DeprecationType != 0; optctrl++)
|
||||
{
|
||||
|
||||
if (DeprecationTable[optctrl].DeprecationType == 1)
|
||||
{
|
||||
if (Opt == DeprecationTable[optctrl].Option
|
||||
|| strcmp(OptionLong.c_str(), DeprecationTable[optctrl].Option_long) == 0)
|
||||
LOGD("%s [%s]: -%c (%s): %s\n",
|
||||
PartitionManager::Display::UsingDispString->depr_opt_str,
|
||||
DeprecationTable[optctrl].DeprecatedOnVersion,
|
||||
(char)DeprecationTable[optctrl].Option,
|
||||
DeprecationTable[optctrl].Option_long,
|
||||
DeprecationMsg); exit(1);
|
||||
}
|
||||
else if (DeprecationTable[optctrl].DeprecationType == 2)
|
||||
{
|
||||
if (Opt == DeprecationTable[optctrl].Option
|
||||
|| strcmp(OptionLong.c_str(), DeprecationTable[optctrl].Option_long) == 0)
|
||||
LOGD("%s [%s]: -%c (%s): %s\n",
|
||||
PartitionManager::Display::UsingDispString->switched_opt_str,
|
||||
DeprecationTable[optctrl].DeprecatedOnVersion,
|
||||
(char)DeprecationTable[optctrl].Option,
|
||||
LongErrMsg.c_str(),
|
||||
DeprecationMsg); exit(1);
|
||||
}
|
||||
if (DeprecationTable[optctrl].DeprecationType == 1)
|
||||
{
|
||||
if (Opt == DeprecationTable[optctrl].Option || strcmp(OptionLong.c_str(), DeprecationTable[optctrl].Option_long) == 0)
|
||||
LOGD("%s [%s]: -%c (%s): %s\n",
|
||||
PartitionManager::Display::UsingDispString->depr_opt_str,
|
||||
DeprecationTable[optctrl].DeprecatedOnVersion,
|
||||
(char)DeprecationTable[optctrl].Option,
|
||||
DeprecationTable[optctrl].Option_long,
|
||||
DeprecationMsg); exit(1);
|
||||
}
|
||||
else if (DeprecationTable[optctrl].DeprecationType == 2)
|
||||
{
|
||||
if (Opt == DeprecationTable[optctrl].Option || strcmp(OptionLong.c_str(), DeprecationTable[optctrl].Option_long) == 0)
|
||||
LOGD("%s [%s]: -%c (%s): %s\n",
|
||||
PartitionManager::Display::UsingDispString->switched_opt_str,
|
||||
DeprecationTable[optctrl].DeprecatedOnVersion,
|
||||
(char)DeprecationTable[optctrl].Option,
|
||||
LongErrMsg.c_str(),
|
||||
DeprecationMsg); exit(1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define DEPR_HANDLE __process_deprecated_opts
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
/* By YZBruh */
|
||||
|
||||
/**
|
||||
* Copyright 2024 Partition Manager
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace PartitionManager {
|
||||
// Config base
|
||||
struct LanguageConfigs {
|
||||
string Name; // name of language. e.g.: "en"
|
||||
string ExName;
|
||||
struct langdb_general* LanguageStructure; // structure of language
|
||||
struct langdb_docs* LanguageDocStructure; // structure of language (for docs)
|
||||
};
|
||||
|
||||
// Used config by pmt
|
||||
struct LanguageConfigs LanguageConfig[] {
|
||||
{"en", "English", &Display::LangEn, &Display::LangDocEn},
|
||||
{"tr", "Türkçe", &Display::LangTr, &Display::LangDocTr}
|
||||
};
|
||||
|
||||
// Default
|
||||
struct langdb_general* Display::UsingDispString = nullptr;
|
||||
}
|
||||
|
||||
/* end of code */
|
||||
@@ -1,25 +0,0 @@
|
||||
/* By YZBruh */
|
||||
|
||||
/**
|
||||
* Copyright 2024 Partition Manager
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
extern "C" int parted_main(int argc, char* argv[]);
|
||||
extern volatile int set_ret;
|
||||
extern volatile int parted_ret;
|
||||
|
||||
/* end of code */
|
||||
@@ -7,7 +7,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -19,78 +19,70 @@
|
||||
#pragma once
|
||||
|
||||
#if !defined(__clang__) && !defined(__NDK_BUILD)
|
||||
#error "Your compiler is NOT clang. Please build with (LLVM) clang."
|
||||
#error "Your compiler is NOT clang. Please build with (LLVM) clang."
|
||||
#endif
|
||||
|
||||
#if INC_MAIN_LIBS
|
||||
#include <iostream>
|
||||
#include <stdbool.h>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include <cstdarg>
|
||||
#if IS_MAIN
|
||||
#include <clocale>
|
||||
#endif
|
||||
#if !defined(HELP_CPP) || !defined(VERSION_CPP)
|
||||
#include <cstdlib>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <fstream>
|
||||
#endif
|
||||
#ifdef INC_MAIN_LIBS
|
||||
#include <iostream>
|
||||
#include <stdbool.h>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include <cstdarg>
|
||||
#ifdef IS_MAIN
|
||||
#include <clocale>
|
||||
#endif
|
||||
#if !defined(HELP) || !defined(VERSIONING)
|
||||
#include <cstdlib>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <fstream>
|
||||
#endif
|
||||
#endif
|
||||
#if INC_STRINGKEYS
|
||||
#include <PartitionManager/StringKeys.h>
|
||||
#ifdef INC_STRINGKEYS
|
||||
#include <PartitionManager/StringKeys.h>
|
||||
#endif
|
||||
#if INC_DIRENT
|
||||
#include <dirent.h>
|
||||
#ifdef INC_DIRENT
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#if INC_STAT
|
||||
#include <sys/stat.h>
|
||||
#ifdef INC_STAT
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#if INC_DEBUGERS
|
||||
#include <cerrno>
|
||||
#ifdef INC_DEBUGERS
|
||||
#include <cerrno>
|
||||
#endif
|
||||
#if INC_TOOLS_REQS
|
||||
#include <sys/vfs.h>
|
||||
#ifdef INC_TOOLS_REQS
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
#if INC_LIBGEN
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
#if INC_PTHREAD
|
||||
#include <pthread.h>
|
||||
#ifdef INC_LIBGEN
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
/* logging levels */
|
||||
typedef enum {
|
||||
LOG_LEVEL_FATAL,
|
||||
LOG_LEVEL_ERROR,
|
||||
LOG_LEVEL_WARN,
|
||||
LOG_LEVEL_DEBUG
|
||||
LOG_LEVEL_FATAL,
|
||||
LOG_LEVEL_ERROR,
|
||||
LOG_LEVEL_WARN,
|
||||
LOG_LEVEL_DEBUG
|
||||
} LogLevel;
|
||||
|
||||
/* config structure */
|
||||
struct Configuration {
|
||||
/* general boolean tab */
|
||||
bool UseLogical;
|
||||
bool UseCustomSearchPath;
|
||||
bool UsesSlots;
|
||||
bool UsesLogical;
|
||||
bool SilentEnabled;
|
||||
bool FlashMode;
|
||||
bool BackupMode;
|
||||
bool FormatMode;
|
||||
bool PartedMode;
|
||||
bool PartSizeViewMode;
|
||||
bool PartUtilMode;
|
||||
bool ForceMode;
|
||||
bool VerboseMode;
|
||||
bool InstalledOnTermux;
|
||||
|
||||
/* part-size argument bools */
|
||||
bool OnlyViewSize;
|
||||
bool UseLogical;
|
||||
bool UseCustomSearchPath;
|
||||
bool UsesSlots;
|
||||
bool UsesLogical;
|
||||
bool OnlyViewSize;
|
||||
bool SilentEnabled;
|
||||
bool FlashMode;
|
||||
bool BackupMode;
|
||||
bool FormatMode;
|
||||
bool PartSizeViewMode;
|
||||
bool ForceMode;
|
||||
bool VerboseMode;
|
||||
bool InstalledOnTermux;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -111,66 +103,61 @@ extern struct Configuration Config;
|
||||
|
||||
/* create a special namespace */
|
||||
namespace PartitionManager {
|
||||
namespace Strings {
|
||||
extern string OutputName;
|
||||
extern string CustomSearchPath;
|
||||
extern string TargetPartition;
|
||||
extern string TargetFlashFile;
|
||||
extern string TargetFormatFS;
|
||||
extern string PartitionType;
|
||||
extern string Device;
|
||||
extern string ExecutingName;
|
||||
extern string CurrentLanguage;
|
||||
} /* namespace Strings */
|
||||
namespace Strings {
|
||||
extern string OutputName;
|
||||
extern string CustomSearchPath;
|
||||
extern string TargetPartition;
|
||||
extern string TargetFlashFile;
|
||||
extern string TargetFormatFS;
|
||||
extern string PartitionType;
|
||||
extern string ExecutingName;
|
||||
extern string CurrentLanguage;
|
||||
} /* namespace Strings */
|
||||
|
||||
namespace Integers {
|
||||
extern int PartSizeViewType;
|
||||
} /* namespace Integers */
|
||||
namespace Integers {
|
||||
extern int PartSizeViewType;
|
||||
} /* namespace Integers */
|
||||
|
||||
namespace Display {
|
||||
extern struct langdb_general* UsingDispString;
|
||||
extern struct langdb_docs* UsingDocDispString;
|
||||
extern struct langdb_general LangEn;
|
||||
extern struct langdb_general LangTr;
|
||||
extern struct langdb_docs LangDocEn;
|
||||
extern struct langdb_docs LangDocTr;
|
||||
} /* namespace Display */
|
||||
namespace Display {
|
||||
extern struct langdb_general* UsingDispString;
|
||||
extern struct langdb_docs* UsingDocDispString;
|
||||
extern struct langdb_general LangEn;
|
||||
extern struct langdb_general LangTr;
|
||||
extern struct langdb_docs LangDocEn;
|
||||
extern struct langdb_docs LangDocTr;
|
||||
} /* namespace Display */
|
||||
|
||||
/* functions */
|
||||
int ListPartitions(void);
|
||||
int GetState(const string& filepath, const string& stype = "file");
|
||||
int PartitionManagerMain(const ushort_t& progress_code);
|
||||
int StartParted(void);
|
||||
void SetLanguage(const string& lang, ushort_t null_conf_stat);
|
||||
void DisplaySupportedLanguages(void);
|
||||
void DisplayLog(LogLevel LogPriority, const char* fmt, ...);
|
||||
void DisplayVerboseLog(LogLevel LogPriority, const char* func, const int& line, const char* fmt, ...);
|
||||
void CheckDevPoint(void);
|
||||
void CheckRoot(void);
|
||||
bool CleanSWPoint(void);
|
||||
bool LoadLanguage(void);
|
||||
bool SearchDevice(const string& DevicePath);
|
||||
bool SearchDefaultDevices(void);
|
||||
/* functions */
|
||||
int ListPartitions(void);
|
||||
int GetState(const string& filepath, const string& stype = "file");
|
||||
int PartitionManagerMain(const ushort_t& progress_code);
|
||||
void SetLanguage(const string& lang, ushort_t null_conf_stat);
|
||||
void DisplayLog(LogLevel LogPriority, const char* fmt, ...);
|
||||
void DisplayVerboseLog(LogLevel LogPriority, const char* func, const int& line, const char* fmt, ...);
|
||||
void CheckDevPoint(void);
|
||||
void CheckRoot(void);
|
||||
bool CleanSWPoint(void);
|
||||
bool LoadLanguage(void);
|
||||
} /* namespace PartitionManager */
|
||||
|
||||
/* logging macros */
|
||||
#define LOGF(fmt, ...) \
|
||||
((void)PartitionManager::DisplayLog(LOG_LEVEL_FATAL, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
((void)PartitionManager::DisplayLog(LOG_LEVEL_FATAL, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
#define LOGE(fmt, ...) \
|
||||
((void)PartitionManager::DisplayLog(LOG_LEVEL_ERROR, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
((void)PartitionManager::DisplayLog(LOG_LEVEL_ERROR, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
#define LOGW(fmt, ...) \
|
||||
((void)PartitionManager::DisplayLog(LOG_LEVEL_WARN, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
((void)PartitionManager::DisplayLog(LOG_LEVEL_WARN, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
#define LOGD(fmt, ...) \
|
||||
((void)PartitionManager::DisplayLog(LOG_LEVEL_DEBUG, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
((void)PartitionManager::DisplayLog(LOG_LEVEL_DEBUG, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
|
||||
/* verbose logging macros */
|
||||
#define VLOGF(fmt, ...) \
|
||||
((void)PartitionManager::DisplayVerboseLog(LOG_LEVEL_FATAL, __func__, __LINE__, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
((void)PartitionManager::DisplayVerboseLog(LOG_LEVEL_FATAL, __func__, __LINE__, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
#define VLOGE(fmt, ...) \
|
||||
((void)PartitionManager::DisplayVerboseLog(LOG_LEVEL_ERROR, __func__, __LINE__, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
((void)PartitionManager::DisplayVerboseLog(LOG_LEVEL_ERROR, __func__, __LINE__, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
#define VLOGW(fmt, ...) \
|
||||
((void)PartitionManager::DisplayVerboseLog(LOG_LEVEL_WARN, __func__, __LINE__, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
((void)PartitionManager::DisplayVerboseLog(LOG_LEVEL_WARN, __func__, __LINE__, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
#define VLOGD(fmt, ...) \
|
||||
((void)PartitionManager::DisplayVerboseLog(LOG_LEVEL_DEBUG, __func__, __LINE__, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
((void)PartitionManager::DisplayVerboseLog(LOG_LEVEL_DEBUG, __func__, __LINE__, (fmt)__VA_OPT__(, ) __VA_ARGS__))
|
||||
|
||||
/* end of code */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -20,121 +20,113 @@
|
||||
|
||||
/* The struct is a very good option for setting the languages of texts etc. */
|
||||
struct langdb_general {
|
||||
const char* _Nonnull lang_by_s;
|
||||
const char* _Nonnull language;
|
||||
const char* _Nonnull lang_prefix;
|
||||
const char* _Nonnull not_logical;
|
||||
const char* _Nonnull not_file;
|
||||
const char* _Nonnull not_dir;
|
||||
const char* _Nonnull not_in_dev;
|
||||
const char* _Nonnull not_open;
|
||||
const char* _Nonnull not_block;
|
||||
const char* _Nonnull not_read;
|
||||
const char* _Nonnull not_readdir;
|
||||
const char* _Nonnull not_write;
|
||||
const char* _Nonnull not_gen;
|
||||
const char* _Nonnull no_root;
|
||||
const char* _Nonnull expected_backup_arg;
|
||||
const char* _Nonnull expected_flash_arg;
|
||||
const char* _Nonnull expected_format_arg;
|
||||
const char* _Nonnull expected_partsz_arg;
|
||||
const char* _Nonnull expected_partutil_arg;
|
||||
const char* _Nonnull missing_operand;
|
||||
const char* _Nonnull multiple_wiewers;
|
||||
const char* _Nonnull symbol_rule;
|
||||
const char* _Nonnull req_part_name;
|
||||
const char* _Nonnull part_not_found;
|
||||
const char* _Nonnull unsupported_fs;
|
||||
const char* _Nonnull cannot_stat;
|
||||
const char* _Nonnull ffile_more_part;
|
||||
const char* _Nonnull cannot_get_bsz;
|
||||
const char* _Nonnull format_fail;
|
||||
const char* _Nonnull fail_get_psize;
|
||||
const char* _Nonnull depr_backup_opt;
|
||||
const char* _Nonnull depr_flash_opt;
|
||||
const char* _Nonnull depr_format_opt;
|
||||
const char* _Nonnull depr_Vlicense_opt;
|
||||
const char* _Nonnull depr_ch_list_opt;
|
||||
const char* _Nonnull depr_ch_sp_opt;
|
||||
const char* _Nonnull not_spec_opt;
|
||||
const char* _Nonnull some_spec;
|
||||
const char* _Nonnull logical_warn;
|
||||
const char* _Nonnull ab_warn;
|
||||
const char* _Nonnull out_not_spec;
|
||||
const char* _Nonnull no_found_on_process;
|
||||
const char* _Nonnull please_rerun;
|
||||
const char* _Nonnull part_disk_sz;
|
||||
const char* _Nonnull flash_file_sz;
|
||||
const char* _Nonnull part_disk_sz_fail;
|
||||
const char* _Nonnull flash_file_sz_fail;
|
||||
const char* _Nonnull found_defdevice;
|
||||
const char* _Nonnull cannot_find_any_defdevice;
|
||||
const char* _Nonnull cannot_find_device;
|
||||
const char* _Nonnull not_spec_device_on_args;
|
||||
const char* _Nonnull starting_parted;
|
||||
const char* _Nonnull exited_with;
|
||||
const char* _Nonnull unknown_opr;
|
||||
const char* _Nonnull req_an_arg;
|
||||
const char* _Nonnull list_of_general;
|
||||
const char* _Nonnull list_of_logc;
|
||||
const char* _Nonnull success_backup;
|
||||
const char* _Nonnull success_flash;
|
||||
const char* _Nonnull success_format;
|
||||
const char* _Nonnull formatting;
|
||||
const char* _Nonnull warn;
|
||||
const char* _Nonnull fatal;
|
||||
const char* _Nonnull is_requires_arg;
|
||||
const char* _Nonnull only_partsz_args;
|
||||
const char* _Nonnull unknw_arg;
|
||||
const char* _Nonnull switching_lang;
|
||||
const char* _Nonnull welcome;
|
||||
const char* _Nullable welcome_;
|
||||
const char* _Nonnull for_more;
|
||||
const char* _Nonnull s_and_v;
|
||||
const char* _Nonnull try_h;
|
||||
const char* _Nonnull usage_head;
|
||||
const char* _Nonnull depr_opt_str;
|
||||
const char* _Nonnull switched_opt_str;
|
||||
const char* _Nonnull not_changed_opt;
|
||||
const char* _Nonnull compiler_str;
|
||||
const char* _Nonnull version_str;
|
||||
const char* _Nonnull bin_str;
|
||||
const char* _Nonnull part_name;
|
||||
const char* _Nonnull part_type;
|
||||
const char* _Nonnull fs_str;
|
||||
const char* _Nonnull unknw_str;
|
||||
const char* _Nonnull by_str;
|
||||
const char* _Nonnull yes;
|
||||
const char* _Nonnull no;
|
||||
const char* _Nonnull lang_by_s;
|
||||
const char* _Nonnull language;
|
||||
const char* _Nonnull lang_prefix;
|
||||
const char* _Nonnull not_logical;
|
||||
const char* _Nonnull not_file;
|
||||
const char* _Nonnull not_dir;
|
||||
const char* _Nonnull not_in_dev;
|
||||
const char* _Nonnull not_open;
|
||||
const char* _Nonnull not_block;
|
||||
const char* _Nonnull not_read;
|
||||
const char* _Nonnull not_readdir;
|
||||
const char* _Nonnull not_write;
|
||||
const char* _Nonnull not_gen;
|
||||
const char* _Nonnull no_root;
|
||||
const char* _Nonnull expected_backup_arg;
|
||||
const char* _Nonnull expected_flash_arg;
|
||||
const char* _Nonnull expected_format_arg;
|
||||
const char* _Nonnull expected_partsz_arg;
|
||||
const char* _Nonnull missing_operand;
|
||||
const char* _Nonnull multiple_wiewers;
|
||||
const char* _Nonnull symbol_rule;
|
||||
const char* _Nonnull req_part_name;
|
||||
const char* _Nonnull part_not_found;
|
||||
const char* _Nonnull unsupported_fs;
|
||||
const char* _Nonnull cannot_stat;
|
||||
const char* _Nonnull ffile_more_part;
|
||||
const char* _Nonnull cannot_get_bsz;
|
||||
const char* _Nonnull format_fail;
|
||||
const char* _Nonnull fail_get_psize;
|
||||
const char* _Nonnull depr_backup_opt;
|
||||
const char* _Nonnull depr_flash_opt;
|
||||
const char* _Nonnull depr_format_opt;
|
||||
const char* _Nonnull depr_Vlicense_opt;
|
||||
const char* _Nonnull depr_ch_list_opt;
|
||||
const char* _Nonnull depr_ch_sp_opt;
|
||||
const char* _Nonnull not_spec_opt;
|
||||
const char* _Nonnull some_spec;
|
||||
const char* _Nonnull logical_warn;
|
||||
const char* _Nonnull ab_warn;
|
||||
const char* _Nonnull out_not_spec;
|
||||
const char* _Nonnull no_found_on_process;
|
||||
const char* _Nonnull please_rerun;
|
||||
const char* _Nonnull part_disk_sz;
|
||||
const char* _Nonnull flash_file_sz;
|
||||
const char* _Nonnull part_disk_sz_fail;
|
||||
const char* _Nonnull flash_file_sz_fail;
|
||||
const char* _Nonnull unknown_opr;
|
||||
const char* _Nonnull req_an_arg;
|
||||
const char* _Nonnull list_of_general;
|
||||
const char* _Nonnull list_of_logc;
|
||||
const char* _Nonnull success_backup;
|
||||
const char* _Nonnull success_flash;
|
||||
const char* _Nonnull success_format;
|
||||
const char* _Nonnull formatting;
|
||||
const char* _Nonnull warn;
|
||||
const char* _Nonnull fatal;
|
||||
const char* _Nonnull is_requires_arg;
|
||||
const char* _Nonnull only_partsz_args;
|
||||
const char* _Nonnull unknw_arg;
|
||||
const char* _Nonnull switching_lang;
|
||||
const char* _Nonnull welcome;
|
||||
const char* _Nullable welcome_;
|
||||
const char* _Nonnull for_more;
|
||||
const char* _Nonnull s_and_v;
|
||||
const char* _Nonnull try_h;
|
||||
const char* _Nonnull usage_head;
|
||||
const char* _Nonnull depr_opt_str;
|
||||
const char* _Nonnull switched_opt_str;
|
||||
const char* _Nonnull not_changed_opt;
|
||||
const char* _Nonnull compiler_str;
|
||||
const char* _Nonnull version_str;
|
||||
const char* _Nonnull bin_str;
|
||||
const char* _Nonnull part_name;
|
||||
const char* _Nonnull part_type;
|
||||
const char* _Nonnull fs_str;
|
||||
const char* _Nonnull unknw_str;
|
||||
const char* _Nonnull by_str;
|
||||
const char* _Nonnull yes;
|
||||
const char* _Nonnull no;
|
||||
};
|
||||
|
||||
/* docs etc. */
|
||||
struct langdb_docs {
|
||||
const char* _Nonnull docs_strs_l1;
|
||||
const char* _Nonnull docs_strs_l2;
|
||||
const char* _Nonnull docs_strs_l3;
|
||||
const char* _Nonnull docs_strs_l4;
|
||||
const char* _Nonnull docs_strs_l5;
|
||||
const char* _Nonnull docs_strs_l6;
|
||||
const char* _Nonnull docs_strs_l7;
|
||||
const char* _Nonnull docs_strs_l8;
|
||||
const char* _Nonnull docs_strs_l9;
|
||||
const char* _Nonnull docs_strs_l10;
|
||||
const char* _Nonnull docs_strs_l11;
|
||||
const char* _Nonnull docs_strs_l12;
|
||||
const char* _Nonnull docs_strs_l13;
|
||||
const char* _Nonnull docs_strs_l14;
|
||||
const char* _Nonnull docs_strs_l15;
|
||||
const char* _Nonnull docs_strs_l16;
|
||||
const char* _Nonnull docs_strs_l17;
|
||||
const char* _Nonnull docs_strs_l18;
|
||||
const char* _Nonnull docs_strs_l19;
|
||||
const char* _Nonnull docs_strs_l20;
|
||||
const char* _Nonnull docs_strs_l21;
|
||||
const char* _Nonnull docs_strs_l22;
|
||||
const char* _Nonnull docs_strs_l23;
|
||||
const char* _Nonnull or_str;
|
||||
const char* _Nonnull usage_docstr;
|
||||
const char* _Nonnull docs_strs_l1;
|
||||
const char* _Nonnull docs_strs_l2;
|
||||
const char* _Nonnull docs_strs_l3;
|
||||
const char* _Nonnull docs_strs_l4;
|
||||
const char* _Nonnull docs_strs_l5;
|
||||
const char* _Nonnull docs_strs_l6;
|
||||
const char* _Nonnull docs_strs_l7;
|
||||
const char* _Nonnull docs_strs_l8;
|
||||
const char* _Nonnull docs_strs_l9;
|
||||
const char* _Nonnull docs_strs_l10;
|
||||
const char* _Nonnull docs_strs_l11;
|
||||
const char* _Nonnull docs_strs_l12;
|
||||
const char* _Nonnull docs_strs_l13;
|
||||
const char* _Nonnull docs_strs_l14;
|
||||
const char* _Nonnull docs_strs_l15;
|
||||
const char* _Nonnull docs_strs_l16;
|
||||
const char* _Nonnull docs_strs_l17;
|
||||
const char* _Nonnull docs_strs_l18;
|
||||
const char* _Nonnull docs_strs_l19;
|
||||
const char* _Nonnull docs_strs_l20;
|
||||
const char* _Nonnull docs_strs_l21;
|
||||
const char* _Nonnull docs_strs_l22;
|
||||
const char* _Nonnull or_str;
|
||||
const char* _Nonnull usage_docstr;
|
||||
};
|
||||
|
||||
/* end of code */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -23,10 +23,12 @@
|
||||
#include <e2fsprogs/version.h>
|
||||
|
||||
/* versioning */
|
||||
#define PMT_MAJOR 3
|
||||
#define PMT_MINOR 0
|
||||
#define PMT_PATCHLEVEL 2
|
||||
#define PMT_MAJOR 2
|
||||
#define PMT_MINOR 9
|
||||
#define PMT_PATCHLEVEL 6
|
||||
|
||||
namespace PartitionManager { void DisplayVersion(void); }
|
||||
namespace PartitionManager {
|
||||
void DisplayVersion(void);
|
||||
}
|
||||
|
||||
/* end */
|
||||
|
||||
Reference in New Issue
Block a user