Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
7ead3dc2
Commit
7ead3dc2
authored
Nov 07, 2018
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the broken yes/no prompt in sev_ini.
parent
8b8d9224
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
sev/exe/sev_ini/src/sev_ini.c
sev/exe/sev_ini/src/sev_ini.c
+10
-8
No files found.
sev/exe/sev_ini/src/sev_ini.c
View file @
7ead3dc2
...
...
@@ -34,6 +34,8 @@
* General Public License plus this exception.
*/
// TODO: Den hr filen r i princip identisk med rt_ini.
#include <fcntl.h>
#include <unistd.h>
#include <sys/wait.h>
...
...
@@ -219,12 +221,12 @@ static pwr_tStatus terminate(ini_sContext* cp)
exit
(
1
);
}
static
int
ask_yes_no
(
ini_sContext
*
cp
,
char
*
text
)
static
int
ask_yes_no
(
char
*
text
)
{
printf
(
"%s ? (y|n) [n]: "
,
text
)
;
printf
(
"
n
\n
"
);
return
0
;
char
ans
;
printf
(
"
%s ? [Y/n]: "
,
text
);
scanf
(
"%c"
,
&
ans
);
return
(
ans
==
'y'
||
ans
==
'Y'
)
;
}
static
int
checkErrors
(
ini_sContext
*
cp
)
...
...
@@ -241,7 +243,7 @@ static int checkErrors(ini_sContext* cp)
&
cp
->
log
,
"Ignoring fatal errors, errors and warnings, continued..."
);
return
1
;
}
else
{
return
ask_yes_no
(
cp
,
"Do you want to continue"
);
return
ask_yes_no
(
"Do you want to continue"
);
}
}
if
(
cp
->
errors
>
0
)
{
...
...
@@ -252,7 +254,7 @@ static int checkErrors(ini_sContext* cp)
errh_LogInfo
(
&
cp
->
log
,
"Ignoring errors and warnings, continued..."
);
return
1
;
}
else
{
return
ask_yes_no
(
cp
,
"Do you want to continue"
);
return
ask_yes_no
(
"Do you want to continue"
);
}
}
if
(
cp
->
warnings
>
0
)
{
...
...
@@ -263,7 +265,7 @@ static int checkErrors(ini_sContext* cp)
errh_LogInfo
(
&
cp
->
log
,
"Ignoring warnings, continued..."
);
return
1
;
}
else
{
return
ask_yes_no
(
cp
,
"Do you want to continue"
);
return
ask_yes_no
(
"Do you want to continue"
);
}
}
return
1
;
...
...
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