My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 9 attachment: ohsm_meta_user.c (1.6 KB)

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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*The program takes input the mount point of any file system and prints the superblock information
Copyright (C) <2008> <rishi bhushan agrawal>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

*/

#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<sys/stat.h>
#include<fcntl.h>
//#include <linux/ext2_fs.h>
#include "ohsm_meta_user.h"


#ifdef DEBUG
#define dbg_printf(x) printk(x)
#else
#define dbg_printf /* */
#endif


#define MNTPNT_LEN 30

int
main ()
{
int fd;
struct ohsm_input_to_meta_device input;
input.error = 0;
fd = open ("/dev/ohsm_meta", O_RDWR);
if (fd == 0)
{
printf ("\nError opening device");
return 1;
}
printf ("\n\nEnter the Mount Point of the File System : ");
scanf ("%s", input.mountpoint);

printf("\nThe Mount moint entered is %s",input.mountpoint);

ioctl(fd,1,&input);
printf ("\n\nDisplaying the Super Block data : \n\n");
dbg_printf("\n\nUSER: 1");
//ohsm_print_ext2_sb_info(input.sbi);
return 0;

}
Powered by Google Project Hosting