Re: OOM & [OT] util-linux-2.12e

From: Andreas Schwab
Date: Mon Sep 20 2004 - 07:16:45 EST


Paulo Marques <pmarques@xxxxxxxxxxxx> writes:

> Andreas Schwab wrote:
>> DervishD <lkml@xxxxxxxxxxxx> writes:
>>
>>> Hi Andreas :)
>>>
>>> * Andreas Schwab <schwab@xxxxxxx> dixit:
>>>
>>>>>- fix all broken apps that still rely on mtab. like GNU df(1)
>>>>
>>>>df does not rely on /etc/mtab. It relies on getmntent.
>>>
>>> Then my GNU df has any problem :???
>> No, if any then getmntent.
>
> I don't get this. From "man getmntent" it seems that getmntent is just a
> parser for /etc/mtab, and that you must call "setmntent" with the filename
> you want to parse.
>
> So if you do "setmntent("/etc/mtab",...)" you're explicitly saying that
> you want getmntent to use /etc/mtab. This is just a open/read in disguise.
>
> Am I missing something?

No. You are of course right, but the df sources don't reference /etc/mtab
directly, but use _PATH_MOUNTED from <paths.h>.

Andreas.

--
Andreas Schwab, SuSE Labs, schwab@xxxxxxx
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/