Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b2737a08
Commit
b2737a08
authored
Dec 15, 2002
by
Roman Zippel
Committed by
Linus Torvalds
Dec 15, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kconfig: geometry defaults
Set geometry defaults, if TIOCGWINSZ fails.
parent
d282afeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
scripts/kconfig/mconf.c
scripts/kconfig/mconf.c
+15
-0
No files found.
scripts/kconfig/mconf.c
View file @
b2737a08
...
@@ -111,6 +111,7 @@ static int cprint(const char *fmt, ...);
...
@@ -111,6 +111,7 @@ static int cprint(const char *fmt, ...);
static
void
init_wsize
(
void
)
static
void
init_wsize
(
void
)
{
{
struct
winsize
ws
;
struct
winsize
ws
;
char
*
env
;
if
(
ioctl
(
1
,
TIOCGWINSZ
,
&
ws
)
==
-
1
)
{
if
(
ioctl
(
1
,
TIOCGWINSZ
,
&
ws
)
==
-
1
)
{
rows
=
24
;
rows
=
24
;
...
@@ -118,6 +119,20 @@ static void init_wsize(void)
...
@@ -118,6 +119,20 @@ static void init_wsize(void)
}
else
{
}
else
{
rows
=
ws
.
ws_row
;
rows
=
ws
.
ws_row
;
cols
=
ws
.
ws_col
;
cols
=
ws
.
ws_col
;
if
(
!
rows
)
{
env
=
getenv
(
"LINES"
);
if
(
env
)
rows
=
atoi
(
env
);
if
(
!
rows
)
rows
=
24
;
}
if
(
!
cols
)
{
env
=
getenv
(
"COLUMNS"
);
if
(
env
)
cols
=
atoi
(
env
);
if
(
!
cols
)
cols
=
80
;
}
}
}
if
(
rows
<
19
||
cols
<
80
)
{
if
(
rows
<
19
||
cols
<
80
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment