X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=lib%2Flibzfs%2Flibzfs_diff.c;h=77d5a09ec63cd65a71494614c1d50737f583599d;hb=389cf730cedd42dd1ef653e9358635c114e458d5;hp=5b3f93465d896a1c26174424508407d960983c20;hpb=c65aa5b2b9c48375ea1c451f252f0056e16f4e49;p=zfs.git diff --git a/lib/libzfs/libzfs_diff.c b/lib/libzfs/libzfs_diff.c index 5b3f934..77d5a09 100644 --- a/lib/libzfs/libzfs_diff.c +++ b/lib/libzfs/libzfs_diff.c @@ -141,7 +141,7 @@ stream_bytes(FILE *fp, const char *string) if (*string > ' ' && *string != '\\' && *string < '\177') (void) fprintf(fp, "%c", *string++); else - (void) fprintf(fp, "\\%03o", *string++); + (void) fprintf(fp, "\\%03o", (unsigned char)*string++); } } @@ -160,18 +160,22 @@ print_what(FILE *fp, mode_t what) case S_IFDIR: symbol = '/'; break; +#ifdef S_IFDOOR case S_IFDOOR: symbol = '>'; break; +#endif case S_IFIFO: symbol = '|'; break; case S_IFLNK: symbol = '@'; break; +#ifdef S_IFPORT case S_IFPORT: symbol = 'P'; break; +#endif case S_IFSOCK: symbol = '='; break; @@ -426,7 +430,7 @@ differ(void *arg) if ((ofp = fdopen(di->outputfd, "w")) == NULL) { di->zerr = errno; - (void) strerror_r(errno, di->errbuf, sizeof (di->errbuf)); + strncpy(di->errbuf, strerror(errno), sizeof (di->errbuf)); (void) close(di->datafd); return ((void *)-1); } @@ -726,7 +730,7 @@ setup_differ_info(zfs_handle_t *zhp, const char *fromsnap, { di->zhp = zhp; - di->cleanupfd = open(ZFS_DEV, O_RDWR|O_EXCL); + di->cleanupfd = open(ZFS_DEV, O_RDWR); VERIFY(di->cleanupfd >= 0); if (get_snapshot_names(di, fromsnap, tosnap) != 0)