X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/95f51977ddc18faa2e212f30c00a39540b39f325..ca67e7b465996afb3821d6a075c4dc6a7f0f5d52:/usr/src/bin/df.c diff --git a/usr/src/bin/df.c b/usr/src/bin/df.c index bf960cdb61..8b6db84201 100644 --- a/usr/src/bin/df.c +++ b/usr/src/bin/df.c @@ -8,11 +8,11 @@ char copyright[] = "@(#) Copyright (c) 1980 Regents of the University of California.\n\ All rights reserved.\n"; -#endif not lint +#endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)df.c 5.1 (Berkeley) 4/30/85"; -#endif not lint +static char sccsid[] = "@(#)df.c 5.3 (Berkeley) 1/10/88"; +#endif /* not lint */ #include #include @@ -85,7 +85,7 @@ main(argc, argv) (void) strcpy(root, fsp->fs_spec); dfree(fsp->fs_spec, 1); } - endfsent(); + (void)endfsent(); exit(0); } for (i=1; ifs_spec, &stb) == 0 && stb.st_rdev == stbuf.st_dev) { file = fsp->fs_spec; - endfsent(); + (void)endfsent(); goto found; } } - endfsent(); + (void)endfsent(); fprintf(stderr, "%s: mounted on unknown device\n", file); return; } @@ -128,7 +128,7 @@ found: perror(file); return; } - if (bread(SBLOCK, (char *)&sblock, SBSIZE) == 0) { + if (bread((long)SBOFF, (char *)&sblock, SBSIZE) == 0) { (void) close(fi); return; } @@ -156,18 +156,18 @@ found: long lseek(); -bread(bno, buf, cnt) - daddr_t bno; +bread(off, buf, cnt) + long off; char *buf; { int n; extern errno; - (void) lseek(fi, (long)(bno * DEV_BSIZE), 0); + (void) lseek(fi, off, 0); if ((n=read(fi, buf, cnt)) != cnt) { /* probably a dismounted disk if errno == EIO */ if (errno != EIO) { - printf("\nread error bno = %ld\n", bno); + printf("\nread error off = %ld\n", off); printf("count = %d; errno = %d\n", n, errno); } return (0);