Allow specifying disk directory as parameter, /dev/vdc is default path
This commit is contained in:
parent
e38810caf3
commit
0442a53fbf
@ -1,5 +1,5 @@
|
||||
set(TARGET_LAYER0 test_layer0)
|
||||
|
||||
set(DIR_PLACE /dev/vdb)
|
||||
|
||||
# add test sources here ...
|
||||
add_executable(${TARGET_LAYER0}
|
||||
@ -8,4 +8,4 @@ add_executable(${TARGET_LAYER0}
|
||||
)
|
||||
|
||||
# add test to activate ctest -VV
|
||||
add_test(NAME ${TARGET_LAYER0} COMMAND sudo ./${TARGET_LAYER0})
|
||||
add_test(NAME ${TARGET_LAYER0} COMMAND sudo ./${TARGET_LAYER0} ${DIR_PLACE})
|
@ -3,8 +3,14 @@
|
||||
#include <assert.h>
|
||||
#include "rawdisk.h"
|
||||
|
||||
int main() {
|
||||
char *d = strdup("/dev/vdb");
|
||||
int main(int argc, char *argv[]) {
|
||||
char *d = NULL;
|
||||
if(argc < 2){
|
||||
d = strdup("/dev/vdc");
|
||||
}else{
|
||||
d = argv[1];
|
||||
}
|
||||
|
||||
RawDisk *H = new RawDisk(d);
|
||||
|
||||
char *buf = "iloveosdfjlseirfnerig";
|
||||
|
Loading…
x
Reference in New Issue
Block a user