push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
diff --git a/commands.c b/commands.c
index a28e6da..0f76ac7 100644
--- a/commands.c
+++ b/commands.c
@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include <errno.h>
#include "commands.h"
#include "platform.h"
@@ -150,7 +151,13 @@ build_symlink_name(const char *path_to_bin, const struct cmd_info *cmd)
{
static char link_name[FILENAME_MAX];
- snprintf(link_name, FILENAME_MAX, "%s/%s", path_to_bin, cmd->name);
+ int result = snprintf(link_name, PATH_MAX, "%s/%s", path_to_bin, cmd->name);
+
+ if (result >= PATH_MAX) {
+ link_name[PATH_MAX - 1] = '\0';
+ } else if (result < 0) {
+ link_name[0] = '\0';
+ }
return link_name;
}

View File

@@ -0,0 +1,48 @@
{
stdenv,
lib,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "iotools";
version = "unstable-2017-12-11";
src = fetchFromGitHub {
owner = "adurbin";
repo = "iotools";
rev = "18949fdc4dedb1da3f51ee83a582b112fb9f2c71";
hash = "sha256-tlGXJn3n27mQDupMIVYDd86YaWazVwel/qs0QqCy1W8=";
};
patches = [ ./001-fix-werror-in-sprintf.patch ];
makeFlags = [
"DEBUG=0"
"STATIC=0"
];
installPhase = ''
install -Dm755 iotools -t $out/bin
'';
meta = {
description = "Set of simple command line tools which allow access to
hardware device registers";
longDescription = ''
Provides a set of simple command line tools which allow access to
hardware device registers. Supported register interfaces include PCI,
IO, memory mapped IO, SMBus, CPUID, and MSR. Also included are some
utilities which allow for simple arithmetic, logical, and other
operations.
'';
homepage = "https://github.com/adurbin/iotools";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ felixsinger ];
platforms = [
"x86_64-linux"
"i686-linux"
];
mainProgram = "iotools";
};
})