mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-21 19:54:51 +02:00
gunixmounts: Add missing const qualifier for mtab path
get_mtab_read_file and get_mtab_monitor_file returns const path, but const qualifier is missing. Let's add it. https://bugzilla.gnome.org/show_bug.cgi?id=779607
This commit is contained in:
parent
2db36d0d5c
commit
41a4a70b43
@ -437,7 +437,7 @@ _g_get_unix_mounts (void)
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
get_mtab_read_file (void)
|
get_mtab_read_file (void)
|
||||||
{
|
{
|
||||||
#ifdef _PATH_MOUNTED
|
#ifdef _PATH_MOUNTED
|
||||||
@ -464,7 +464,7 @@ _g_get_unix_mounts (void)
|
|||||||
#endif
|
#endif
|
||||||
struct mntent *mntent;
|
struct mntent *mntent;
|
||||||
FILE *file;
|
FILE *file;
|
||||||
char *read_file;
|
const char *read_file;
|
||||||
GUnixMountEntry *mount_entry;
|
GUnixMountEntry *mount_entry;
|
||||||
GHashTable *mounts_hash;
|
GHashTable *mounts_hash;
|
||||||
GList *return_list;
|
GList *return_list;
|
||||||
@ -538,10 +538,10 @@ _g_get_unix_mounts (void)
|
|||||||
|
|
||||||
#endif /* HAVE_LIBMOUNT */
|
#endif /* HAVE_LIBMOUNT */
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
get_mtab_monitor_file (void)
|
get_mtab_monitor_file (void)
|
||||||
{
|
{
|
||||||
static char *mountinfo_path = NULL;
|
static const char *mountinfo_path = NULL;
|
||||||
#ifdef HAVE_LIBMOUNT
|
#ifdef HAVE_LIBMOUNT
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
#endif
|
#endif
|
||||||
@ -584,7 +584,7 @@ get_mtab_monitor_file (void)
|
|||||||
|
|
||||||
G_LOCK_DEFINE_STATIC(getmntent);
|
G_LOCK_DEFINE_STATIC(getmntent);
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
get_mtab_read_file (void)
|
get_mtab_read_file (void)
|
||||||
{
|
{
|
||||||
#ifdef _PATH_MOUNTED
|
#ifdef _PATH_MOUNTED
|
||||||
@ -594,7 +594,7 @@ get_mtab_read_file (void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
get_mtab_monitor_file (void)
|
get_mtab_monitor_file (void)
|
||||||
{
|
{
|
||||||
return get_mtab_read_file ();
|
return get_mtab_read_file ();
|
||||||
@ -605,7 +605,7 @@ _g_get_unix_mounts (void)
|
|||||||
{
|
{
|
||||||
struct mnttab mntent;
|
struct mnttab mntent;
|
||||||
FILE *file;
|
FILE *file;
|
||||||
char *read_file;
|
const char *read_file;
|
||||||
GUnixMountEntry *mount_entry;
|
GUnixMountEntry *mount_entry;
|
||||||
GList *return_list;
|
GList *return_list;
|
||||||
|
|
||||||
@ -645,7 +645,7 @@ _g_get_unix_mounts (void)
|
|||||||
/* mntctl.h (AIX) {{{2 */
|
/* mntctl.h (AIX) {{{2 */
|
||||||
#elif defined(HAVE_SYS_MNTCTL_H) && defined(HAVE_SYS_VMOUNT_H) && defined(HAVE_SYS_VFS_H)
|
#elif defined(HAVE_SYS_MNTCTL_H) && defined(HAVE_SYS_VMOUNT_H) && defined(HAVE_SYS_VFS_H)
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
get_mtab_monitor_file (void)
|
get_mtab_monitor_file (void)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -713,7 +713,7 @@ _g_get_unix_mounts (void)
|
|||||||
/* sys/mount.h {{{2 */
|
/* sys/mount.h {{{2 */
|
||||||
#elif (defined(HAVE_GETVFSSTAT) || defined(HAVE_GETFSSTAT)) && defined(HAVE_FSTAB_H) && defined(HAVE_SYS_MOUNT_H)
|
#elif (defined(HAVE_GETVFSSTAT) || defined(HAVE_GETFSSTAT)) && defined(HAVE_FSTAB_H) && defined(HAVE_SYS_MOUNT_H)
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
get_mtab_monitor_file (void)
|
get_mtab_monitor_file (void)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -784,7 +784,7 @@ _g_get_unix_mounts (void)
|
|||||||
/* Interix {{{2 */
|
/* Interix {{{2 */
|
||||||
#elif defined(__INTERIX)
|
#elif defined(__INTERIX)
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
get_mtab_monitor_file (void)
|
get_mtab_monitor_file (void)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user