From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin-patches@cygwin.com
Cc: Takashi Yano <takashi.yano@nifty.ne.jp>
Subject: [PATCH] Cygwin: console: Fix a bug that cannot handle consoles more than 32.
Date: Fri, 16 Feb 2024 02:41:49 +0900 [thread overview]
Message-ID: <20240215174200.1164-1-takashi.yano@nifty.ne.jp> (raw)
Fixes: 3721a756b0d8 ("Cygwin: console: Make the console accessible from other terminals.")
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
---
winsup/cygwin/devices.cc | 2 +-
winsup/cygwin/devices.in | 2 +-
winsup/cygwin/release/3.5.1 | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/devices.cc b/winsup/cygwin/devices.cc
index b14613bc7..5b67fd1da 100644
--- a/winsup/cygwin/devices.cc
+++ b/winsup/cygwin/devices.cc
@@ -84,7 +84,7 @@ exists_console (const device& dev)
if (dev.get_minor () < MAX_CONS_DEV)
{
unsigned long bitmask = fhandler_console::console_unit (-1);
- return bitmask & (1UL << dev.get_minor ());
+ return !!(bitmask & (1UL << dev.get_minor ()));
}
return false;
}
diff --git a/winsup/cygwin/devices.in b/winsup/cygwin/devices.in
index e15a35f25..be54346fb 100644
--- a/winsup/cygwin/devices.in
+++ b/winsup/cygwin/devices.in
@@ -80,7 +80,7 @@ exists_console (const device& dev)
if (dev.get_minor () < MAX_CONS_DEV)
{
unsigned long bitmask = fhandler_console::console_unit (-1);
- return bitmask & (1UL << dev.get_minor ());
+ return !!(bitmask & (1UL << dev.get_minor ()));
}
return false;
}
diff --git a/winsup/cygwin/release/3.5.1 b/winsup/cygwin/release/3.5.1
index e041f98f3..96d2ad32f 100644
--- a/winsup/cygwin/release/3.5.1
+++ b/winsup/cygwin/release/3.5.1
@@ -18,3 +18,5 @@ Fixes:
Addresses: https://github.com/msys2/msys2-runtime/issues/198
- Fix the problem that VMIN and VTIME does not work at all in console.
+
+- Fix a bug that cannot handle consoles more than 32, rather than 64.
--
2.43.0
reply other threads:[~2024-02-15 17:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240215174200.1164-1-takashi.yano@nifty.ne.jp \
--to=takashi.yano@nifty.ne.jp \
--cc=cygwin-patches@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).