Permalink
Browse files

Added support for command FILE_DATASYNC, which is implemented as syno…

…nym to FILE_FSYNC. See erlang/otp@3f53a96#erts/emulator/drivers/common/efile_drv.c for the corresponding commit in Erlang/OTP.
  • Loading branch information...
1 parent d6267f9 commit 39a4942f7ed173f1a8da1188259d820e9bf1e83d @jetztgradnet jetztgradnet committed Jul 10, 2011
@@ -345,6 +345,7 @@ public void deq_free_size() {
public static final int FILE_IPREAD = 27;
public static final int FILE_ALTNAME = 28;
public static final int FILE_READ_LINE = 29;
+ public static final int FILE_FDATASYNC = 30;
/* Return codes */
@@ -1214,7 +1215,7 @@ public boolean accept(File dir, String name) {
@Override
protected void output(EHandle caller, ByteBuffer buf) throws Pausable {
FileAsync d;
- byte cmd = buf.get();
+ final byte cmd = buf.get();
switch (cmd) {
case FILE_TRUNCATE: {
@@ -1247,13 +1248,14 @@ public void ready() throws Pausable {
};
} break;
+ case FILE_FDATASYNC:
case FILE_FSYNC: {
d = new FileAsync() {
{
level = 2;
fd = EFile.this.fd;
- command = FILE_FSYNC;
+ command = cmd;
}
@Override
@@ -66,6 +66,7 @@
/* Commands like file interface's */
public static final int FILE_PREAD = 17;
public static final int FILE_PWRITE = 18;
+ public static final int RAM_FILE_FDATASYNC = 19;
/* Special ram_file commands */
public static final int RAM_FILE_GET = 30;

0 comments on commit 39a4942

Please sign in to comment.