]> git.kernelconcepts.de Git - karo-tx-redboot.git/blobdiff - packages/hal/synth/arch/v2_0/src/synth_syscalls.c
unified MX27, MX25, MX37 trees
[karo-tx-redboot.git] / packages / hal / synth / arch / v2_0 / src / synth_syscalls.c
index 830ec089f97f8cf3a91f788749dedfd178ab539f..31474e615d8bf58680e86cd97d9528541144cf68 100644 (file)
@@ -34,7 +34,6 @@
 // This exception does not invalidate any other reasons why a work based on
 // this file might be covered by the GNU General Public License.
 // -------------------------------------------
-//####ECOSGPLCOPYRIGHTEND####
 //=============================================================================
 //#####DESCRIPTIONBEGIN####
 //
@@ -92,3 +91,15 @@ cyg_hal_sys_mmap(void *addr, unsigned long length, unsigned long prot,
   
   return (cyg_hal_sys_mmapx(&args));
 } 
+
+int cyg_hal_sys_ftok(const char* path, int id)
+{
+  struct cyg_hal_sys_old_stat st;
+  
+  if (cyg_hal_sys_oldstat(path, &st) != 0)
+    return (cyg_uint32)-1;
+  
+  return (cyg_uint32) (id << 24 | 
+                       (st.st_dev & 0xff) << 16 | 
+                       (st.st_ino & 0xffff));
+}