* vfs.c (mc_open): Corrected FIXME. Now the "mode" parameter is
only accessed when flags contains O_CREAT.
Этот коммит содержится в:
родитель
d13910537a
Коммит
e9fcc04816
@ -1,3 +1,8 @@
|
||||
2004-09-24 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
* vfs.c (mc_open): Corrected FIXME. Now the "mode" parameter is
|
||||
only accessed when flags contains O_CREAT.
|
||||
|
||||
2004-09-24 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
* cpio.c: Replaced NULL with (char *) NULL. Likewise for 0, where
|
||||
|
11
vfs/vfs.c
11
vfs/vfs.c
@ -318,10 +318,13 @@ mc_open (const char *filename, int flags, ...)
|
||||
char *file = vfs_canon (filename);
|
||||
struct vfs_class *vfs = vfs_get_class (file);
|
||||
|
||||
/* Get the mode flag */ /* FIXME: should look if O_CREAT is present */
|
||||
va_start (ap, flags);
|
||||
mode = va_arg (ap, int);
|
||||
va_end (ap);
|
||||
/* Get the mode flag */
|
||||
if (flags & O_CREAT) {
|
||||
va_start (ap, flags);
|
||||
mode = va_arg (ap, int);
|
||||
va_end (ap);
|
||||
} else
|
||||
mode = 0;
|
||||
|
||||
if (!vfs->open) {
|
||||
g_free (file);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user