~ubuntu-branches/ubuntu/precise/ceph/precise-proposed

« back to all changes in this revision

Viewing changes to src/dupstore.cc

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2011-04-25 10:09:05 UTC
  • mfrom: (1.1.3 upstream) (0.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110425100905-exm7dfvi2v5ick02
Tags: 0.27-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 */
14
14
 
15
15
#include <iostream>
16
 
//#include "ebofs/Ebofs.h"
17
16
#include "os/FileStore.h"
 
17
#include "common/ceph_argparse.h"
18
18
#include "common/common_init.h"
19
19
 
20
20
#include <ext/hash_map>
77
77
 
78
78
void usage()
79
79
{
80
 
  cerr << "usage: dup.ebofs (ebofs|fakestore) src (ebofs|fakestore) dst" << std::endl;
 
80
  cerr << "usage: dupstore filestore SRC filestore DST" << std::endl;
81
81
  exit(0);
82
82
}
83
83
 
87
87
  argv_to_vec(argc, argv, args);
88
88
  env_to_vec(args);
89
89
 
90
 
  common_set_defaults(false);
91
 
  common_init(args, "dumpstore", false);
 
90
  common_init(args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
92
91
 
93
92
  // args
94
93
  if (args.size() != 4) 
96
95
 
97
96
  ObjectStore *src = 0, *dst = 0;
98
97
 
99
 
  //if (strcmp(args[0], "ebofs") == 0) 
100
 
  //src = new Ebofs(args[1]);
101
 
  //else
102
98
  if (strcmp(args[0], "filestore") == 0) 
103
 
    src = new FileStore(args[1]);
 
99
    src = new FileStore(args[1], NULL);
104
100
  else usage();
105
101
 
106
 
  //if (strcmp(args[2], "ebofs") == 0) 
107
 
  //dst = new Ebofs(args[3]);
108
 
  //else
109
102
  if (strcmp(args[2], "filestore") == 0) 
110
 
    dst = new FileStore(args[3]);
 
103
    dst = new FileStore(args[3], NULL);
111
104
  else usage();
112
105
 
113
106
  return dupstore(src, dst);