diff -urN rrdtool-1.3.1.orig/src/rrd_tool.c rrdtool-1.3.1.patched/src/rrd_tool.c
|
old
|
new
|
|
| 419 | 419 | == 0) { |
| 420 | 420 | |
| 421 | 421 | #ifdef HAVE_CHROOT |
| 422 | | chroot(argv[2]); |
| 423 | | if (errno != 0) { |
| | 422 | if (chroot(argv[2]) != 0) { |
| 424 | 423 | fprintf(stderr, |
| 425 | 424 | "ERROR: can't change root to '%s' errno=%d\n", |
| 426 | 425 | argv[2], errno); |
| … |
… |
|
| 439 | 438 | } |
| 440 | 439 | } |
| 441 | 440 | if (strcmp(firstdir, "")) { |
| 442 | | chdir(firstdir); |
| 443 | | if (errno != 0) { |
| | 441 | if (chdir(firstdir) != 0) { |
| 444 | 442 | fprintf(stderr, "ERROR: %s\n", rrd_strerror(errno)); |
| 445 | 443 | exit(errno); |
| 446 | 444 | } |