mirror of https://github.com/MidnightCommander/mc
Tue Feb 23 01:57:22 1999 George Lebl <jirka@5z.com>
* 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
This commit is contained in:
parent
f1120801b6
commit
0f57dbd94e
|
@ -1,3 +1,9 @@
|
||||||
|
Tue Feb 23 01:57:22 1999 George Lebl <jirka@5z.com>
|
||||||
|
|
||||||
|
* 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 <miguel@nuclecu.unam.mx>
|
1999-02-23 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gnome-file-property-dialog.c (apply_metadata_change): Fix memory leak.
|
* gnome-file-property-dialog.c (apply_metadata_change): Fix memory leak.
|
||||||
|
|
|
@ -97,7 +97,8 @@ void free (void *ptr);
|
||||||
static gboolean
|
static gboolean
|
||||||
option_has_user (char *str)
|
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 ((p - 2) >= str){
|
||||||
if (strncmp (p - 2, "nouser", 6) == 0)
|
if (strncmp (p - 2, "nouser", 6) == 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -122,14 +123,14 @@ is_block_device_mountable (char *devname)
|
||||||
char *retval = NULL;
|
char *retval = NULL;
|
||||||
|
|
||||||
if (getuid () == 0)
|
if (getuid () == 0)
|
||||||
return TRUE;
|
return NULL;
|
||||||
|
|
||||||
f = setmntent ("/etc/fstab", "r");
|
f = setmntent ("/etc/fstab", "r");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
return FALSE;
|
return NULL;
|
||||||
|
|
||||||
while ((mnt = getmntent (f))){
|
while ((mnt = getmntent (f))){
|
||||||
if (option_has_user (mnt->mt_opts)){
|
if (option_has_user (mnt->mnt_opts)){
|
||||||
retval = g_strdup (mnt->mnt_dir);
|
retval = g_strdup (mnt->mnt_dir);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue