nfs-ganesha 1.4

posixdb_flush.c

Go to the documentation of this file.
00001 #ifdef HAVE_CONFIG_H
00002 #include "config.h"
00003 #endif
00004 
00005 #include "posixdb_internal.h"
00006 
00007 fsal_posixdb_status_t fsal_posixdb_flush(fsal_posixdb_conn * p_conn)
00008 {
00009   PGresult *p_res;
00010 
00011   p_res = PQexec(p_conn, "DELETE FROM Parent");
00012   CheckCommand(p_res);
00013   PQclear(p_res);
00014 
00015   p_res = PQexec(p_conn, "DELETE FROM Handle");
00016   CheckCommand(p_res);
00017   PQclear(p_res);
00018 
00019   ReturnCodeDB(ERR_FSAL_POSIXDB_NOERR, 0);
00020 }