And a few other related warning fixes. Change-Id: I1a49b9ee04c2b1bf80bc943272f72ffd6de77ef6
		
			
				
	
	
		
			68 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
/* Part of libhgfs - (c) 2009, D.C. van Moolenbroek */
 | 
						|
 | 
						|
#include "inc.h"
 | 
						|
 | 
						|
#include <sys/stat.h>
 | 
						|
 | 
						|
/*===========================================================================*
 | 
						|
 *				hgfs_mkdir				     *
 | 
						|
 *===========================================================================*/
 | 
						|
int hgfs_mkdir(const char *path, int mode)
 | 
						|
{
 | 
						|
/* Create a new directory.
 | 
						|
 */
 | 
						|
 | 
						|
  RPC_REQUEST(HGFS_REQ_MKDIR);
 | 
						|
  RPC_NEXT8 = HGFS_MODE_TO_PERM(mode);
 | 
						|
 | 
						|
  path_put(path);
 | 
						|
 | 
						|
  return rpc_query();
 | 
						|
}
 | 
						|
 | 
						|
/*===========================================================================*
 | 
						|
 *				hgfs_unlink				     *
 | 
						|
 *===========================================================================*/
 | 
						|
int hgfs_unlink(const char *path)
 | 
						|
{
 | 
						|
/* Delete a file.
 | 
						|
 */
 | 
						|
 | 
						|
  RPC_REQUEST(HGFS_REQ_UNLINK);
 | 
						|
 | 
						|
  path_put(path);
 | 
						|
 | 
						|
  return rpc_query();
 | 
						|
}
 | 
						|
 | 
						|
/*===========================================================================*
 | 
						|
 *				hgfs_rmdir				     *
 | 
						|
 *===========================================================================*/
 | 
						|
int hgfs_rmdir(const char *path)
 | 
						|
{
 | 
						|
/* Remove an empty directory.
 | 
						|
 */
 | 
						|
 | 
						|
  RPC_REQUEST(HGFS_REQ_RMDIR);
 | 
						|
 | 
						|
  path_put(path);
 | 
						|
 | 
						|
  return rpc_query();
 | 
						|
}
 | 
						|
 | 
						|
/*===========================================================================*
 | 
						|
 *				hgfs_rename				     *
 | 
						|
 *===========================================================================*/
 | 
						|
int hgfs_rename(const char *opath, const char *npath)
 | 
						|
{
 | 
						|
/* Rename a file or directory.
 | 
						|
 */
 | 
						|
 | 
						|
  RPC_REQUEST(HGFS_REQ_RENAME);
 | 
						|
 | 
						|
  path_put(opath);
 | 
						|
  path_put(npath);
 | 
						|
 | 
						|
  return rpc_query();
 | 
						|
}
 |