On 3/24/16 6:15 AM, jtulak@xxxxxxxxxx wrote:
> From: Jan Tulak <jtulak@xxxxxxxxxx>
>
> Unify mkfs.xfs behaviour a bit and never truncate files. If the user
> is trying to mkfs an existing file, we don't want to destroy anything
> he did with the file before (sparse file, allocations...)
Hm, I guess so ... What motivated this change? I see that it
changes behavior, but I'm not sure what it unifies or fixes -
can you explain more?
Both, I think. The non-truncating is a new change, a fix of undesired side effects, where user lost his changes to the file, like sparse file... The rest should be unifying the behavior w.r.t. mkfs arguments. Do you think that the O_TRUNC change should be a separate patch?
statres !=0 doesn't imply ENOENT; it could be EACCES
> + if (*isfile && statres != 0 && (no_size || no_name)) {
or several other errors. You'd need to check errno to know
for sure.
Well, then I need to print two errors. One if the file doesn't exists, but additional arguments will fix it, and one for other cases, where I will print the specific error...
Cheers,
Jan
_______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs