From fc9a69ca37cb5b4f77a9cfcd0f4458a981208c5d Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 12 May 2001 13:43:46 +0000 Subject: [PATCH] ChangeLog, unix.c: unix.c (PRS): Skip validation of -C's file descriptor if it is zero, since that is special case. --- e2fsck/ChangeLog | 5 +++++ e2fsck/unix.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index da16dd5..a938444 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,8 @@ +2001-05-12 Theodore Tso + + * unix.c (PRS): Skip validation of -C's file descriptor if it is + zero, since that is special case. + 2001-05-09 Theodore Tso * super.c (release_orphan_inodes): Add gettext quoting around diff --git a/e2fsck/unix.c b/e2fsck/unix.c index 675bb90..049e273 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -483,6 +483,8 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) case 'C': ctx->progress = e2fsck_update_progress; ctx->progress_fd = atoi(optarg); + if (!ctx->progress_fd) + break; /* Validate the file descriptor to avoid disasters */ fd = dup(ctx->progress_fd); if (fd < 0) { -- 1.8.3.1