Commit c9451eb5 authored by mincheol's avatar mincheol
Browse files

improve ui

parent fd718493
......@@ -5,16 +5,35 @@
#include "extractmd.h"
int main()
int main(int argc, char *argv[])
{
int fd = open("/dev/extractmd", O_RDWR);
struct extractmd_path p;
p.path_device = "/dev/sdb"; // Device
p.path_mount_point = "/mnt"; // Mount point
p.path = "./md"; // Where to store files of metadata
char dir_sb[255] = {0};
char dir_bd[255] = {0};
char dir_journal[255] = {0};
if (argc != 4)
{
printf("usage : ./start [device] [mount point] [path-you-want] (e.q., #./start /dev/sdb /mnt ./md)\n");
return 0;
}
sprintf(dir_sb, "%s/sb", argv[3]);
sprintf(dir_bd, "%s/bd", argv[3]);
sprintf(dir_journal, "%s/journal", argv[3]);
mkdir(argv[3], 0777);
mkdir(dir_sb, 0777);
mkdir(dir_bd, 0777);
mkdir(dir_journal, 0777);
p.path_device = argv[1]; // Device
p.path_mount_point = argv[2]; // Mount point
p.path = argv[3]; // Where to store files of metadata
ioctl(fd,&p); // Syscall
ioctl(fd,&p); // Syscall
close(fd);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment