mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-29 18:36:38 +02:00
Whitespace cleanups.
2008-01-21 Matthias Clasen <mclasen@redhat.com> * glocal*.c: * gvolumemanager.c: Whitespace cleanups. * glocalfileoutputsteam.c (_g_local_file_output_stream_create): Use the right mode when creating the file. svn path=/trunk/; revision=6341
This commit is contained in:
committed by
Matthias Clasen
parent
5fbfef4cb7
commit
54300dde6d
@@ -1,3 +1,11 @@
|
|||||||
|
2008-01-21 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* glocal*.c:
|
||||||
|
* gvolumemanager.c: Whitespace cleanups.
|
||||||
|
|
||||||
|
* glocalfileoutputsteam.c (_g_local_file_output_stream_create):
|
||||||
|
Use the right mode when creating the file.
|
||||||
|
|
||||||
2008-01-21 Murray Cumming,,, <murrayc@murrayc.com>
|
2008-01-21 Murray Cumming,,, <murrayc@murrayc.com>
|
||||||
|
|
||||||
* gfileenumerator.c:
|
* gfileenumerator.c:
|
||||||
|
@@ -38,7 +38,8 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
static gboolean g_local_directory_monitor_cancel (GFileMonitor *monitor);
|
static gboolean g_local_directory_monitor_cancel (GFileMonitor *monitor);
|
||||||
static void mounts_changed (GUnixMountMonitor *mount_monitor, gpointer user_data);
|
static void mounts_changed (GUnixMountMonitor *mount_monitor,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
G_DEFINE_ABSTRACT_TYPE (GLocalDirectoryMonitor, g_local_directory_monitor, G_TYPE_FILE_MONITOR)
|
G_DEFINE_ABSTRACT_TYPE (GLocalDirectoryMonitor, g_local_directory_monitor, G_TYPE_FILE_MONITOR)
|
||||||
|
|
||||||
@@ -269,7 +270,7 @@ get_default_local_directory_monitor (gpointer data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_local_directory_monitor_new:
|
* _g_local_directory_monitor_new:
|
||||||
* @dirname: filename of the directory to monitor.
|
* @dirname: filename of the directory to monitor.
|
||||||
* @flags: #GFileMonitorFlags.
|
* @flags: #GFileMonitorFlags.
|
||||||
*
|
*
|
||||||
|
@@ -256,8 +256,7 @@ g_local_file_input_stream_can_seek (GFileInputStream *stream)
|
|||||||
|
|
||||||
pos = lseek (file->priv->fd, 0, SEEK_CUR);
|
pos = lseek (file->priv->fd, 0, SEEK_CUR);
|
||||||
|
|
||||||
if (pos == (off_t)-1 &&
|
if (pos == (off_t)-1 && errno == ESPIPE)
|
||||||
errno == ESPIPE)
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -110,8 +110,7 @@ g_local_file_monitor_finalize (GObject *object)
|
|||||||
(*G_OBJECT_CLASS (g_local_file_monitor_parent_class)->finalize) (object);
|
(*G_OBJECT_CLASS (g_local_file_monitor_parent_class)->finalize) (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void g_local_file_monitor_class_init (GLocalFileMonitorClass *klass)
|
||||||
g_local_file_monitor_class_init (GLocalFileMonitorClass* klass)
|
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
|
@@ -306,8 +306,7 @@ g_local_file_output_stream_can_seek (GFileOutputStream *stream)
|
|||||||
|
|
||||||
pos = lseek (file->priv->fd, 0, SEEK_CUR);
|
pos = lseek (file->priv->fd, 0, SEEK_CUR);
|
||||||
|
|
||||||
if (pos == (off_t)-1 &&
|
if (pos == (off_t)-1 && errno == ESPIPE)
|
||||||
errno == ESPIPE)
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -437,9 +436,7 @@ _g_local_file_output_stream_create (const char *filename,
|
|||||||
else
|
else
|
||||||
mode = 0666;
|
mode = 0666;
|
||||||
|
|
||||||
fd = g_open (filename,
|
fd = g_open (filename, O_CREAT | O_EXCL | O_WRONLY, mode);
|
||||||
O_CREAT | O_EXCL | O_WRONLY,
|
|
||||||
0666);
|
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
{
|
{
|
||||||
int errsv = errno;
|
int errsv = errno;
|
||||||
@@ -480,9 +477,7 @@ _g_local_file_output_stream_append (const char *filename,
|
|||||||
else
|
else
|
||||||
mode = 0666;
|
mode = 0666;
|
||||||
|
|
||||||
fd = g_open (filename,
|
fd = g_open (filename, O_CREAT | O_APPEND | O_WRONLY, mode);
|
||||||
O_CREAT | O_APPEND | O_WRONLY,
|
|
||||||
mode);
|
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
{
|
{
|
||||||
int errsv = errno;
|
int errsv = errno;
|
||||||
@@ -863,9 +858,7 @@ _g_local_file_output_stream_replace (const char *filename,
|
|||||||
mode = 0666;
|
mode = 0666;
|
||||||
|
|
||||||
/* If the file doesn't exist, create it */
|
/* If the file doesn't exist, create it */
|
||||||
fd = g_open (filename,
|
fd = g_open (filename, O_CREAT | O_EXCL | O_WRONLY, mode);
|
||||||
O_CREAT | O_EXCL | O_WRONLY,
|
|
||||||
mode);
|
|
||||||
|
|
||||||
if (fd == -1 && errno == EEXIST)
|
if (fd == -1 && errno == EEXIST)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user