Deleted Added
full compact
35d34
< #if 0
37,39d35
< #endif
< static const char rcsid[] =
< "$Id$";
49c45
< #include <err.h>
---
> #include <errno.h>
96c92,93
< warnx("can't open checklist file: %s", _PATH_FSTAB);
---
> fprintf(stderr, "Can't open checklist file: %s\n",
> _PATH_FSTAB);
225,226c222,225
< if ((*dkp = (struct disk *)malloc(sizeof(struct disk))) == NULL)
< errx(8, "out of memory");
---
> if ((*dkp = (struct disk *)malloc(sizeof(struct disk))) == NULL) {
> fprintf(stderr, "out of memory");
> exit (8);
> }
228,229c227,230
< if ((dk->name = malloc(len + 1)) == NULL)
< errx(8, "out of memory");
---
> if ((dk->name = malloc(len + 1)) == NULL) {
> fprintf(stderr, "out of memory");
> exit (8);
> }
252,253c253,256
< if ((*ppt = (struct part *)malloc(sizeof(struct part))) == NULL)
< errx(8, "out of memory");
---
> if ((*ppt = (struct part *)malloc(sizeof(struct part))) == NULL) {
> fprintf(stderr, "out of memory");
> exit (8);
> }
255,256c258,261
< if ((pt->name = malloc(strlen(name) + 1)) == NULL)
< errx(8, "out of memory");
---
> if ((pt->name = malloc(strlen(name) + 1)) == NULL) {
> fprintf(stderr, "out of memory");
> exit (8);
> }
258,259c263,266
< if ((pt->fsname = malloc(strlen(fsname) + 1)) == NULL)
< errx(8, "out of memory");
---
> if ((pt->fsname = malloc(strlen(fsname) + 1)) == NULL) {
> fprintf(stderr, "out of memory");
> exit (8);
> }
274c281
< warn("fork");
---
> perror("fork");
290c297
< int retried = 0, l;
---
> int retried = 0, len;
294,295c301
< warn("/");
< printf("Can't stat root\n");
---
> printf("Can't stat /: %s\n", strerror(errno));
301,302c307
< warn("%s", newname);
< printf("Can't stat %s\n", newname);
---
> printf("Can't stat %s: %s\n", newname, strerror(errno));
310,311c315
< warn("%s", raw);
< printf("Can't stat %s\n", raw);
---
> printf("Can't stat %s: %s\n", raw, strerror(errno));
321c325
< newname = unrawname(origname);
---
> newname = unrawname(newname);
325,326c329,330
< l = strlen(origname) - 1;
< if (l > 0 && origname[l] == '/')
---
> len = strlen(origname) - 1;
> if (len > 0 && origname[len] == '/')
328,329c332,333
< origname[l] = '\0';
< if(!(fsinfo=getfsfile(origname))) {
---
> origname[len] = '\0';
> if ((fsinfo = getfsfile(origname)) == NULL) {