Red Hat Bugzilla – Bug 56169
_PATH_MNTTAB should be "/etc/mtab"
Last modified: 2016-11-24 09:48:19 EST
Description of Problem:
Should not _PATH_MNTTAB in paths.h be "/etc/mtab"? It is currently set
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. look in /usr/include/paths.h
_PATH_MNTTAB is #defined as "/etc/fstab"
_PATH_MNTTAB #defined as "/etc/mtab"
the libc docs in info also seem to say that _PATH_MNTTAB should be defined
in 'mntent.h' but that doesn't seem to be the case.
The filenames given above should never be used directly. The
portable way to handle these file is to use the macros `_PATH_FSTAB',
defined in `fstab.h' and `_PATH_MNTTAB', defined in `mntent.h',
respectively. There are also two alternate macro names `FSTAB' and
`_PATH_MOUNTED' defined but both names are deprecated and kept only for
backward compatibility. The two former names should always be used.
Created attachment 37382 [details]
define _PATH_MNTTAB to "/etc/mtab"
No. What you want is _PATH_MOUNTED. There is no arguing about this, what we
use are the tradional names and they have to stay. Even if some people find
them counter-intuitive at times.