depot/pkgs/by-name/li/likwid/cat-grep-sort-wc.patch
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

20 lines
859 B
Diff

--- a/src/access-daemon/accessDaemon.c 2024-01-10 14:26:18.519538418 +0100
+++ b/src/access-daemon/accessDaemon.c 2024-01-10 14:30:44.090278291 +0100
@@ -201,7 +201,7 @@
static int getNumberOfCPUs()
{
FILE* fpipe = NULL;
- char cmd[1024] = "cat /proc/cpuinfo | grep \"processor\" | sort -u | wc -l";
+ char cmd[1024] = "@coreutils@cat /proc/cpuinfo | @gnugrep@grep \"processor\" | @coreutils@sort -u | @coreutils@wc -l";
char buff[1024];
if ( !(fpipe = popen(cmd,"r")) )
{
@@ -219,7 +219,7 @@
static int getNumberOfSockets()
{
FILE* fpipe = NULL;
- char cmd[1024] = "cat /proc/cpuinfo | grep \"physical id\" | sort -u | wc -l";
+ char cmd[1024] = "@coreutils@cat /proc/cpuinfo | @gnugrep@grep \"physical id\" | @coreutils@sort -u | @coreutils@wc -l";
char buff[1024];
if ( !(fpipe = popen(cmd,"r")) )
{