}
/* Change the current directory, returns true if the path exists */
-bool Bvfs::ch_dir(char *path)
+bool Bvfs::ch_dir(const char *path)
{
pm_strcpy(db->path, path);
db->pnl = strlen(db->path);
/*
* Get all file versions for a specified client
*/
-void Bvfs::get_all_file_versions(DBId_t pathid, DBId_t fnid, char *client)
+void Bvfs::get_all_file_versions(DBId_t pathid, DBId_t fnid, const char *client)
{
Dmsg3(dbglevel, "get_all_file_versions(%lld, %lld, %s)\n", (uint64_t)pathid,
(uint64_t)fnid, client);
"SELECT File.FilenameId, listfiles.Name, File.JobId, File.LStat, listfiles.id "
"FROM File, ( "
"SELECT Filename.Name as Name, max(File.FileId) as id "
- "FROM File, Filename "
- "WHERE File.FilenameId = Filename.FilenameId "
+ "FROM File, Filename "
+ "WHERE File.FilenameId = Filename.FilenameId "
"AND Filename.Name != '' "
"AND File.PathId = %s "
"AND File.JobId IN (%s) "
/*
* Returns true if the directory exists
*/
- bool ch_dir(char *path);
+ bool ch_dir(const char *path);
bool ls_files(); /* Returns true if we have more files to read */
bool ls_dirs(); /* Returns true if we have more dir to read */
void ls_special_dirs(); /* get . and .. */
- void get_all_file_versions(DBId_t pathid, DBId_t fnid, char *client);
+ void get_all_file_versions(DBId_t pathid, DBId_t fnid, const char *client);
void update_cache();
-/*
- *
- * Program to test cache path
- *
- * Eric Bollengier, March 2007
- *
- *
- * Version $Id$
- */
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2001-2006 Free Software Foundation Europe e.V.
+ Copyright (C) 2009-2009 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
*/
+/*
+ *
+ * Program to test cache path
+ *
+ * Eric Bollengier, August 2009
+ *
+ *
+ */
#include "bacula.h"
#include "cats/cats.h"
/* Local variables */
static B_DB *db;
-static char *file="COPYRIGHT";
+static const char *file = "COPYRIGHT";
static DBId_t fnid=0;
static const char *db_name = "regress";
static const char *db_user = "regress";
{
Bvfs *vfs = (Bvfs *)ctx;
ATTR *attr = vfs->get_attr();
- char *empty = "A A A A A A A A A A A A A A";
+ char empty[] = "A A A A A A A A A A A A A A";
memset(&attr->statp, 0, sizeof(struct stat));
decode_stat((row[BVFS_LStat] && row[BVFS_LStat][0])?row[BVFS_LStat]:empty,
int main (int argc, char *argv[])
{
int ch;
- char *jobids="1", *path=NULL, *client=NULL;
+ char *jobids = (char *)"1";
+ char *path=NULL, *client=NULL;
uint64_t limit=0;
bool clean=false;
setlocale(LC_ALL, "");