aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorPeter Grehan <grehan@FreeBSD.org>2004-01-22 07:23:36 +0000
committerPeter Grehan <grehan@FreeBSD.org>2004-01-22 07:23:36 +0000
commit5cfe0423e65c346d83d1f90d5e3fd6b1cb2e310c (patch)
tree376d48213587a799597a88ac216bca01388a3cb4 /sbin
parent53cd4099fb837b9083922b5c3ec44ec26d2bfe3a (diff)
downloadsrc-5cfe0423e65c346d83d1f90d5e3fd6b1cb2e310c.tar.gz
src-5cfe0423e65c346d83d1f90d5e3fd6b1cb2e310c.zip
Userland signed char fixes for PPC build. Problems were using a char
return for getopt() and comparing to -1, ditto with fgetc() and EOF, and using the kg_nice value from <sys/user.h> Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> Reviewed by: obrien, bde (a while back) Tested lightly on: ppc, i386, make universe
Notes
Notes: svn path=/head/; revision=124830
Diffstat (limited to 'sbin')
-rw-r--r--sbin/atm/fore_dnld/fore_dnld.c3
-rw-r--r--sbin/camcontrol/modeedit.c10
-rw-r--r--sbin/devfs/devfs.c2
-rw-r--r--sbin/devfs/rule.c2
-rw-r--r--sbin/mdmfs/mdmfs.c3
-rw-r--r--sbin/quotacheck/quotacheck.c4
6 files changed, 13 insertions, 11 deletions
diff --git a/sbin/atm/fore_dnld/fore_dnld.c b/sbin/atm/fore_dnld/fore_dnld.c
index bc3cde94eb78..263b2f7bdf0c 100644
--- a/sbin/atm/fore_dnld/fore_dnld.c
+++ b/sbin/atm/fore_dnld/fore_dnld.c
@@ -903,8 +903,7 @@ main(int argc, char *argv[])
u_char *ram; /* pointer to RAM */
Mon960 *Mon; /* Uart */
Aali *aap;
- char c;
- int i, err;
+ int c, i, err;
int binary = 0; /* Send binary file */
caddr_t buf; /* Ioctl buffer */
char bus_dev[80]; /* Bus device to mmap on */
diff --git a/sbin/camcontrol/modeedit.c b/sbin/camcontrol/modeedit.c
index 1702f1990e72..3fb9587e206a 100644
--- a/sbin/camcontrol/modeedit.c
+++ b/sbin/camcontrol/modeedit.c
@@ -362,6 +362,7 @@ load_format(const char *pagedb_path, int page)
int found;
int lineno;
enum { LOCATE, PAGENAME, PAGEDEF } state;
+ int ch;
char c;
#define SETSTATE_LOCATE do { \
@@ -397,19 +398,20 @@ load_format(const char *pagedb_path, int page)
lineno = 0;
found = 0;
SETSTATE_LOCATE;
- while ((c = fgetc(pagedb)) != EOF) {
+ while ((ch = fgetc(pagedb)) != EOF) {
/* Keep a line count to make error messages more useful. */
UPDATE_LINENO;
/* Skip over comments anywhere in the mode database. */
- if (c == '#') {
+ if (ch == '#') {
do {
- c = fgetc(pagedb);
- } while (c != '\n' && c != EOF);
+ ch = fgetc(pagedb);
+ } while (ch != '\n' && ch != EOF);
UPDATE_LINENO;
continue;
}
+ c = ch;
/* Strip out newline characters. */
if (c == '\n')
diff --git a/sbin/devfs/devfs.c b/sbin/devfs/devfs.c
index 92d1c0f3a323..f531f7521cb1 100644
--- a/sbin/devfs/devfs.c
+++ b/sbin/devfs/devfs.c
@@ -59,7 +59,7 @@ main(int ac, char **av)
{
const char *mountpt;
struct cmd *c;
- char ch;
+ int ch;
mountpt = NULL;
while ((ch = getopt(ac, av, "m:")) != -1)
diff --git a/sbin/devfs/rule.c b/sbin/devfs/rule.c
index f1fd908753e3..b179c9e2fb1e 100644
--- a/sbin/devfs/rule.c
+++ b/sbin/devfs/rule.c
@@ -82,7 +82,7 @@ int
rule_main(int ac, char **av)
{
struct cmd *c;
- char ch;
+ int ch;
setprogname("devfs rule");
optreset = optind = 1;
diff --git a/sbin/mdmfs/mdmfs.c b/sbin/mdmfs/mdmfs.c
index db143ccd7986..ff4d41dbafab 100644
--- a/sbin/mdmfs/mdmfs.c
+++ b/sbin/mdmfs/mdmfs.c
@@ -91,7 +91,8 @@ main(int argc, char **argv)
bool have_mdtype;
bool detach, softdep, autounit;
char *mtpoint, *unitstr;
- char ch, *p;
+ char *p;
+ int ch;
void *set;
/* Misc. initialization. */
diff --git a/sbin/quotacheck/quotacheck.c b/sbin/quotacheck/quotacheck.c
index a5cce23f11bc..710338813836 100644
--- a/sbin/quotacheck/quotacheck.c
+++ b/sbin/quotacheck/quotacheck.c
@@ -150,9 +150,9 @@ main(argc, argv)
struct passwd *pw;
struct group *gr;
struct quotaname *auxdata;
- int i, argnum, maxrun, errs;
+ int i, argnum, maxrun, errs, ch;
long done = 0;
- char ch, *name;
+ char *name;
errs = maxrun = 0;
while ((ch = getopt(argc, argv, "aguvl:")) != -1) {