29 lines
		
	
	
		
			988 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			988 B
		
	
	
	
		
			C
		
	
	
	
	
	
#include "fs.h"
 | 
						|
#include "inode.h"
 | 
						|
 | 
						|
 | 
						|
/*===========================================================================*
 | 
						|
 *				fs_sync					     *
 | 
						|
 *===========================================================================*/
 | 
						|
int fs_sync(message *fs_m_in, message *fs_m_out)
 | 
						|
{
 | 
						|
/* Perform the sync() system call.  No-op on this FS. */
 | 
						|
 | 
						|
  return(OK);		/* sync() can't fail */
 | 
						|
}
 | 
						|
 | 
						|
/*===========================================================================*
 | 
						|
 *                             fs_chmod					     *
 | 
						|
 *===========================================================================*/
 | 
						|
int fs_chmod(message *fs_m_in, message *fs_m_out)
 | 
						|
{
 | 
						|
  struct inode *rip;  /* target inode */
 | 
						|
  mode_t mode = fs_m_in->m_vfs_fs_chmod.mode;
 | 
						|
 | 
						|
  if( (rip = find_inode(fs_m_in->m_vfs_fs_chmod.inode)) == NULL) return(EINVAL);
 | 
						|
  get_inode(rip->i_dev, rip->i_num);	/* mark inode in use */
 | 
						|
  rip->i_mode = (rip->i_mode & ~ALL_MODES) | (mode & ALL_MODES);
 | 
						|
  put_inode(rip);			/* release the inode */
 | 
						|
  return OK;
 | 
						|
}
 |