diff --git a/sys/src/cmd/5e/5e.c b/sys/src/cmd/5e/5e.c index 85367c3ee..b91a083ea 100644 --- a/sys/src/cmd/5e/5e.c +++ b/sys/src/cmd/5e/5e.c @@ -23,9 +23,9 @@ dump(void) static void adjustns(void) { - if(bind("/arm/bin", "/bin", MREPL) < 0) + if(bind("/arm/bin", "/bin", MREPL) == -1) sysfatal("bind: %r"); - if(bind("/rc/bin", "/bin", MAFTER) < 0) + if(bind("/rc/bin", "/bin", MAFTER) == -1) sysfatal("bind: %r"); putenv("cputype", "arm"); putenv("objtype", "arm"); diff --git a/sys/src/cmd/acme/fsys.c b/sys/src/cmd/acme/fsys.c index 7235bbe22..d29f4d301 100644 --- a/sys/src/cmd/acme/fsys.c +++ b/sys/src/cmd/acme/fsys.c @@ -268,13 +268,12 @@ fsysmount(Rune *dir, int ndir, Rune **incl, int nincl) close(sfd); m = fsysaddid(dir, ndir, incl, nincl); sprint(buf, "%d", m->id); - if(mount(cfd, -1, "/mnt/acme", MREPL, buf) < 0){ + if(mount(cfd, -1, "/mnt/acme", MREPL, buf) == -1){ fsysdelid(m); return nil; } - close(cfd); bind("/mnt/acme", "/mnt/wsys", MREPL); - if(bind("/mnt/acme", "/dev", MBEFORE) < 0){ + if(bind("/mnt/acme", "/dev", MBEFORE) == -1){ fsysdelid(m); return nil; } diff --git a/sys/src/cmd/auth/factotum/util.c b/sys/src/cmd/auth/factotum/util.c index d7a650708..42e40b281 100644 --- a/sys/src/cmd/auth/factotum/util.c +++ b/sys/src/cmd/auth/factotum/util.c @@ -14,7 +14,7 @@ bindnetcs(void) if(access("/net/cs", AEXIST) < 0){ if((srvfd = open("#s/cs", ORDWR)) >= 0){ - if(mount(srvfd, -1, "/net", MBEFORE, "") >= 0) + if(mount(srvfd, -1, "/net", MBEFORE, "") != -1) return 0; close(srvfd); } diff --git a/sys/src/cmd/auth/keyfs.c b/sys/src/cmd/auth/keyfs.c index efab7e4c0..a0d421535 100644 --- a/sys/src/cmd/auth/keyfs.c +++ b/sys/src/cmd/auth/keyfs.c @@ -212,7 +212,7 @@ main(int argc, char *argv[]) error("fork"); default: close(p[1]); - if(mount(p[0], -1, mntpt, MREPL|MCREATE, "") < 0) + if(mount(p[0], -1, mntpt, MREPL|MCREATE, "") == -1) error("can't mount: %r"); exits(0); } diff --git a/sys/src/cmd/aux/depend.c b/sys/src/cmd/aux/depend.c index 36d63149e..90da99add 100644 --- a/sys/src/cmd/aux/depend.c +++ b/sys/src/cmd/aux/depend.c @@ -300,7 +300,7 @@ realmain(void *a) close(pfd[1]); time(nil); /* open fd for time before losing / */ - if(bind(argv[1], "/", MREPL) == 0) + if(bind(argv[1], "/", MREPL) == -1) fatal("can't bind %s to /", argv[1]); fs = emalloc(sizeof(Fs)); diff --git a/sys/src/cmd/aux/searchfs.c b/sys/src/cmd/aux/searchfs.c index 4a617f8e2..be5ff9238 100644 --- a/sys/src/cmd/aux/searchfs.c +++ b/sys/src/cmd/aux/searchfs.c @@ -216,7 +216,7 @@ main(int argc, char **argv) exits(nil); } - if(mount(p[1], -1, mnt, MREPL, "") < 0){ + if(mount(p[1], -1, mnt, MREPL, "") == -1){ close(p[1]); fatal("mount failed"); } diff --git a/sys/src/cmd/aux/timesync.c b/sys/src/cmd/aux/timesync.c index 6ee46118d..71370d45e 100644 --- a/sys/src/cmd/aux/timesync.c +++ b/sys/src/cmd/aux/timesync.c @@ -303,7 +303,7 @@ main(int argc, char **argv) fd = open(timeserver, ORDWR); if(fd < 0) sysfatal("opening %s: %r", timeserver); - if(amount(fd, "/n/boot", MREPL, "") < 0) + if(amount(fd, "/n/boot", MREPL, "") == -1) sysfatal("mounting %s: %r", timeserver); close(fd); break; diff --git a/sys/src/cmd/bind.c b/sys/src/cmd/bind.c index 901cdcd8f..36cd9a0cf 100644 --- a/sys/src/cmd/bind.c +++ b/sys/src/cmd/bind.c @@ -29,7 +29,7 @@ main(int argc, char *argv[]) if(argc != 2 || (flag&MAFTER)&&(flag&MBEFORE)) usage(); - if(bind(argv[0], argv[1], flag) < 0){ + if(bind(argv[0], argv[1], flag) == -1){ if(qflag) exits(0); /* try to give a less confusing error than the default */ diff --git a/sys/src/cmd/bzfs/oramfs.c b/sys/src/cmd/bzfs/oramfs.c index e5d7ad0a2..27b5f8410 100644 --- a/sys/src/cmd/bzfs/oramfs.c +++ b/sys/src/cmd/bzfs/oramfs.c @@ -208,7 +208,7 @@ ramfsmain(int argc, char *argv[]) break; default: close(mfd[0]); /* don't deadlock if child fails */ - if(defmnt && mount(srvfd, -1, defmnt, MREPL|MCREATE, "") < 0) + if(defmnt && mount(srvfd, -1, defmnt, MREPL|MCREATE, "") == -1) error("mount failed: %r"); } } diff --git a/sys/src/cmd/cfs/cfs.c b/sys/src/cmd/cfs/cfs.c index 1e148351a..43fe0f323 100644 --- a/sys/src/cmd/cfs/cfs.c +++ b/sys/src/cmd/cfs/cfs.c @@ -264,7 +264,7 @@ mountinit(char *server, char *mountpoint) err = mount(p[1], -1, mountpoint, MREPL|MCREATE, ""); else err = amount(p[1], mountpoint, MREPL|MCREATE, ""); - if (err < 0) + if (err == -1) error("mount failed: %r"); exits(0); case -1: diff --git a/sys/src/cmd/cpu.c b/sys/src/cmd/cpu.c index 985325022..98080347d 100644 --- a/sys/src/cmd/cpu.c +++ b/sys/src/cmd/cpu.c @@ -331,7 +331,7 @@ remoteside(void) strcpy(buf, VERSION9P); if(fversion(fd, 64*1024, buf, sizeof buf) < 0) exits("fversion failed"); - if(mount(fd, -1, "/mnt/term", MCREATE|MREPL, "") < 0) + if(mount(fd, -1, "/mnt/term", MCREATE|MREPL, "") == -1) exits("mount failed"); close(fd); @@ -1180,7 +1180,7 @@ lclnoteproc(int netfd) return; case 0: close(pfd[0]); - if(mount(pfd[1], -1, "/dev", MBEFORE, "") < 0) + if(mount(pfd[1], -1, "/dev", MBEFORE, "") == -1) fprint(2, "cpu: can't mount note proc: %r\n"); close(pfd[1]); return; diff --git a/sys/src/cmd/disk/sacfs/sacfs.c b/sys/src/cmd/disk/sacfs/sacfs.c index 0824143a4..d1172641f 100644 --- a/sys/src/cmd/disk/sacfs/sacfs.c +++ b/sys/src/cmd/disk/sacfs/sacfs.c @@ -204,7 +204,7 @@ main(int argc, char *argv[]) break; default: close(p[0]); /* don't deadlock if child fails */ - if(defmnt && mount(p[1], defmnt, MREPL|MCREATE, "") < 0) + if(defmnt && mount(p[1], defmnt, MREPL|MCREATE, "") == -1) error("mount failed"); } exits(0); diff --git a/sys/src/cmd/exportfs/exportsrv.c b/sys/src/cmd/exportfs/exportsrv.c index 23d2ed47b..e5be53017 100644 --- a/sys/src/cmd/exportfs/exportsrv.c +++ b/sys/src/cmd/exportfs/exportsrv.c @@ -119,7 +119,7 @@ Xattach(Fsrpc *t) goto Nomount; sprint(buf, "/mnt/exportfs/%d", i); nfd = dup(srvfd, -1); - if(amount(nfd, buf, MREPL|MCREATE, t->work.aname) < 0){ + if(amount(nfd, buf, MREPL|MCREATE, t->work.aname) == -1){ errstr(buf, sizeof buf); reply(&t->work, &rhdr, buf); freefid(t->work.fid); diff --git a/sys/src/cmd/import.c b/sys/src/cmd/import.c index c271705b6..658ed7d98 100644 --- a/sys/src/cmd/import.c +++ b/sys/src/cmd/import.c @@ -206,7 +206,7 @@ main(int argc, char **argv) post(srvfile, srvpost, fd); } procsetname("mount on %s", mntpt); - if(mount(fd, -1, mntpt, mntflags, "") < 0) + if(mount(fd, -1, mntpt, mntflags, "") == -1) sysfatal("can't mount %s: %r", argv[1]); alarm(0); diff --git a/sys/src/cmd/iostats.c b/sys/src/cmd/iostats.c index dca0525b8..e61a7ff94 100644 --- a/sys/src/cmd/iostats.c +++ b/sys/src/cmd/iostats.c @@ -313,7 +313,7 @@ main(int argc, char **argv) rfork(RFENVG|RFNAMEG); - if(mount(pfd[0], -1, "/", mflag, "") < 0) + if(mount(pfd[0], -1, "/", mflag, "") == -1) sysfatal("mount /: %r"); /* replace std fds with the exported ones */ diff --git a/sys/src/cmd/ip/ftpd.c b/sys/src/cmd/ip/ftpd.c index df91065bb..f4ebbf68b 100644 --- a/sys/src/cmd/ip/ftpd.c +++ b/sys/src/cmd/ip/ftpd.c @@ -412,10 +412,10 @@ transfer(char *cmd, char *a1, char *a2, char *a3, int image) if(isnone){ fd = open("#s/boot", ORDWR); if(fd < 0 - || bind("#/", "/", MAFTER) < 0 - || amount(fd, "/bin", MREPL, "") < 0 - || bind("#c", "/dev", MAFTER) < 0 - || bind(bindir, "/bin", MREPL) < 0) + || bind("#/", "/", MAFTER) == -1 + || amount(fd, "/bin", MREPL, "") == -1 + || bind("#c", "/dev", MAFTER) == -1 + || bind(bindir, "/bin", MREPL) == -1) exits("building name space"); close(fd); } @@ -810,12 +810,12 @@ mountnet(void) rv = 0; - if(bind("#/", "/", MAFTER) < 0){ + if(bind("#/", "/", MAFTER) == -1){ logit("can't bind #/ to /: %r"); return reply("500 can't bind #/ to /: %r"); } - if(bind(nci->spec, "/net", MBEFORE) < 0){ + if(bind(nci->spec, "/net", MBEFORE) == -1){ logit("can't bind %s to /net: %r", nci->spec); rv = reply("500 can't bind %s to /net: %r", nci->spec); unmount("#/", "/"); diff --git a/sys/src/cmd/ip/ftpfs/ftpfs.c b/sys/src/cmd/ip/ftpfs/ftpfs.c index e254284c4..abe867982 100644 --- a/sys/src/cmd/ip/ftpfs/ftpfs.c +++ b/sys/src/cmd/ip/ftpfs/ftpfs.c @@ -190,7 +190,7 @@ main(int argc, char *argv[]) break; default: close(p[0]); - if(mount(p[1], -1, mountpoint, MREPL|MCREATE, "") < 0) + if(mount(p[1], -1, mountpoint, MREPL|MCREATE, "") == -1) fatal("mount failed: %r"); } exits(0); diff --git a/sys/src/cmd/ip/httpd/netlib_find.c b/sys/src/cmd/ip/httpd/netlib_find.c index d594e3f7f..23d1fae39 100644 --- a/sys/src/cmd/ip/httpd/netlib_find.c +++ b/sys/src/cmd/ip/httpd/netlib_find.c @@ -165,7 +165,7 @@ init800fs(char*name,char*pat) fd800fs = open(name, ORDWR); if(fd800fs < 0) exits("can't connect to 800fs server"); - if(mount(fd800fs, -1, "/mnt", MREPL, "") < 0) + if(mount(fd800fs, -1, "/mnt", MREPL, "") == -1) exits("can't mount /mnt"); fd800fs = open("/mnt/search", ORDWR); n = strlen("search=")+strlen(pat)+1; diff --git a/sys/src/cmd/ip/httpd/wikipost.c b/sys/src/cmd/ip/httpd/wikipost.c index 6d9279c47..fe66feac2 100644 --- a/sys/src/cmd/ip/httpd/wikipost.c +++ b/sys/src/cmd/ip/httpd/wikipost.c @@ -139,7 +139,7 @@ mountwiki(HConnect *c, char *service) hfail(c, HNotFound); exits("failed"); } - if(mount(fd, -1, "/mnt/wiki", MREPL, "") < 0){ + if(mount(fd, -1, "/mnt/wiki", MREPL, "") == -1){ syslog(0, LOG, "%s mount /mnt/wiki failed: %r", hp->remotesys); hfail(c, HNotFound); exits("failed"); diff --git a/sys/src/cmd/ip/telnetd.c b/sys/src/cmd/ip/telnetd.c index 62d708b21..92eeec7c3 100644 --- a/sys/src/cmd/ip/telnetd.c +++ b/sys/src/cmd/ip/telnetd.c @@ -576,14 +576,14 @@ conssim(void) char *field[10]; /* a pipe to simulate the /dev/cons */ - if(bind("#|", "/mnt/cons", MREPL) < 0) + if(bind("#|", "/mnt/cons", MREPL) == -1) fatal("/dev/cons1", 0, 0); - if(bind("/mnt/cons/data1", "/dev/cons", MREPL) < 0) + if(bind("/mnt/cons/data1", "/dev/cons", MREPL) == -1) fatal("/dev/cons2", 0, 0); /* a pipe to simulate consctl */ - if(bind("#|", "/mnt/consctl", MBEFORE) < 0 - || bind("/mnt/consctl/data1", "/dev/consctl", MREPL) < 0) + if(bind("#|", "/mnt/consctl", MBEFORE) == -1 + || bind("/mnt/consctl/data1", "/dev/consctl", MREPL) == -1) fatal("/dev/consctl", 0, 0); /* a process to read /dev/consctl and set the state in cons */ diff --git a/sys/src/cmd/lnfs.c b/sys/src/cmd/lnfs.c index dcc2a245d..e8bb1ce78 100644 --- a/sys/src/cmd/lnfs.c +++ b/sys/src/cmd/lnfs.c @@ -162,7 +162,7 @@ main(int argc, char *argv[]) break; default: close(p[0]); /* don't deadlock if child fails */ - if(mount(p[1], -1, defmnt, MREPL|MCREATE, "") < 0) + if(mount(p[1], -1, defmnt, MREPL|MCREATE, "") == -1) sysfatal("mount failed: %r"); } exits(0); diff --git a/sys/src/cmd/mount.c b/sys/src/cmd/mount.c index 20c27405c..2c8371911 100644 --- a/sys/src/cmd/mount.c +++ b/sys/src/cmd/mount.c @@ -97,7 +97,7 @@ main(int argc, char *argv[]) rv = mount(fd, -1, argv[1], flag, spec); else rv = amount0(fd, argv[1], flag, spec, keyspec); - if(rv < 0){ + if(rv == -1){ if(qflag) exits(0); fprint(2, "%s: mount %s: %r\n", argv0, argv[1]); diff --git a/sys/src/cmd/ndb/cs.c b/sys/src/cmd/ndb/cs.c index c508ee1a2..bb85080d4 100644 --- a/sys/src/cmd/ndb/cs.c +++ b/sys/src/cmd/ndb/cs.c @@ -310,7 +310,7 @@ mountinit(char *service, char *mntpt) * put ourselves into the file system */ close(p[0]); - if(mount(p[1], -1, mntpt, MAFTER, "") < 0) + if(mount(p[1], -1, mntpt, MAFTER, "") == -1) error("mount failed"); _exits(0); } @@ -1675,7 +1675,7 @@ err: qunlock(&mountlock); return -1; } - if(mount(fd, -1, mntpt, MAFTER, "") < 0){ + if(mount(fd, -1, mntpt, MAFTER, "") == -1){ close(fd); goto err; } diff --git a/sys/src/cmd/ndb/dns.c b/sys/src/cmd/ndb/dns.c index 3a88facec..692246d04 100644 --- a/sys/src/cmd/ndb/dns.c +++ b/sys/src/cmd/ndb/dns.c @@ -266,7 +266,7 @@ mountinit(char *service, char *mntpt) /* * put ourselves into the file system */ - if(mount(p[1], -1, mntpt, MAFTER, "") < 0) + if(mount(p[1], -1, mntpt, MAFTER, "") == -1) fprint(2, "dns mount failed: %r\n"); _exits(0); } diff --git a/sys/src/cmd/paqfs/paqfs.c b/sys/src/cmd/paqfs/paqfs.c index f4be7b6f1..029534a85 100644 --- a/sys/src/cmd/paqfs/paqfs.c +++ b/sys/src/cmd/paqfs/paqfs.c @@ -252,7 +252,7 @@ main(int argc, char *argv[]) break; default: close(pfd[1]); /* don't deadlock if child fails */ - if(mnt && mount(pfd[0], -1, mntpoint, MREPL|MCREATE, "") < 0) + if(mnt && mount(pfd[0], -1, mntpoint, MREPL|MCREATE, "") == -1) sysfatal("mount %s: %r", mntpoint); } exits(0); diff --git a/sys/src/cmd/pipefile.c b/sys/src/cmd/pipefile.c index 3c4f4dd75..c803b3f58 100644 --- a/sys/src/cmd/pipefile.c +++ b/sys/src/cmd/pipefile.c @@ -78,9 +78,9 @@ main(int argc, char *argv[]) sysfatal("open %s: %r", file); } - if(bind("#|", TEMP, MREPL) < 0) + if(bind("#|", TEMP, MREPL) == -1) sysfatal("bind pipe %s: %r", TEMP); - if(bind(TEMP "/data", file, MREPL) < 0) + if(bind(TEMP "/data", file, MREPL) == -1) sysfatal("bind %s %s: %r", TEMP "/data", file); fd0 = open(TEMP "/data1", OREAD); diff --git a/sys/src/cmd/plumb/fsys.c b/sys/src/cmd/plumb/fsys.c index 7c9e49e36..92764d248 100644 --- a/sys/src/cmd/plumb/fsys.c +++ b/sys/src/cmd/plumb/fsys.c @@ -216,7 +216,7 @@ startfsys(void) procrfork(fsysproc, nil, Stack, RFFDG); close(p[0]); - if(mount(p[1], -1, "/mnt/plumb", MREPL, "") < 0) + if(mount(p[1], -1, "/mnt/plumb", MREPL, "") == -1) error("can't mount /mnt/plumb: %r"); close(p[1]); } diff --git a/sys/src/cmd/ratfs/main.c b/sys/src/cmd/ratfs/main.c index c0add934f..38e46362e 100644 --- a/sys/src/cmd/ratfs/main.c +++ b/sys/src/cmd/ratfs/main.c @@ -103,7 +103,7 @@ main(int argc, char *argv[]) break; default: close(p[0]); - if(mount(p[1], -1, mountpoint, MREPL|MCREATE, "") < 0) + if(mount(p[1], -1, mountpoint, MREPL|MCREATE, "") == -1) fatal("mount failed: %r"); } exits(0); @@ -155,10 +155,9 @@ post(int fd, char *mountpoint) * another server is already running, so just exit. */ f = open(SRVFILE, ORDWR); - if(f >= 0 && mount(f, -1, mountpoint, MREPL|MCREATE, "") >= 0){ - unmount(0, mountpoint); - close(f); - exits(0); + if(f >= 0 && mount(f, -1, mountpoint, MREPL|MCREATE, "") != -1){ + unmount(0, mountpoint); + exits(0); } remove(SRVFILE); } diff --git a/sys/src/cmd/rio/fsys.c b/sys/src/cmd/rio/fsys.c index ebcdde17a..fca5c0469 100644 --- a/sys/src/cmd/rio/fsys.c +++ b/sys/src/cmd/rio/fsys.c @@ -105,7 +105,7 @@ int cexecpipe(int *p0, int *p1) { /* pipe the hard way to get close on exec */ - if(bind("#|", "/mnt/temp", MREPL) < 0) + if(bind("#|", "/mnt/temp", MREPL) == -1) return -1; *p0 = open("/mnt/temp/data", ORDWR); *p1 = open("/mnt/temp/data1", ORDWR|OCEXEC); @@ -235,11 +235,11 @@ filsysmount(Filsys *fs, int id) close(fs->sfd); /* close server end so mount won't hang if exiting */ sprint(buf, "%d", id); - if(mount(fs->cfd, -1, "/mnt/wsys", MREPL, buf) < 0){ + if(mount(fs->cfd, -1, "/mnt/wsys", MREPL, buf) == -1){ fprint(2, "mount failed: %r\n"); return -1; } - if(bind("/mnt/wsys", "/dev", MBEFORE) < 0){ + if(bind("/mnt/wsys", "/dev", MBEFORE) == -1){ fprint(2, "bind failed: %r\n"); return -1; } diff --git a/sys/src/cmd/scat/header.c b/sys/src/cmd/scat/header.c index 17955ecea..562998119 100644 --- a/sys/src/cmd/scat/header.c +++ b/sys/src/cmd/scat/header.c @@ -274,7 +274,7 @@ loop: /* * mount nfs jukebox server */ - if(mount(s1, -1, "/n/njuke", 0, "") < 0) { + if(mount(s1, -1, "/n/njuke", 0, "") == -1) { close(s1); Bprint(&bout, "\"mount /srv/%s /n/juke\" failed: %r\n", JUKEFS); goto out; @@ -300,7 +300,7 @@ loop: /* * mount 9660 server */ - if(mount(s2, -1, "/n/dss", 0, dssname) < 0) { + if(mount(s2, -1, "/n/dss", 0, dssname) == -1) { close(s2); if(count == 0) { // do it again so /n/njuke is in 9660's namespace diff --git a/sys/src/cmd/srv.c b/sys/src/cmd/srv.c index b706e3fa7..0839c8393 100644 --- a/sys/src/cmd/srv.c +++ b/sys/src/cmd/srv.c @@ -210,8 +210,8 @@ Mount: try = 0; } - if((!doauth && mount(fd, -1, mtpt, mountflag, "") < 0) - || (doauth && amount(fd, mtpt, mountflag, "") < 0)){ + if((!doauth && mount(fd, -1, mtpt, mountflag, "") == -1) + || (doauth && amount(fd, mtpt, mountflag, "") == -1)){ err[0] = 0; errstr(err, sizeof err); if(strstr(err, "Hangup") || strstr(err, "hungup") || strstr(err, "timed out")){ diff --git a/sys/src/cmd/tapefs/fs.c b/sys/src/cmd/tapefs/fs.c index caf57a819..95da4db18 100644 --- a/sys/src/cmd/tapefs/fs.c +++ b/sys/src/cmd/tapefs/fs.c @@ -140,7 +140,7 @@ main(int argc, char *argv[]) break; default: close(p[0]); /* don't deadlock if child fails */ - if(mount(p[1], -1, defmnt, MREPL|MCREATE, "") < 0) + if(mount(p[1], -1, defmnt, MREPL|MCREATE, "") == -1) error("mount failed"); } exits(0); diff --git a/sys/src/cmd/telco/telco.c b/sys/src/cmd/telco/telco.c index e754ca30d..4e20904e8 100644 --- a/sys/src/cmd/telco/telco.c +++ b/sys/src/cmd/telco/telco.c @@ -381,7 +381,7 @@ main(int argc, char *argv[]) if(write(fd, buf, strlen(buf)) < 0) error("writing /srv/telco"); close(fd); - if(mount(p[1], -1, "/net", MBEFORE, "") < 0) + if(mount(p[1], -1, "/net", MBEFORE, "") == -1) error("mount failed"); exits(0); } @@ -1400,11 +1400,10 @@ receiver(Dev *d) syslog(0, LOGFILE, "can't open telco: %r"); exits(0); } - if(mount(fd, -1, "/net", MAFTER, "") < 0){ + if(mount(fd, -1, "/net", MAFTER, "") == -1){ syslog(0, LOGFILE, "can't mount: %r"); exits(0); } - close(fd); /* open connection through the file system interface */ sprint(file, "/net/telco/%zd/data", d - dev); diff --git a/sys/src/cmd/trace.c b/sys/src/cmd/trace.c index 2678b0ff6..ca2ec79c8 100644 --- a/sys/src/cmd/trace.c +++ b/sys/src/cmd/trace.c @@ -584,11 +584,11 @@ drawtrace(void) line[sizeof(line) - 1] = '\0'; rfork(RFNAMEG); - if(mount(wfd, -1, "/mnt/wsys", MREPL, line) < 0) + if(mount(wfd, -1, "/mnt/wsys", MREPL, line) == -1) sysfatal("%s: Cannot mount %s under /mnt/wsys: %r", argv0, line); - if(bind("/mnt/wsys", "/dev", MBEFORE) < 0) + if(bind("/mnt/wsys", "/dev", MBEFORE) == -1) sysfatal("%s: Cannot bind /mnt/wsys in /dev: %r", argv0); diff --git a/sys/src/cmd/upas/fs/fs.c b/sys/src/cmd/upas/fs/fs.c index df3ea3829..c1e3109b3 100644 --- a/sys/src/cmd/upas/fs/fs.c +++ b/sys/src/cmd/upas/fs/fs.c @@ -359,7 +359,7 @@ main(int argc, char *argv[]) snprint(srvfile, sizeof srvfile, "/srv/upasfs.%s", user); post(srvfile, "upasfs", p[1]); }else - if(mount(p[1], -1, mntpt, MREPL, "") < 0) + if(mount(p[1], -1, mntpt, MREPL, "") == -1) error("mount failed"); } exits(""); diff --git a/sys/src/cmd/upas/imap4d/auth.c b/sys/src/cmd/upas/imap4d/auth.c index 27174ddfb..651593eb5 100644 --- a/sys/src/cmd/upas/imap4d/auth.c +++ b/sys/src/cmd/upas/imap4d/auth.c @@ -29,11 +29,10 @@ enableforwarding(void) fd = open("/srv/ratify", ORDWR); if(fd < 0) return; - if(!mount(fd, -1, "/mail/ratify", MBEFORE, "")){ + if(mount(fd, -1, "/mail/ratify", MBEFORE, "") == -1){ close(fd); return; } - close(fd); strncpy(peer, remote, sizeof peer); peer[sizeof peer - 1] = 0; diff --git a/sys/src/cmd/vac/vacfs.c b/sys/src/cmd/vac/vacfs.c index d94021744..cf3a2f239 100644 --- a/sys/src/cmd/vac/vacfs.c +++ b/sys/src/cmd/vac/vacfs.c @@ -216,7 +216,7 @@ threadmain(int argc, char *argv[]) if(!stdio){ close(p[0]); if(defmnt){ - if(mount(srvfd, -1, defmnt, MREPL|MCREATE, "") < 0) + if(mount(srvfd, -1, defmnt, MREPL|MCREATE, "") == -1) sysfatal("mount %s: %r", defmnt); } } diff --git a/sys/src/games/doom/i_sound.c b/sys/src/games/doom/i_sound.c index 50f1f118e..37873b133 100644 --- a/sys/src/games/doom/i_sound.c +++ b/sys/src/games/doom/i_sound.c @@ -484,7 +484,7 @@ void I_PlaySong(musicinfo_t *m, int loop) sysfatal("write: %r"); if(seek(0, 0, 0) != 0) sysfatal("seek: %r"); - if(bind("/fd/1", "/dev/audio", MREPL) < 0) + if(bind("/fd/1", "/dev/audio", MREPL) == -1) sysfatal("bind: %r"); while(loop && fork() > 0){ if(waitpid() < 0 || write(1, "", 0) < 0) diff --git a/sys/src/libauth/newns.c b/sys/src/libauth/newns.c index 172692cc2..fd5d6cb59 100644 --- a/sys/src/libauth/newns.c +++ b/sys/src/libauth/newns.c @@ -184,7 +184,7 @@ nsop(char *fn, int argc, char *argv[], AuthRpc *rpc) }else if(strcmp(argv0, "clear") == 0 && argc == 0){ rfork(RFCNAMEG); }else if(strcmp(argv0, "bind") == 0 && argc == 2){ - if(bind(argv[0], argv[1], flags) < 0 && newnsdebug) + if(bind(argv[0], argv[1], flags) == -1 && newnsdebug) fprint(2, "%s: bind: %s %s: %r\n", fn, argv[0], argv[1]); }else if(strcmp(argv0, "unmount") == 0){ if(argc == 1) @@ -199,10 +199,10 @@ nsop(char *fn, int argc, char *argv[], AuthRpc *rpc) return 0; } if(argc == 2){ - if(famount(fd, rpc, argv[1], flags, "") < 0 && newnsdebug) + if(famount(fd, rpc, argv[1], flags, "") == -1 && newnsdebug) fprint(2, "%s: mount: %s %s: %r\n", fn, argv[0], argv[1]); }else if(argc == 3){ - if(famount(fd, rpc, argv[1], flags, argv[2]) < 0 && newnsdebug) + if(famount(fd, rpc, argv[1], flags, argv[2]) == -1 && newnsdebug) fprint(2, "%s: mount: %s %s %s: %r\n", fn, argv[0], argv[1], argv[2]); } close(fd);