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
RiscOS
S
Sources
SystemRes
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[] =
...
@@ -63,6 +63,7 @@ static const char rcsid[] =
#include <unixlib.h>
#include <unixlib.h>
#include <riscos.h>
#include <riscos.h>
char
*
__progname
=
"SysCtl"
;
char
*
__progname
=
"SysCtl"
;
static
int
errvarflag
;
#endif
#endif
static
int
Aflag
,
aflag
,
bflag
,
dflag
,
nflag
,
wflag
,
Xflag
;
static
int
Aflag
,
aflag
,
bflag
,
dflag
,
nflag
,
wflag
,
Xflag
;
...
@@ -107,7 +108,7 @@ main(int argc, char **argv)
...
@@ -107,7 +108,7 @@ main(int argc, char **argv)
case
'w'
:
wflag
=
1
;
break
;
case
'w'
:
wflag
=
1
;
break
;
case
'X'
:
Xflag
=
Aflag
=
1
;
break
;
case
'X'
:
Xflag
=
Aflag
=
1
;
break
;
#ifdef __riscos
#ifdef __riscos
case
'e'
:
err_set_silent
(
1
);
break
;
case
'e'
:
err_set_silent
(
1
);
errvarflag
=
1
;
break
;
#endif
#endif
default:
usage
();
default:
usage
();
}
}
...
@@ -209,8 +210,14 @@ parse(char *string)
...
@@ -209,8 +210,14 @@ parse(char *string)
kind
&
CTLTYPE
);
kind
&
CTLTYPE
);
}
}
#ifdef __riscos
if
(
!
errvarflag
)
#endif
i
=
show_var
(
mib
,
len
);
i
=
show_var
(
mib
,
len
);
if
(
sysctl
(
mib
,
len
,
0
,
0
,
newval
,
newsize
)
==
-
1
)
{
if
(
sysctl
(
mib
,
len
,
0
,
0
,
newval
,
newsize
)
==
-
1
)
{
#ifdef __riscos
if
(
!
errvarflag
)
#endif
if
(
!
i
&&
!
bflag
)
if
(
!
i
&&
!
bflag
)
putchar
(
'\n'
);
putchar
(
'\n'
);
switch
(
errno
)
{
switch
(
errno
)
{
...
@@ -228,13 +235,22 @@ parse(char *string)
...
@@ -228,13 +235,22 @@ parse(char *string)
return
;
return
;
}
}
}
}
#ifdef __riscos
if
(
!
errvarflag
)
#endif
if
(
!
bflag
)
if
(
!
bflag
)
printf
(
" -> "
);
printf
(
" -> "
);
i
=
nflag
;
i
=
nflag
;
nflag
=
1
;
nflag
=
1
;
#ifdef __riscos
if
(
!
errvarflag
)
{
#endif
j
=
show_var
(
mib
,
len
);
j
=
show_var
(
mib
,
len
);
if
(
!
j
&&
!
bflag
)
if
(
!
j
&&
!
bflag
)
putchar
(
'\n'
);
putchar
(
'\n'
);
#ifdef __riscos
}
#endif
nflag
=
i
;
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