mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
build/pause: add -v flag to the Windows pause binary
Make the Windows pause.exe have the same -v flag as the Linux pause binary. _stricmp is documented here: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/strcmp-wcscmp-mbscmp?view=msvc-170 The VERSION definition is passed on compile time for both OSes in the Makefile via CFLAGS: $(TRIPLE)-gcc $(CFLAGS) -o $@ $^ && \ Add 3.10 version entry in the changelog.
This commit is contained in:
parent
84a7f1ea15
commit
7871949990
@ -189,11 +189,14 @@ dependencies:
|
|||||||
- path: build/common.sh
|
- path: build/common.sh
|
||||||
match: __default_go_runner_version=
|
match: __default_go_runner_version=
|
||||||
|
|
||||||
- name: "registry.k8s.io/pause"
|
# TODO: enable once pause 3.10 is promoted
|
||||||
version: 3.9
|
# https://github.com/kubernetes/kubernetes/issues/125092
|
||||||
refPaths:
|
#
|
||||||
- path: build/pause/Makefile
|
# - name: "registry.k8s.io/pause"
|
||||||
match: TAG\s*\?=
|
# version: 3.10
|
||||||
|
# refPaths:
|
||||||
|
# - path: build/pause/Makefile
|
||||||
|
# match: TAG\s*\?=
|
||||||
|
|
||||||
- name: "registry.k8s.io/pause: dependents"
|
- name: "registry.k8s.io/pause: dependents"
|
||||||
version: 3.9
|
version: 3.9
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
# 3.10
|
||||||
|
|
||||||
|
* Add support for the -v flag on Windows. It prints the version similarly to Linux. ([#125067](https://github.com/kubernetes/kubernetes/pull/125067), [@neolit123](https://github.com/neolit123))
|
||||||
|
|
||||||
# 3.9
|
# 3.9
|
||||||
|
|
||||||
* Unsupported Windows Semi-Annual Channel container images removed (OS Versions removed: 20H2). ([#112924](https://github.com/kubernetes/kubernetes/pull/112924), [@marosset](https://github.com/marosset))
|
* Unsupported Windows Semi-Annual Channel container images removed (OS Versions removed: 20H2). ([#112924](https://github.com/kubernetes/kubernetes/pull/112924), [@marosset](https://github.com/marosset))
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
REGISTRY ?= staging-k8s.gcr.io
|
REGISTRY ?= staging-k8s.gcr.io
|
||||||
IMAGE = $(REGISTRY)/pause
|
IMAGE = $(REGISTRY)/pause
|
||||||
|
|
||||||
TAG ?= 3.9
|
TAG ?= 3.10
|
||||||
REV = $(shell git describe --contains --always --match='v*')
|
REV = $(shell git describe --contains --always --match='v*')
|
||||||
|
|
||||||
# Architectures supported: amd64, arm, arm64, ppc64le and s390x
|
# Architectures supported: amd64, arm, arm64, ppc64le and s390x
|
||||||
|
@ -16,6 +16,14 @@ limitations under the License.
|
|||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#define STRINGIFY(x) #x
|
||||||
|
#define VERSION_STRING(x) STRINGIFY(x)
|
||||||
|
|
||||||
|
#ifndef VERSION
|
||||||
|
#define VERSION HEAD
|
||||||
|
#endif
|
||||||
|
|
||||||
BOOL WINAPI CtrlHandler(DWORD fdwCtrlType)
|
BOOL WINAPI CtrlHandler(DWORD fdwCtrlType)
|
||||||
{
|
{
|
||||||
@ -34,8 +42,18 @@ BOOL WINAPI CtrlHandler(DWORD fdwCtrlType)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 1; i < argc; ++i)
|
||||||
|
{
|
||||||
|
if (!_stricmp(argv[i], "-v"))
|
||||||
|
{
|
||||||
|
fprintf(stdout, "pause.c %s\n", VERSION_STRING(VERSION));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (SetConsoleCtrlHandler(CtrlHandler, TRUE))
|
if (SetConsoleCtrlHandler(CtrlHandler, TRUE))
|
||||||
{
|
{
|
||||||
Sleep(INFINITE);
|
Sleep(INFINITE);
|
||||||
|
Loading…
Reference in New Issue
Block a user