Title: [210580] trunk/Source/WebCore
Revision
210580
Author
[email protected]
Date
2017-01-11 00:52:56 -0800 (Wed, 11 Jan 2017)

Log Message

Unreviewed. Fix GTK+ build after r210571.

Add getFileDeviceId implementation to FileSystemGlib.cpp.

* platform/glib/FileSystemGlib.cpp:
(WebCore::getFileDeviceId):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (210579 => 210580)


--- trunk/Source/WebCore/ChangeLog	2017-01-11 08:47:42 UTC (rev 210579)
+++ trunk/Source/WebCore/ChangeLog	2017-01-11 08:52:56 UTC (rev 210580)
@@ -1,3 +1,12 @@
+2017-01-11  Carlos Garcia Campos  <[email protected]>
+
+        Unreviewed. Fix GTK+ build after r210571.
+
+        Add getFileDeviceId implementation to FileSystemGlib.cpp.
+
+        * platform/glib/FileSystemGlib.cpp:
+        (WebCore::getFileDeviceId):
+
 2017-01-11  Csaba Osztrogonác  <[email protected]>
 
         Unreviewed GTK buildfix after r210571.

Modified: trunk/Source/WebCore/platform/glib/FileSystemGlib.cpp (210579 => 210580)


--- trunk/Source/WebCore/platform/glib/FileSystemGlib.cpp	2017-01-11 08:47:42 UTC (rev 210579)
+++ trunk/Source/WebCore/platform/glib/FileSystemGlib.cpp	2017-01-11 08:52:56 UTC (rev 210580)
@@ -408,4 +408,16 @@
 #endif
 }
 
+std::optional<int32_t> getFileDeviceId(PlatformFileHandle handle)
+{
+    if (!isHandleValid(handle))
+        return std::nullopt;
+
+    GRefPtr<GFileInfo> fileInfo = adoptGRef(g_file_io_stream_query_info(handle, G_FILE_ATTRIBUTE_UNIX_DEVICE, nullptr, nullptr));
+    if (!fileInfo)
+        return std::nullopt;
+
+    return g_file_info_get_attribute_uint32(fileInfo.get(), G_FILE_ATTRIBUTE_UNIX_DEVICE);
 }
+
+}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to