-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrawpod.cc
35 lines (33 loc) · 873 Bytes
/
rawpod.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* The Rawpod raw device access library. Copyright (c) 2006 Joshua Oreman.
* Released under the GPL - see file COPYING. All rights reserved.
* rawpod.cc - overall library functions. Last modified 2006-07-30.
*/
#include "rawpod.h"
#include "device.h"
int rawpod_parse_option (char optopt, const char *optarg)
{
switch (optopt) {
case 'w':
LocalRawDevice::setCOWFile (strdup (optarg));
break;
case 'i':
LocalRawDevice::setOverride (strdup (optarg));
break;
case 'I':
BlockCache::setCommitInterval (atoi (optarg));
break;
case 's':
LocalRawDevice::setCachedSectors (atoi (optarg));
break;
case 'c':
BlockCache::enable();
break;
case 'C':
BlockCache::disable();
break;
default:
return 0;
}
return 1;
}