/[classpath]/classpath/native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c
ViewVC logotype

Diff of /classpath/native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by rabbit78, Mon Jul 25 13:57:40 2005 UTC revision 1.21 by mark, Tue Jul 26 09:40:21 2005 UTC
# Line 204  Java_gnu_java_nio_channels_FileChannelIm Line 204  Java_gnu_java_nio_channels_FileChannelIm
204  #endif  #endif
205    
206    TARGET_NATIVE_FILE_OPEN (filename, native_fd, flags, permissions, result);    TARGET_NATIVE_FILE_OPEN (filename, native_fd, flags, permissions, result);
   JCL_free_cstring (env, name, filename);  
207    
208    if (result != TARGET_NATIVE_OK)    if (result != TARGET_NATIVE_OK)
209      {      {
210        /* We can only throw FileNotFoundException.  */        char message[256]; /* Fixed size we don't need to malloc. */
211          char *error_string = TARGET_NATIVE_LAST_ERROR_STRING ();
212    
213          snprintf(message, 256, "%s: %s", error_string, filename);
214          /* We are only allowed to throw FileNotFoundException.  */
215        JCL_ThrowException (env,        JCL_ThrowException (env,
216                            "java/io/FileNotFoundException",                            "java/io/FileNotFoundException",
217                            TARGET_NATIVE_LAST_ERROR_STRING ());                            message);
218          JCL_free_cstring (env, name, filename);
219        return TARGET_NATIVE_MATH_INT_INT64_CONST_MINUS_1;        return TARGET_NATIVE_MATH_INT_INT64_CONST_MINUS_1;
220      }      }
221    
222      JCL_free_cstring (env, name, filename);
223    return native_fd;    return native_fd;
224  }  }
225    

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26