[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xfs_check exit code?
Nathan Scott wrote:
> On Mon, Dec 02, 2002 at 07:16:38AM -0500, Michael Sinz wrote:
>
>>I have been, it seems wrongly, assuming that if xfs_check finds
>>a problem on the disk that the exit code is non-zero. (And,
>>conversely, if all is well, that the exit code is zero)
>>
>>Anyway, I have, this weekend, had some problems with one of my machines.
>>(I have not fully diagnosed the problem so I don't want to point fingers
>>at XFS yet). During the recovery process, I used my /boot recovery
>>script and, while xfs_check found errors, the exit code of xfs_check
>>was zero. This prevented auto-recovery from working.
>>
>>Is the exit code part of the defined API for xfs_check? Could it be
>>part of the defined behavior?
>>
>>For now I will need to check if xfs_check has any output - which is
>>almost as good as long as that behavior is "defined"
>
>
> This is what is currently used in the XFS regression tests. From
> a quick look in the cmd/xfsprogs/db/check.c source, it looks like
> the intent was that an error would be flagged with an exit code of
> 2, and a serious_error with a code of 3. Looks like somewhere on
> the way, this is getting lost. If you're keen to make this work,
> it shouldn't be too difficult to figure out where things are going
> astray... I don't have much time to spend on it right now though.
When I can come up for some air on the current project at work I will
have a look at it. Since this was the intent then I can at least
try to make it do that without going against the intent.
--
Michael Sinz -- Director, Systems Engineering -- Worldgate Communications
A master's secrets are only as good as
the master's ability to explain them to others.