Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ChangeLog: http://landley.net/toybox/#12-08-2022 PR: 265833
- Loading branch information
1 parent
5362a55
commit 1418764
Showing
7 changed files
with
56 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
TIMESTAMP = 1643028839 | ||
SHA256 (toybox-0.8.6.tar.gz) = 4298c90a2b238348e4fdc9f89eb4988356c80da3f0cf78c279d2e82b9119034b | ||
SIZE (toybox-0.8.6.tar.gz) = 3458765 | ||
TIMESTAMP = 1660384956 | ||
SHA256 (toybox-0.8.8.tar.gz) = dafd41978d40f02a61cf1be99a2b4a25812bbfb9c3157e679ee7611202d6ac58 | ||
SIZE (toybox-0.8.8.tar.gz) = 3492750 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- toys/other/openvt.c.orig 2022-08-12 07:58:03 UTC | ||
+++ toys/other/openvt.c | ||
@@ -44,8 +44,8 @@ config DEALLOCVT | ||
|
||
#define FOR_openvt | ||
#include "toys.h" | ||
-#include <linux/vt.h> | ||
-#include <linux/kd.h> | ||
+#include <sys/consio.h> | ||
+#include <sys/kbio.h> | ||
|
||
GLOBALS( | ||
long c; | ||
@@ -72,12 +72,17 @@ static int activate(int fd, int cc) | ||
|
||
void openvt_main(void) | ||
{ | ||
+ struct vt_stat { | ||
+ unsigned short v_active; | ||
+ unsigned short v_signal; | ||
+ unsigned short v_state; | ||
+ }; | ||
struct vt_stat vstate; | ||
int fd, cc = (int)TT.c; | ||
pid_t pid; | ||
|
||
// find current console | ||
- if (-1 == (ioctl(fd = open_console(), VT_GETSTATE, &vstate)) || | ||
+ if (-1 == (ioctl(fd = open_console(), VT_GETACTIVE, &vstate)) || | ||
(!cc && 0>=(cc = xioctl(fd, VT_OPENQRY, &fd)))) | ||
perror_exit("can't find open VT"); | ||
|
||
@@ -95,7 +100,7 @@ void openvt_main(void) | ||
while (-1 == waitpid(pid, NULL, 0) && errno == EINTR) errno = 0; | ||
if (FLAG(s)) { | ||
activate(fd, vstate.v_active); | ||
- dprintf(2, "%d\n", ioctl(fd, VT_DISALLOCATE, cc)); | ||
+ dprintf(2, "%d\n", ioctl(fd, VT_ACTIVATE, cc)); | ||
} | ||
} | ||
} | ||
@@ -111,5 +116,5 @@ void deallocvt_main(void) | ||
int fd = open_console(), vt_num = 0; // 0 = all | ||
|
||
if (*toys.optargs) vt_num = atolx_range(*toys.optargs, 1, 63); | ||
- if (-1 == ioctl(fd, VT_DISALLOCATE, vt_num)) perror_exit("%d", vt_num); | ||
+ if (-1 == ioctl(fd, VT_ACTIVATE, vt_num)) perror_exit("%d", vt_num); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters