Changeset 437 for trunk/kernel/fs
- Timestamp:
- Mar 28, 2018, 2:40:29 PM (7 years ago)
- Location:
- trunk/kernel/fs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/devfs.c
r435 r437 85 85 } 86 86 87 ///////////////////////////////////////////////// //87 ///////////////////////////////////////////////// 88 88 void devfs_global_init( xptr_t parent_inode_xp, 89 89 xptr_t * devfs_dev_inode_xp, … … 109 109 110 110 assert( (error == 0) , __FUNCTION__ , "cannot create <dev>\n" ); 111 112 #if( CONFIG_DEBUG_DEVFS_INIT & 1 ) 113 if( CONFIG_DEBUG_DEVFS_INIT < cycle ) 114 printk("\n[DBG] %s : created <dev> inode at cycle %d\n", __FUNCTION__, cycle ); 115 #endif 111 116 112 117 // create DEVFS "external" inode in cluster IO -
trunk/kernel/fs/vfs.c
r436 r437 3 3 * 4 4 * Author Mohamed Lamine Karaoui (2015) 5 * Alain Greiner (2016,2017 )5 * Alain Greiner (2016,2017,2018) 6 6 * 7 7 * Copyright (c) UPMC Sorbonne Universites … … 455 455 if( length >= CONFIG_VFS_MAX_NAME_LENGTH ) 456 456 { 457 printk("\n[ERROR] in %s : name too long\n", __FUNCTION__ ); 457 458 #if CONFIG_DEBUG_SYSCALLS_ERROR 459 printk("\n[ERROR] in %s : name <name> too long\n", __FUNCTION__ , name ); 460 #endif 458 461 return EINVAL; 459 462 } … … 467 470 if( dentry == NULL ) 468 471 { 469 printk("\n[ERROR] in %s : cannot allocate dentry descriptor\n", __FUNCTION__ ); 472 473 #if CONFIG_DEBUG_SYSCALLS_ERROR 474 printk("\n[ERROR] in %s : cannot allocate dentry\n", __FUNCTION__ ); 475 #endif 470 476 return ENOMEM; 471 477 } … … 478 484 strcpy( dentry->name , name ); 479 485 486 #if( CONFIG_DEBUG_VFS_DENTRY_CREATE & 1 ) 487 cycle = (uint32_t)hal_get_cycles(); 488 if( CONFIG_DEBUG_VFS_DENTRY_CREATE < cycle ) 489 printk("\n[DBG] %s : dentry initialised\n", __FUNCTION__ ); 490 #endif 491 480 492 // register dentry in hash table rooted in parent inode 481 493 xhtab_insert( XPTR( local_cxy , &parent->children ), 482 494 name, 483 495 XPTR( local_cxy , &dentry->list ) ); 496 497 #if( CONFIG_DEBUG_VFS_DENTRY_CREATE & 1 ) 498 cycle = (uint32_t)hal_get_cycles(); 499 if( CONFIG_DEBUG_VFS_DENTRY_CREATE < cycle ) 500 printk("\n[DBG] %s : dentry registerd in htab\n", __FUNCTION__ ); 501 #endif 484 502 485 503 // return extended pointer on dentry … … 1637 1655 1638 1656 #if (CONFIG_DEBUG_VFS_ADD_CHILD & 1) 1639 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle)1657 if( (CONFIG_DEBUG_VFS_ADD_CHILD < cycle) && (error == 0) ) 1640 1658 printk("\n[DBG] %s : dentry <%s> created in cluster %x\n", __FUNCTION__, name, local_cxy ); 1641 1659 #endif … … 1652 1670 1653 1671 #if (CONFIG_DEBUG_VFS_ADD_CHILD & 1) 1654 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle)1672 if( (CONFIG_DEBUG_VFS_ADD_CHILD < cycle) && (error == 0) ) 1655 1673 printk("\n[DBG] %s : dentry <%s> created in cluster %x\n", __FUNCTION__, name, parent_cxy ); 1656 1674 #endif … … 1660 1678 if( error ) 1661 1679 { 1662 printk("\n[ERROR] in %s : cannot create dentry in cluster %x\n",1663 __FUNCTION__ , parent_cxy );1680 printk("\n[ERROR] in %s : cannot create dentry <%s> in cluster %x\n", 1681 __FUNCTION__ , name , parent_cxy ); 1664 1682 return ENOMEM; 1665 1683 } … … 1688 1706 __FUNCTION__ , GET_PTR(inode_xp) , local_cxy ); 1689 1707 #endif 1690 1691 vfs_dmsg("\n[DBG] %s : inode %x created in local cluster %x\n",1692 __FUNCTION__ , GET_PTR(inode_xp) , local_cxy );1693 1708 1694 1709 } -
trunk/kernel/fs/vfs.h
r430 r437 3 3 * 4 4 * Author Mohamed Lamine Karaoui (2014,2015) 5 * Alain Greiner (2016,2017 )5 * Alain Greiner (2016,2017,2018) 6 6 * 7 7 * Copyright (c) UPMC Sorbonne Universites
Note: See TracChangeset
for help on using the changeset viewer.