evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / fd / fdtools / new-skalibs.patch
blob76c5396f8a8850e712b2c093b70ff52e425dd3a8
1 diff -Naur misc/fdtools-2020.05.04/src/check_exit_exec.c misc-new/fdtools-2020.05.04/src/check_exit_exec.c
2 --- misc/fdtools-2020.05.04/src/check_exit_exec.c 2015-03-16 04:55:56.000000000 +0100
3 +++ misc-new/fdtools-2020.05.04/src/check_exit_exec.c 2021-01-22 10:50:25.529955213 +0100
4 @@ -2,6 +2,7 @@
5 #include <unistd.h>
6 #include <errno.h>
8 +#include <skalibs/exec.h>
9 #include <skalibs/stddjb.h>
10 #include "prjlibs-c/constants.h"
11 #include "prjlibs-c/diewarn.h"
12 @@ -14,7 +15,7 @@
14 if (str_equal(arg, ":")) {
15 ++argv;
16 - pathexec0((char const**)argv);
17 + mexec0((char const**)argv);
18 DIE1(exec, argv[0]);
21 diff -Naur misc/fdtools-2020.05.04/src/grabconsole.c misc-new/fdtools-2020.05.04/src/grabconsole.c
22 --- misc/fdtools-2020.05.04/src/grabconsole.c 2020-04-24 06:01:22.000000000 +0200
23 +++ misc-new/fdtools-2020.05.04/src/grabconsole.c 2021-01-22 10:43:27.887754936 +0100
24 @@ -4,6 +4,7 @@
25 #include <errno.h>
27 #include <skalibs/stddjb.h>
28 +#include <skalibs/exec.h>
29 #include "prjlibs-c/constants.h"
30 #include "prjlibs-c/diewarn.h"
31 #include "prjlibs-c/types.h"
32 @@ -26,6 +27,6 @@
33 if (fd_grabconsole(fd)!=0) DIE0(tioccons);
35 argv+=2;
36 - pathexec0((char const**)argv);
37 + mexec0((char const**)argv);
38 DIE1(exec, argv[0]);
40 diff -Naur misc/fdtools-2020.05.04/src/pipecycle.c misc-new/fdtools-2020.05.04/src/pipecycle.c
41 --- misc/fdtools-2020.05.04/src/pipecycle.c 2015-03-16 04:55:56.000000000 +0100
42 +++ misc-new/fdtools-2020.05.04/src/pipecycle.c 2021-01-22 10:47:58.033220790 +0100
43 @@ -4,6 +4,7 @@
44 #include <unistd.h>
45 #include <signal.h>
47 +#include <skalibs/exec.h>
48 #include <skalibs/stddjb.h>
49 #include "prjlibs-c/diewarn.h"
50 #include "prjlibs-c/types.h"
51 @@ -56,7 +57,7 @@
52 if (fd_shuffle(2, current, wanted)!=0) DIE0(dup);
54 read(start[0], &j, 1);
55 - pathexec(args);
56 + mexec(args);
57 DIE1(exec, args[0]);
60 diff -Naur misc/fdtools-2020.05.04/src/recvfd.c misc-new/fdtools-2020.05.04/src/recvfd.c
61 --- misc/fdtools-2020.05.04/src/recvfd.c 2020-04-28 09:35:05.000000000 +0200
62 +++ misc-new/fdtools-2020.05.04/src/recvfd.c 2021-01-22 10:47:14.180994779 +0100
63 @@ -7,6 +7,7 @@
64 #include <limits.h>
66 #include <skalibs/stddjb.h>
67 +#include <skalibs/exec.h>
68 #include "prjlibs-c/diewarn.h"
69 #include "prjlibs-c/types.h"
70 #include "fdtools.h"
71 @@ -69,9 +70,9 @@
72 named_fd=duped;
74 buf[int_fmt(buf, named_fd)]='\0';
75 - if (pathexec_env(argv[i]+1, buf)==0) DIE0(alloc);
76 + if (env_mexec(argv[i]+1, buf)==0) DIE0(alloc);
78 argv+=nfds+1;
79 - pathexec0((char const**)argv);
80 + mexec0((char const**)argv);
81 DIE1(exec, argv[0]);
83 diff -Naur misc/fdtools-2020.05.04/src/sendfd.c misc-new/fdtools-2020.05.04/src/sendfd.c
84 --- misc/fdtools-2020.05.04/src/sendfd.c 2015-03-16 06:48:39.000000000 +0100
85 +++ misc-new/fdtools-2020.05.04/src/sendfd.c 2021-01-22 10:43:07.207634214 +0100
86 @@ -7,6 +7,7 @@
87 #include <limits.h>
89 #include <skalibs/stddjb.h>
90 +#include <skalibs/exec.h>
91 #include "prjlibs-c/diewarn.h"
92 #include "prjlibs-c/types.h"
93 #include "fdtools.h"
94 @@ -40,6 +41,6 @@
95 argv+=nfds;
96 if (*argv==NULL) _exit(0);
97 ++argv;
98 - pathexec0((char const**)argv);
99 + mexec0((char const**)argv);
100 DIE1(exec, argv[0]);
102 diff -Naur misc/fdtools-2020.05.04/src/setstate.c misc-new/fdtools-2020.05.04/src/setstate.c
103 --- misc/fdtools-2020.05.04/src/setstate.c 2020-05-04 10:04:21.000000000 +0200
104 +++ misc-new/fdtools-2020.05.04/src/setstate.c 2021-01-22 10:45:05.084304318 +0100
105 @@ -8,6 +8,7 @@
106 #include <errno.h>
108 #include <skalibs/stddjb.h>
109 +#include <skalibs/exec.h>
110 #include "prjlibs-c/constants.h"
111 #include "prjlibs-c/intattr.h"
112 #include "prjlibs-c/diewarn.h"
113 @@ -167,6 +168,6 @@
116 argv+=2;
117 - pathexec_run(argv[0], (char const**)argv, (char const**)environ);
118 + mexec_ae(argv[0], (char const**)argv, (char const**)environ);
119 DIE1(exec, argv[0]);
121 diff -Naur misc/fdtools-2020.05.04/src/statfile.c misc-new/fdtools-2020.05.04/src/statfile.c
122 --- misc/fdtools-2020.05.04/src/statfile.c 2015-03-22 00:33:44.000000000 +0100
123 +++ misc-new/fdtools-2020.05.04/src/statfile.c 2021-01-22 10:48:23.673351183 +0100
124 @@ -6,6 +6,7 @@
125 #include <errno.h>
127 #include <skalibs/stddjb.h>
128 +#include <skalibs/exec.h>
129 #include "prjlibs-c/constants.h"
130 #include "prjlibs-c/diewarn.h"
131 #include "prjlibs-c/warn.h"
132 @@ -15,7 +16,7 @@
133 char const* PROG="statfile";
135 static void set(char const* const var, char const* const val) {
136 - if (pathexec_env(var, val)==0) DIE0(alloc);
137 + if (env_mexec(var, val)==0) DIE0(alloc);
140 static void set64n(char const* const var, time_t t, unsigned int nsec) {
141 @@ -178,6 +179,6 @@
144 argv+=3;
145 - pathexec((char const**)argv);
146 + mexec((char const**)argv);
147 DIE1(exec, argv[0]);
149 diff -Naur misc/fdtools-2020.05.04/src/vc-get-linux.c misc-new/fdtools-2020.05.04/src/vc-get-linux.c
150 --- misc/fdtools-2020.05.04/src/vc-get-linux.c 2020-04-28 07:04:49.000000000 +0200
151 +++ misc-new/fdtools-2020.05.04/src/vc-get-linux.c 2021-01-22 10:47:34.649100757 +0100
152 @@ -10,6 +10,7 @@
153 #include <sys/sysmacros.h>
155 #include <skalibs/stddjb.h>
156 +#include <skalibs/exec.h>
157 #include "prjlibs-c/constants.h"
158 #include "prjlibs-c/diewarn.h"
159 #include "prjlibs-c/types.h"
160 @@ -38,7 +39,7 @@
161 errno=0;
162 if (ioctl(fd, VT_OPENQRY, &vtnum)<0 || vtnum==-1) DIE0(vt_qry);
163 bufnum[ulong_fmt(bufnum, vtnum)]='\0';
164 - if (pathexec_env("TTY", buf)==0) DIE0(alloc);
165 + if (env_mexec("TTY", buf)==0) DIE0(alloc);
167 fd_close(fd);
169 @@ -50,12 +51,12 @@
170 if (fstat(fd, &statbuf)!=0) DIE1(stat, buf);
171 buf[ulong_fmt(buf, minor(statbuf.st_rdev))]='\0';
173 - if (pathexec_env("VCNUM", buf)==0) DIE0(alloc);
174 + if (env_mexec("VCNUM", buf)==0) DIE0(alloc);
176 buf[ulong_fmt(buf, fd)]='\0';
177 - if (pathexec_env("VCFD", buf)==0) DIE0(alloc);
178 + if (env_mexec("VCFD", buf)==0) DIE0(alloc);
181 - pathexec((char const**)argv+2);
182 + mexec((char const**)argv+2);
183 DIE1(exec, argv[2]);
185 diff -Naur misc/fdtools-2020.05.04/src/vc-lock-linux.c misc-new/fdtools-2020.05.04/src/vc-lock-linux.c
186 --- misc/fdtools-2020.05.04/src/vc-lock-linux.c 2015-03-20 05:59:42.000000000 +0100
187 +++ misc-new/fdtools-2020.05.04/src/vc-lock-linux.c 2021-01-22 10:48:36.857417751 +0100
188 @@ -8,6 +8,7 @@
189 #include <sys/ioctl.h>
190 #include <sys/vt.h>
192 +#include <skalibs/exec.h>
193 #include <skalibs/stddjb.h>
194 #include "prjlibs-c/constants.h"
195 #include "prjlibs-c/diewarn.h"
196 @@ -79,7 +80,7 @@
197 WARN0(fork);
198 } else if (pid==0) {
199 sigprocmask(SIG_SETMASK, &old_set, NULLP);
200 - pathexec((char const**)argv);
201 + mexec((char const**)argv);
202 DIE1(exec, *argv);
203 } else {
204 int status;
205 diff -Naur misc/fdtools-2020.05.04/src/vc-switch-linux.c misc-new/fdtools-2020.05.04/src/vc-switch-linux.c
206 --- misc/fdtools-2020.05.04/src/vc-switch-linux.c 2020-04-28 07:14:04.000000000 +0200
207 +++ misc-new/fdtools-2020.05.04/src/vc-switch-linux.c 2021-01-22 10:42:41.259480648 +0100
208 @@ -10,6 +10,7 @@
209 #include <sys/sysmacros.h>
211 #include <skalibs/stddjb.h>
212 +#include <skalibs/exec.h>
213 #include "prjlibs-c/constants.h"
214 #include "prjlibs-c/diewarn.h"
215 #include "prjlibs-c/types.h"
216 @@ -36,6 +37,6 @@
217 if (ioctl(fd, VT_ACTIVATE, ttyno)<0) DIE0(vt_act);
218 if (!scan) fd_close(fd);
220 - pathexec0((char const**)argv+3);
221 + mexec0((char const**)argv+3);
222 DIE1(exec, argv[3]);