* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
-#ifdef HAVE_SYS_POLL_H
-#include <sys/poll.h>
#endif
-#endif
-#ifdef HAVE_POLL_H
+#ifdef HAVE_POLL
#include <poll.h>
#endif
#include <stdio.h>
*
* Routines for managing mounted UNIX mount points and paths.
*
- * Note that <filename><gio/gunixmounts.h></filename> belongs to the
- * UNIX-specific GIO interfaces, thus you have to use the
- * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
+ * Note that `<gio/gunixmounts.h>` belongs to the UNIX-specific GIO
+ * interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config
+ * file when using it.
*/
/*
/**
* g_unix_is_mount_path_system_internal:
- * @mount_path: a mount path, e.g. <filename>/media/disk</filename>
- * or <filename>/usr</filename>
+ * @mount_path: a mount path, e.g. `/media/disk` or `/usr`
*
* Determines if @mount_path is considered an implementation of the
* OS. This is primarily used for hiding mountable and mounted volumes
"/", /* we already have "Filesystem root" in Nautilus */
"/bin",
"/boot",
+ "/compat/linux/proc",
+ "/compat/linux/sys",
"/dev",
"/etc",
"/home",
"/lib",
"/lib64",
+ "/libexec",
"/live/cow",
"/live/image",
"/media",
"/mnt",
"/opt",
+ "/rescue",
"/root",
"/sbin",
"/srv",
"/tmp",
"/usr",
+ "/usr/X11R6",
"/usr/local",
+ "/usr/obj",
+ "/usr/ports",
+ "/usr/src",
+ "/usr/xobj",
"/var",
"/var/crash",
"/var/local",
"devfs",
"devpts",
"ecryptfs",
+ "fdescfs",
"kernfs",
"linprocfs",
+ "mfs",
+ "nullfs",
"proc",
"procfs",
"ptyfs",
mount_entry = g_new0 (GUnixMountEntry, 1);
mount_entry->mount_path = g_strdup (mntent->mnt_dir);
- if (strcmp (mntent->mnt_fsname, "/dev/root") == 0)
+ if (g_strcmp0 (mntent->mnt_fsname, "/dev/root") == 0)
mount_entry->device_path = g_strdup (_resolve_dev_root ());
else
mount_entry->device_path = g_strdup (mntent->mnt_fsname);
{
dev_t root_dev = statbuf.st_dev;
FILE *f;
- char buf[1024];
/* see if device with similar major:minor as /dev/root is mention
* in /etc/mtab (it usually is)
struct mntent *entp;
#ifdef HAVE_GETMNTENT_R
struct mntent ent;
+ char buf[1024];
while ((entp = getmntent_r (f, &ent, buf, sizeof (buf))) != NULL)
{
#else