try specifying the Library path by using -L flag to gcc
Type: Posts; User: amit_sahrawat
try specifying the Library path by using -L flag to gcc
Thanks Mats,
I think I can manage with the blkid thing, there's a file in /etc/blkid.tab, an entry gets added to this... I can read the file type from this.
again Thanks...
Regards,
Amit...
strace output show that it does some reading from the device itself...
It does some lseek(), read and then simply doing the mount()...
I tried by doing the same... but not able to extract the...
I tried by passing NULL in the mount() api like this
mount("/dev/sda1","/mnt/usb",NULL,MS_NODIRATIME | MS_NOATIME, NULL);
it does not work,
however, by doing this from command line like
mount...
hi,
I need to know the filesystem on /dev/sda1 i.e. on the usb pen drive. I tried by taking a look at the output of "strace mount /dev/sda1 /mnt/usb" but am not able to understand.
I need this...
got it ... yups it has to be year -1900, and so is for other values...
Thanks,
Amit Sahrawat
I am trying to get a time_t structure value from mktime() but it returns (time_t)-1.
I am doing something like this:
struct tm tv;
time_t timvar;
memset() for both the variables:
tv.tm_year =...
On my system, I have this d_type under the compile time flag __USD_BSD, just check dirent.h in /usr/include.
To get the the file type I have been using stat().
To get the file system statfs() can...
If u really need this kind of thing, you can create pipe(write/read values from that pipe) and use that for proper values, but that will involved extra overhead.
Regards,
Amit Sahrawat
anyways I would have to somehow create a listener thread on /sys/block and look out for the 'removable=1' option to get the the removable drives, rest I need to look further...
neways thanks..
...
There's an entry in /proc/sys/kernel/threads-max, may be that is what is needed ?
Regards,
Amit Sahrawat
Now I have plugged in my Pen drive, but there is still no entry in /proc/bus/usb...
But, I got something which might be useful...
/sys/block/sda/
An entry gets created each time(addition)...
Some how I am not getting any entry in /proc/bus/usb, I am plugging in USB hub device with once CARD. So, I suppose I should get an entry into that...
and I am not able to understand the...
I need some point in my task where I can get messages like whether device is added/removed. On each addition/removed I need to keep track of these devices and browse them.
So, how do we do that...
hi all,
I need information regarding the Drives on linux, just like the information provided by ::GetLogicalDrives & ::GetDriveType on Windows.
Please help me out if u have any idea, basically I...