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
Этот коммит содержится в:
родитель
f1120801b6
Коммит
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>
|
||||
|
||||
* gnome-file-property-dialog.c (apply_metadata_change): Fix memory leak.
|
||||
|
@ -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;
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user