Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ROOL
InetRes
Commits
e8e17902
Commit
e8e17902
authored
Jul 13, 1999
by
Kevin Bracey
Browse files
Made sure no output with -e flag
parent
93610c03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
Sources/sysctl/c/SysCtl
Sources/sysctl/c/SysCtl
+17
-1
No files found.
Sources/sysctl/c/SysCtl
View file @
e8e17902
...
...
@@ -63,6 +63,7 @@ static const char rcsid[] =
#include <unixlib.h>
#include <riscos.h>
char
*
__progname
=
"SysCtl"
;
static
int
errvarflag
;
#endif
static
int
Aflag
,
aflag
,
bflag
,
dflag
,
nflag
,
wflag
,
Xflag
;
...
...
@@ -107,7 +108,7 @@ main(int argc, char **argv)
case
'w'
:
wflag
=
1
;
break
;
case
'X'
:
Xflag
=
Aflag
=
1
;
break
;
#ifdef __riscos
case
'e'
:
err_set_silent
(
1
);
break
;
case
'e'
:
err_set_silent
(
1
);
errvarflag
=
1
;
break
;
#endif
default:
usage
();
}
...
...
@@ -209,8 +210,14 @@ parse(char *string)
kind
&
CTLTYPE
);
}
#ifdef __riscos
if
(
!
errvarflag
)
#endif
i
=
show_var
(
mib
,
len
);
if
(
sysctl
(
mib
,
len
,
0
,
0
,
newval
,
newsize
)
==
-
1
)
{
#ifdef __riscos
if
(
!
errvarflag
)
#endif
if
(
!
i
&&
!
bflag
)
putchar
(
'\n'
);
switch
(
errno
)
{
...
...
@@ -228,13 +235,22 @@ parse(char *string)
return
;
}
}
#ifdef __riscos
if
(
!
errvarflag
)
#endif
if
(
!
bflag
)
printf
(
" -> "
);
i
=
nflag
;
nflag
=
1
;
#ifdef __riscos
if
(
!
errvarflag
)
{
#endif
j
=
show_var
(
mib
,
len
);
if
(
!
j
&&
!
bflag
)
putchar
(
'\n'
);
#ifdef __riscos
}
#endif
nflag
=
i
;
}
}
...
...
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