mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-22 03:02:06 +03:00
* vfs.c (mc_open): Corrected FIXME. Now the "mode" parameter is
only accessed when flags contains O_CREAT.
This commit is contained in:
parent
d13910537a
commit
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>
|
2004-09-24 Roland Illig <roland.illig@gmx.de>
|
||||||
|
|
||||||
* cpio.c: Replaced NULL with (char *) NULL. Likewise for 0, where
|
* 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);
|
char *file = vfs_canon (filename);
|
||||||
struct vfs_class *vfs = vfs_get_class (file);
|
struct vfs_class *vfs = vfs_get_class (file);
|
||||||
|
|
||||||
/* Get the mode flag */ /* FIXME: should look if O_CREAT is present */
|
/* Get the mode flag */
|
||||||
va_start (ap, flags);
|
if (flags & O_CREAT) {
|
||||||
mode = va_arg (ap, int);
|
va_start (ap, flags);
|
||||||
va_end (ap);
|
mode = va_arg (ap, int);
|
||||||
|
va_end (ap);
|
||||||
|
} else
|
||||||
|
mode = 0;
|
||||||
|
|
||||||
if (!vfs->open) {
|
if (!vfs->open) {
|
||||||
g_free (file);
|
g_free (file);
|
||||||
|
Loading…
Reference in New Issue
Block a user