From 0f57dbd94e926bcaec81cdd26cbbcd806b06bacc Mon Sep 17 00:00:00 2001 From: George Lebl Date: Tue, 23 Feb 1999 09:57:52 +0000 Subject: [PATCH] Tue Feb 23 01:57:22 1999 George Lebl * gmount.c: fix obvious typos, use str in option_has_user, fix mt_opts typo and is_block_device_mountable can't return TRUE nor FALSE, so it returns NULL this makes it actually compile -George --- gnome/ChangeLog | 6 ++++++ gnome/gmount.c | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 720599ab5..aaede96ab 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,9 @@ +Tue Feb 23 01:57:22 1999 George Lebl + + * gmount.c: fix obvious typos, use str in option_has_user, fix + mt_opts typo and is_block_device_mountable can't return TRUE nor + FALSE, so it returns NULL + 1999-02-23 Miguel de Icaza * gnome-file-property-dialog.c (apply_metadata_change): Fix memory leak. diff --git a/gnome/gmount.c b/gnome/gmount.c index dc2c0143d..4a6a41d9b 100644 --- a/gnome/gmount.c +++ b/gnome/gmount.c @@ -97,7 +97,8 @@ void free (void *ptr); static gboolean option_has_user (char *str) { - if ((p = strstr (mnt->mnt_opts, "user")) != NULL){ + char *p; + if ((p = strstr (str, "user")) != NULL){ if ((p - 2) >= str){ if (strncmp (p - 2, "nouser", 6) == 0) return FALSE; @@ -122,14 +123,14 @@ is_block_device_mountable (char *devname) char *retval = NULL; if (getuid () == 0) - return TRUE; + return NULL; f = setmntent ("/etc/fstab", "r"); if (f == NULL) - return FALSE; + return NULL; while ((mnt = getmntent (f))){ - if (option_has_user (mnt->mt_opts)){ + if (option_has_user (mnt->mnt_opts)){ retval = g_strdup (mnt->mnt_dir); break; }