/*
This is a list of all features that are supported by this version of Pakfire
*/
-static const struct pakfire_feature {
- const char* name;
-} features[] = {
- { "RichDependencies" },
+static const char* features[] = {
+ "RichDependencies",
// Package Formats
- { "PackageFormat-6" },
- { "PackageFormat-5" },
+ "PackageFormat-6",
+ "PackageFormat-5",
// Compression
- { "Compress-XZ" },
- { "Compress-Zstandard" },
+ "Compress-XZ",
+ "Compress-Zstandard",
// Digests
- { "Digest-BLAKE2b512" },
- { "Digest-BLAKE2s256" },
- { "Digest-SHA3-512" },
- { "Digest-SHA3-256" },
- { "Digest-SHA2-512" },
- { "Digest-SHA2-256" },
+ "Digest-BLAKE2b512",
+ "Digest-BLAKE2s256",
+ "Digest-SHA3-512",
+ "Digest-SHA3-256",
+ "Digest-SHA2-512",
+ "Digest-SHA2-256",
// Systemd
- { "systemd-sysusers" },
- { "systemd-tmpfiles" },
+ "systemd-sysusers",
+ "systemd-tmpfiles",
// The end
- { NULL },
+ NULL,
};
int pakfire_on_root(struct pakfire* pakfire) {
static Id pakfire_handle_ns_pakfire(struct pakfire* pakfire, const char* name) {
// Find all supported features
- for (const struct pakfire_feature* feature = features; feature->name; feature++) {
- if (strcmp(feature->name, name) == 0)
+ for (const char** feature = features; *feature; feature++) {
+ if (strcmp(*feature, name) == 0)
return 1;
}